diff options
author | Don Hiatt <don.hiatt@intel.com> | 2017-11-06 09:39:22 -0500 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-11-13 15:53:57 -0500 |
commit | b64581adba467c916590c3922f64ec6c2b59a2c3 (patch) | |
tree | 2067ccf5bee8b251e15f91c86f9f3002aab2c21a | |
parent | 19b57c6c449970763bee089466119e09a17199b1 (diff) |
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>
-rw-r--r-- | drivers/infiniband/hw/hfi1/rc.c | 2 | ||||
-rw-r--r-- | drivers/infiniband/hw/hfi1/ruc.c | 2 | ||||
-rw-r--r-- | drivers/infiniband/hw/hfi1/uc.c | 2 | ||||
-rw-r--r-- | drivers/infiniband/hw/hfi1/ud.c | 6 |
4 files changed, 6 insertions, 6 deletions
diff --git a/drivers/infiniband/hw/hfi1/rc.c b/drivers/infiniband/hw/hfi1/rc.c index 3f21b050714f..fd01a760259f 100644 --- a/drivers/infiniband/hw/hfi1/rc.c +++ b/drivers/infiniband/hw/hfi1/rc.c | |||
@@ -2219,7 +2219,7 @@ send_last: | |||
2219 | wc.opcode = IB_WC_RECV; | 2219 | wc.opcode = IB_WC_RECV; |
2220 | wc.qp = &qp->ibqp; | 2220 | wc.qp = &qp->ibqp; |
2221 | wc.src_qp = qp->remote_qpn; | 2221 | wc.src_qp = qp->remote_qpn; |
2222 | wc.slid = rdma_ah_get_dlid(&qp->remote_ah_attr); | 2222 | wc.slid = rdma_ah_get_dlid(&qp->remote_ah_attr) & U16_MAX; |
2223 | /* | 2223 | /* |
2224 | * It seems that IB mandates the presence of an SL in a | 2224 | * It seems that IB mandates the presence of an SL in a |
2225 | * work completion only for the UD transport (see section | 2225 | * work completion only for the UD transport (see section |
diff --git a/drivers/infiniband/hw/hfi1/ruc.c b/drivers/infiniband/hw/hfi1/ruc.c index d450d4d4bda3..1a3ed6e81b31 100644 --- a/drivers/infiniband/hw/hfi1/ruc.c +++ b/drivers/infiniband/hw/hfi1/ruc.c | |||
@@ -560,7 +560,7 @@ do_write: | |||
560 | wc.byte_len = wqe->length; | 560 | wc.byte_len = wqe->length; |
561 | wc.qp = &qp->ibqp; | 561 | wc.qp = &qp->ibqp; |
562 | wc.src_qp = qp->remote_qpn; | 562 | wc.src_qp = qp->remote_qpn; |
563 | wc.slid = rdma_ah_get_dlid(&qp->remote_ah_attr); | 563 | wc.slid = rdma_ah_get_dlid(&qp->remote_ah_attr) & U16_MAX; |
564 | wc.sl = rdma_ah_get_sl(&qp->remote_ah_attr); | 564 | wc.sl = rdma_ah_get_sl(&qp->remote_ah_attr); |
565 | wc.port_num = 1; | 565 | wc.port_num = 1; |
566 | /* Signal completion event if the solicited bit is set. */ | 566 | /* Signal completion event if the solicited bit is set. */ |
diff --git a/drivers/infiniband/hw/hfi1/uc.c b/drivers/infiniband/hw/hfi1/uc.c index fcd81866e332..1ee80a5f258c 100644 --- a/drivers/infiniband/hw/hfi1/uc.c +++ b/drivers/infiniband/hw/hfi1/uc.c | |||
@@ -462,7 +462,7 @@ last_imm: | |||
462 | wc.status = IB_WC_SUCCESS; | 462 | wc.status = IB_WC_SUCCESS; |
463 | wc.qp = &qp->ibqp; | 463 | wc.qp = &qp->ibqp; |
464 | wc.src_qp = qp->remote_qpn; | 464 | wc.src_qp = qp->remote_qpn; |
465 | wc.slid = rdma_ah_get_dlid(&qp->remote_ah_attr); | 465 | wc.slid = rdma_ah_get_dlid(&qp->remote_ah_attr) & U16_MAX; |
466 | /* | 466 | /* |
467 | * It seems that IB mandates the presence of an SL in a | 467 | * It seems that IB mandates the presence of an SL in a |
468 | * work completion only for the UD transport (see section | 468 | * work completion only for the UD transport (see section |
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) | |||
265 | } else { | 265 | } else { |
266 | wc.pkey_index = 0; | 266 | wc.pkey_index = 0; |
267 | } | 267 | } |
268 | wc.slid = ppd->lid | (rdma_ah_get_path_bits(ah_attr) & | 268 | wc.slid = (ppd->lid | (rdma_ah_get_path_bits(ah_attr) & |
269 | ((1 << ppd->lmc) - 1)); | 269 | ((1 << ppd->lmc) - 1))) & U16_MAX; |
270 | /* Check for loopback when the port lid is not set */ | 270 | /* Check for loopback when the port lid is not set */ |
271 | if (wc.slid == 0 && sqp->ibqp.qp_type == IB_QPT_GSI) | 271 | if (wc.slid == 0 && sqp->ibqp.qp_type == IB_QPT_GSI) |
272 | wc.slid = be16_to_cpu(IB_LID_PERMISSIVE); | 272 | wc.slid = be16_to_cpu(IB_LID_PERMISSIVE); |
@@ -1037,7 +1037,7 @@ void hfi1_ud_rcv(struct hfi1_packet *packet) | |||
1037 | } | 1037 | } |
1038 | if (slid_is_permissive) | 1038 | if (slid_is_permissive) |
1039 | slid = be32_to_cpu(OPA_LID_PERMISSIVE); | 1039 | slid = be32_to_cpu(OPA_LID_PERMISSIVE); |
1040 | wc.slid = slid; | 1040 | wc.slid = slid & U16_MAX; |
1041 | wc.sl = sl_from_sc; | 1041 | wc.sl = sl_from_sc; |
1042 | 1042 | ||
1043 | /* | 1043 | /* |