aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRoland Dreier <roland@topspin.com>2005-01-14 23:17:42 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-14 23:17:42 -0800
commitdede34130ccd28de174aba7aa4ddea9dd9d3c6d1 (patch)
tree25a82d531d3eae7014f68e1d161913e22d207be5 /drivers
parentd8628f05c01524369e503c53f4ed365d6f636925 (diff)
downloadhistory-dede34130ccd28de174aba7aa4ddea9dd9d3c6d1.tar.gz
[PATCH] InfiniBand/core: set byte_cnt correctly in MAD completion
Integrate Michael Tsirkin's patch to local_completion to set the WC byte_cnt according to the IBA 1.1 spec (include the GRH size regardless of whether it is present or not). Signed-off-by: Hal Rosenstock <halr@voltaire.com> 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.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c
index 35872866fda26f..0e721ad4d5efd1 100644
--- a/drivers/infiniband/core/mad.c
+++ b/drivers/infiniband/core/mad.c
@@ -2017,9 +2017,10 @@ static void local_completions(void *data)
wc.status = IB_WC_SUCCESS;
wc.opcode = IB_WC_RECV;
wc.vendor_err = 0;
- wc.byte_len = sizeof(struct ib_mad);
+ wc.byte_len = sizeof(struct ib_mad) +
+ sizeof(struct ib_grh);
wc.src_qp = IB_QP0;
- wc.wc_flags = 0;
+ wc.wc_flags = 0; /* No GRH */
wc.pkey_index = 0;
wc.slid = IB_LID_PERMISSIVE;
wc.sl = 0;