]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
IB/hfi1: Change slid arg in ingress_pkey_table_fail to 32bit
authorDon Hiatt <don.hiatt@intel.com>
Fri, 22 Dec 2017 16:46:00 +0000 (08:46 -0800)
committerJason Gunthorpe <jgg@mellanox.com>
Fri, 22 Dec 2017 20:46:11 +0000 (13:46 -0700)
Change the slid arg to ingress_pkey_table_fail() to a full
32Bits and do not convert to 16Bits in caller. This is so we
can keep everything 32bit in the kernel and only change to
16bit at the uapi boundary.

Signed-off-by: Don Hiatt <don.hiatt@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/hfi1/hfi.h
drivers/infiniband/hw/hfi1/mad.c

index 4a9b4d7efe6362f31457672882e882af3bfdfc46..85b95520db5d6f92dc7fe23df0f3f816083d0f6b 100644 (file)
@@ -1624,7 +1624,7 @@ static int ingress_pkey_table_search(struct hfi1_pportdata *ppd, u16 pkey)
  * the 'error info' for this failure.
  */
 static void ingress_pkey_table_fail(struct hfi1_pportdata *ppd, u16 pkey,
-                                   u16 slid)
+                                   u32 slid)
 {
        struct hfi1_devdata *dd = ppd->dd;
 
index cf8dba34fe30ec67d833315d7b00b7130513a6bf..34547a48a44592856c507035934f9b9cab332ef3 100644 (file)
@@ -4348,11 +4348,7 @@ static int opa_local_smp_check(struct hfi1_ibport *ibp,
         */
        if (pkey == LIM_MGMT_P_KEY || pkey == FULL_MGMT_P_KEY)
                return 0;
-       /*
-        * On OPA devices it is okay to lose the upper 16 bits of LID as this
-        * information is obtained elsewhere. Mask off the upper 16 bits.
-        */
-       ingress_pkey_table_fail(ppd, pkey, ib_lid_cpu16(0xFFFF & in_wc->slid));
+       ingress_pkey_table_fail(ppd, pkey, in_wc->slid);
        return 1;
 }