Skip to content

Commit

Permalink
IB/ehca: Reject send WRs only for RESET, INIT and RTR state
Browse files Browse the repository at this point in the history
Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
  • Loading branch information
Joachim Fenkes authored and Roland Dreier committed Jun 6, 2008
1 parent 5f62560 commit 088af15
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/infiniband/hw/ehca/ehca_reqs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 088af15

Please sign in to comment.