summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/hfi1/ud.c
diff options
context:
space:
mode:
authorDon Hiatt2017-11-06 15:39:22 +0100
committerDoug Ledford2017-11-13 21:53:57 +0100
commitb64581adba467c916590c3922f64ec6c2b59a2c3 (patch)
tree2067ccf5bee8b251e15f91c86f9f3002aab2c21a /drivers/infiniband/hw/hfi1/ud.c
parentIB/core: Convert OPA AH to IB for Extended LIDs only (diff)
downloadkernel-qcow2-linux-b64581adba467c916590c3922f64ec6c2b59a2c3.tar.gz
kernel-qcow2-linux-b64581adba467c916590c3922f64ec6c2b59a2c3.tar.xz
kernel-qcow2-linux-b64581adba467c916590c3922f64ec6c2b59a2c3.zip
IB/hfi1: Mask upper 16Bits of Extended LID prior to rvt_cq_entry
Pass only the lower 16Bits of an Extended LIDs to rvt_cq_entry to avoid triggering a WARN_ON_ONCE during conversion there. These upper 16Bits are okay to drop as they are obtained elsewhere. Fixes: 62ede7779904 ("Add OPA extended LID support") Reviewed-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Don Hiatt <don.hiatt@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/hfi1/ud.c')
-rw-r--r--drivers/infiniband/hw/hfi1/ud.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/hfi1/ud.c b/drivers/infiniband/hw/hfi1/ud.c
index 84c7dbec0c28..5260b27f5631 100644
--- a/drivers/infiniband/hw/hfi1/ud.c
+++ b/drivers/infiniband/hw/hfi1/ud.c
@@ -265,8 +265,8 @@ static void ud_loopback(struct rvt_qp *sqp, struct rvt_swqe *swqe)
} else {
wc.pkey_index = 0;
}
- wc.slid = ppd->lid | (rdma_ah_get_path_bits(ah_attr) &
- ((1 << ppd->lmc) - 1));
+ wc.slid = (ppd->lid | (rdma_ah_get_path_bits(ah_attr) &
+ ((1 << ppd->lmc) - 1))) & U16_MAX;
/* Check for loopback when the port lid is not set */
if (wc.slid == 0 && sqp->ibqp.qp_type == IB_QPT_GSI)
wc.slid = be16_to_cpu(IB_LID_PERMISSIVE);
@@ -1037,7 +1037,7 @@ void hfi1_ud_rcv(struct hfi1_packet *packet)
}
if (slid_is_permissive)
slid = be32_to_cpu(OPA_LID_PERMISSIVE);
- wc.slid = slid;
+ wc.slid = slid & U16_MAX;
wc.sl = sl_from_sc;
/*