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

Commit 088af154 authored by Joachim Fenkes's avatar Joachim Fenkes Committed by Roland Dreier
Browse files

IB/ehca: Reject send WRs only for RESET, INIT and RTR state

parent 5f625606
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -421,8 +421,10 @@ int ehca_post_send(struct ib_qp *qp,
	int ret = 0;
	unsigned long flags;

	if (unlikely(my_qp->state != IB_QPS_RTS)) {
		ehca_err(qp->device, "QP not in RTS state  qpn=%x", qp->qp_num);
	/* Reject WR if QP is in RESET, INIT or RTR state */
	if (unlikely(my_qp->state < IB_QPS_RTS)) {
		ehca_err(qp->device, "Invalid QP state  qp_state=%d qpn=%x",
			 my_qp->state, qp->qp_num);
		return -EINVAL;
	}