]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
IB/hfi1: Set port number for errorinfo MAD response
authorMichael J. Ruhl <michael.j.ruhl@intel.com>
Wed, 16 May 2018 01:31:17 +0000 (18:31 -0700)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 24 May 2018 15:39:25 +0000 (09:39 -0600)
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>
drivers/infiniband/hw/hfi1/mad.c

index 983b5794a6606efbb71273b2de286893d76a80c7..0307405491e015e325d1ed692c3e873822b991fc 100644 (file)
@@ -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 =