[ofa-general] [PATCH] mlx4: Fix the value of the pkey_index in the completion
Dotan Barak
dotanb at dev.mellanox.co.il
Sun Jan 6 23:01:25 PST 2008
Fix the value of the pkey_index in the completion to get a valid value for GSI QPs.
Without this fix, incoming GSI packets on port 2 gets invalid pkey index in the completion,
which prevent from the mad layer to send back a response.
Roland: can you please try to push this patch to kernel 2.6.24?
Signed-off-by: Dotan Barak <dotanb at dev.mellanox.co.il>
---
diff --git a/drivers/infiniband/hw/mlx4/cq.c b/drivers/infiniband/hw/mlx4/cq.c
index 8bf44da..608de9f 100644
--- a/drivers/infiniband/hw/mlx4/cq.c
+++ b/drivers/infiniband/hw/mlx4/cq.c
@@ -430,7 +430,7 @@ static int mlx4_ib_poll_one(struct mlx4_ib_cq *cq,
wc->dlid_path_bits = (be32_to_cpu(cqe->g_mlpath_rqpn) >> 24) & 0x7f;
wc->wc_flags |= be32_to_cpu(cqe->g_mlpath_rqpn) & 0x80000000 ?
IB_WC_GRH : 0;
- wc->pkey_index = be32_to_cpu(cqe->immed_rss_invalid) >> 16;
+ wc->pkey_index = (u16)(be32_to_cpu(cqe->immed_rss_invalid) & 0x7f);
}
return 0;
More information about the general
mailing list