From: Michael J. Ruhl Date: Wed, 16 May 2018 01:31:17 +0000 (-0700) Subject: IB/hfi1: Set port number for errorinfo MAD response X-Git-Tag: for-linus-20180616~47^2~51 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=5938d94cf0380bca9e6fbb910c010f4483906c11;p=linux-2.6-block.git IB/hfi1: Set port number for errorinfo MAD response 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 Signed-off-by: Michael J. Ruhl Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford --- diff --git a/drivers/infiniband/hw/hfi1/mad.c b/drivers/infiniband/hw/hfi1/mad.c index 983b5794a660..0307405491e0 100644 --- a/drivers/infiniband/hw/hfi1/mad.c +++ b/drivers/infiniband/hw/hfi1/mad.c @@ -3424,6 +3424,7 @@ static int pma_get_opa_errorinfo(struct opa_pma_mad *pmp, 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 =