Skip to content

Commit 8c1f19a

Browse files
tatyana-enrleon
authored andcommitted
RDMA/irdma: Update ibqp state to error if QP is already in error state
In irdma_modify_qp() update ibqp state to error if the irdma QP is already in error state, otherwise the ibqp state which is visible to the consumer app remains stale. Fixes: b48c24c ("RDMA/irdma: Implement device supported verb APIs") Signed-off-by: Tatyana Nikolova <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]>
1 parent 11a9552 commit 8c1f19a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/infiniband/hw/irdma/verbs.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1540,6 +1540,7 @@ int irdma_modify_qp_roce(struct ib_qp *ibqp, struct ib_qp_attr *attr,
15401540
case IB_QPS_ERR:
15411541
case IB_QPS_RESET:
15421542
if (iwqp->iwarp_state == IRDMA_QP_STATE_ERROR) {
1543+
iwqp->ibqp_state = attr->qp_state;
15431544
spin_unlock_irqrestore(&iwqp->lock, flags);
15441545
if (udata && udata->inlen) {
15451546
if (ib_copy_from_udata(&ureq, udata,
@@ -1745,6 +1746,7 @@ int irdma_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask,
17451746
case IB_QPS_ERR:
17461747
case IB_QPS_RESET:
17471748
if (iwqp->iwarp_state == IRDMA_QP_STATE_ERROR) {
1749+
iwqp->ibqp_state = attr->qp_state;
17481750
spin_unlock_irqrestore(&iwqp->lock, flags);
17491751
if (udata && udata->inlen) {
17501752
if (ib_copy_from_udata(&ureq, udata,

0 commit comments

Comments
 (0)