Skip to content

Commit

Permalink
IB/ehca: Fix CQE flags reporting
Browse files Browse the repository at this point in the history
The driver was reporting CQE flags in the wrong bit positions, causing
consumers to miss incoming immediate data.

Signed-off-by: Joachim Fenkes <[email protected]>
Signed-off-by: Roland Dreier <[email protected]>
  • Loading branch information
fenkes-ibm authored and Roland Dreier committed Sep 6, 2009
1 parent d706834 commit 6303e74
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/infiniband/hw/ehca/ehca_reqs.c
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,11 @@ static inline int ehca_poll_cq_one(struct ib_cq *cq, struct ib_wc *wc)
wc->slid = cqe->rlid;
wc->dlid_path_bits = cqe->dlid;
wc->src_qp = cqe->remote_qp_number;
wc->wc_flags = cqe->w_completion_flags;
/*
* HW has "Immed data present" and "GRH present" in bits 6 and 5.
* SW defines those in bits 1 and 0, so we can just shift and mask.
*/
wc->wc_flags = (cqe->w_completion_flags >> 5) & 3;
wc->ex.imm_data = cpu_to_be32(cqe->immediate_data);
wc->sl = cqe->service_level;

Expand Down

0 comments on commit 6303e74

Please sign in to comment.