aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRoland Dreier <roland@topspin.com>2005-01-14 23:17:56 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-14 23:17:56 -0800
commit8f3a8f3e42217cc4886ca0e05a716a9941fa202f (patch)
treec90c0d919509239a8cc823c736aefea03817e3f4 /drivers
parentdede34130ccd28de174aba7aa4ddea9dd9d3c6d1 (diff)
downloadhistory-8f3a8f3e42217cc4886ca0e05a716a9941fa202f.tar.gz
[PATCH] InfiniBand/core: add QP number to work completion struct
InfiniBand spec rev 1.2 compliance: add local qp number to work completion structure. Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Roland Dreier <roland@topspin.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/infiniband/core/mad.c1
-rw-r--r--drivers/infiniband/hw/mthca/mthca_cq.c2
-rw-r--r--drivers/infiniband/include/ib_verbs.h1
3 files changed, 4 insertions, 0 deletions
diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c
index 0e721ad4d5efd1..79afb2130c6cf8 100644
--- a/drivers/infiniband/core/mad.c
+++ b/drivers/infiniband/core/mad.c
@@ -2025,6 +2025,7 @@ static void local_completions(void *data)
wc.slid = IB_LID_PERMISSIVE;
wc.sl = 0;
wc.dlid_path_bits = 0;
+ wc.qp_num = IB_QP0;
local->mad_priv->header.recv_wc.wc = &wc;
local->mad_priv->header.recv_wc.mad_len =
sizeof(struct ib_mad);
diff --git a/drivers/infiniband/hw/mthca/mthca_cq.c b/drivers/infiniband/hw/mthca/mthca_cq.c
index 8a4498f891673e..c66121c4905aa7 100644
--- a/drivers/infiniband/hw/mthca/mthca_cq.c
+++ b/drivers/infiniband/hw/mthca/mthca_cq.c
@@ -444,6 +444,8 @@ static inline int mthca_poll_one(struct mthca_dev *dev,
spin_lock(&(*cur_qp)->lock);
}
+ entry->qp_num = (*cur_qp)->qpn;
+
if (is_send) {
wq = &(*cur_qp)->sq;
wqe_index = ((be32_to_cpu(cqe->wqe) - (*cur_qp)->send_wqe_offset)
diff --git a/drivers/infiniband/include/ib_verbs.h b/drivers/infiniband/include/ib_verbs.h
index 78681c7ed3f06d..321c45f0e9f65a 100644
--- a/drivers/infiniband/include/ib_verbs.h
+++ b/drivers/infiniband/include/ib_verbs.h
@@ -352,6 +352,7 @@ struct ib_wc {
u32 vendor_err;
u32 byte_len;
__be32 imm_data;
+ u32 qp_num;
u32 src_qp;
int wc_flags;
u16 pkey_index;