Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6303e74c authored by Joachim Fenkes's avatar Joachim Fenkes Committed by Roland Dreier
Browse files

IB/ehca: Fix CQE flags reporting



The driver was reporting CQE flags in the wrong bit positions, causing
consumers to miss incoming immediate data.

Signed-off-by: default avatarJoachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent d706834d
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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;