diff options
author | Erik E. Kahn <erik.kahn@intel.com> | 2015-12-10 09:59:40 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-12-21 14:00:17 -0800 |
commit | 5cd24119d437910d15c510218dcd32f57355a3d3 (patch) | |
tree | 7e3f7e1a6fa1357e09bcb64a4dc34569cc1226f2 /drivers/staging/rdma/hfi1/ud.c | |
parent | staging/rdma/hfi1: add definitions for OPA traps (diff) | |
download | linux-dev-5cd24119d437910d15c510218dcd32f57355a3d3.tar.xz linux-dev-5cd24119d437910d15c510218dcd32f57355a3d3.zip |
staging/rdma/hfi1: HFI now sends OPA Traps instead of IBTA
send_trap() was still using old ib_smp instead of opa_smp
for formatting and sending traps.
Reviewed-by: Arthur Kepner <arthur.kepner@intel.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jubin John <jubin.john@intel.com>
Signed-off-by: Erik E. Kahn <erik.kahn@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rdma/hfi1/ud.c')
-rw-r--r-- | drivers/staging/rdma/hfi1/ud.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/staging/rdma/hfi1/ud.c b/drivers/staging/rdma/hfi1/ud.c index 54ff1f5416d4..bd1b402c1e14 100644 --- a/drivers/staging/rdma/hfi1/ud.c +++ b/drivers/staging/rdma/hfi1/ud.c @@ -111,11 +111,10 @@ static void ud_loopback(struct hfi1_qp *sqp, struct hfi1_swqe *swqe) ((1 << ppd->lmc) - 1)); if (unlikely(ingress_pkey_check(ppd, pkey, sc5, qp->s_pkey_index, slid))) { - hfi1_bad_pqkey(ibp, IB_NOTICE_TRAP_BAD_PKEY, pkey, + hfi1_bad_pqkey(ibp, OPA_TRAP_BAD_P_KEY, pkey, ah_attr->sl, sqp->ibqp.qp_num, qp->ibqp.qp_num, - cpu_to_be16(slid), - cpu_to_be16(ah_attr->dlid)); + slid, ah_attr->dlid); goto drop; } } @@ -135,11 +134,11 @@ static void ud_loopback(struct hfi1_qp *sqp, struct hfi1_swqe *swqe) lid = ppd->lid | (ah_attr->src_path_bits & ((1 << ppd->lmc) - 1)); - hfi1_bad_pqkey(ibp, IB_NOTICE_TRAP_BAD_QKEY, qkey, + hfi1_bad_pqkey(ibp, OPA_TRAP_BAD_Q_KEY, qkey, ah_attr->sl, sqp->ibqp.qp_num, qp->ibqp.qp_num, - cpu_to_be16(lid), - cpu_to_be16(ah_attr->dlid)); + lid, + ah_attr->dlid); goto drop; } } @@ -737,12 +736,13 @@ void hfi1_ud_rcv(struct hfi1_packet *packet) * for invalid pkeys is optional according to * IB spec (release 1.3, section 10.9.4) */ - hfi1_bad_pqkey(ibp, IB_NOTICE_TRAP_BAD_PKEY, + hfi1_bad_pqkey(ibp, OPA_TRAP_BAD_P_KEY, pkey, (be16_to_cpu(hdr->lrh[0]) >> 4) & 0xF, src_qp, qp->ibqp.qp_num, - hdr->lrh[3], hdr->lrh[1]); + be16_to_cpu(hdr->lrh[3]), + be16_to_cpu(hdr->lrh[1])); return; } } else { @@ -753,10 +753,11 @@ void hfi1_ud_rcv(struct hfi1_packet *packet) } if (unlikely(qkey != qp->qkey)) { - hfi1_bad_pqkey(ibp, IB_NOTICE_TRAP_BAD_QKEY, qkey, + hfi1_bad_pqkey(ibp, OPA_TRAP_BAD_Q_KEY, qkey, (be16_to_cpu(hdr->lrh[0]) >> 4) & 0xF, src_qp, qp->ibqp.qp_num, - hdr->lrh[3], hdr->lrh[1]); + be16_to_cpu(hdr->lrh[3]), + be16_to_cpu(hdr->lrh[1])); return; } /* Drop invalid MAD packets (see 13.5.3.1). */ |