Blob Blame History Raw
From: "Michael J. Ruhl" <michael.j.ruhl@intel.com>
Date: Tue, 15 May 2018 18:31:17 -0700
Subject: IB/hfi1: Set port number for errorinfo MAD response
Patch-mainline: v4.18-rc1
Git-commit: 5938d94cf0380bca9e6fbb910c010f4483906c11
References: bsc#1096793 FATE#325050

For errorinfo MAD requests, the response has a 0 port number left over
from a memset. Instead we should always set the port number in the
response.

Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
---
 drivers/infiniband/hw/hfi1/mad.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/infiniband/hw/hfi1/mad.c
+++ b/drivers/infiniband/hw/hfi1/mad.c
@@ -3425,6 +3425,7 @@ static int pma_get_opa_errorinfo(struct
 		pmp->mad_hdr.status |= IB_SMP_INVALID_FIELD;
 		return reply((struct ib_mad_hdr *)pmp);
 	}
+	rsp->port_number = port;
 
 	/* PortRcvErrorInfo */
 	rsp->port_rcv_ei.status_and_code =