diff options
| -rw-r--r-- | drivers/infiniband/hw/ehca/ehca_qp.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_qp.c b/drivers/infiniband/hw/ehca/ehca_qp.c index ea13efddf175..c58fd4eead18 100644 --- a/drivers/infiniband/hw/ehca/ehca_qp.c +++ b/drivers/infiniband/hw/ehca/ehca_qp.c | |||
| @@ -1534,8 +1534,6 @@ static int internal_modify_qp(struct ib_qp *ibqp, | |||
| 1534 | if (attr_mask & IB_QP_QKEY) | 1534 | if (attr_mask & IB_QP_QKEY) |
| 1535 | my_qp->qkey = attr->qkey; | 1535 | my_qp->qkey = attr->qkey; |
| 1536 | 1536 | ||
| 1537 | my_qp->state = qp_new_state; | ||
| 1538 | |||
| 1539 | modify_qp_exit2: | 1537 | modify_qp_exit2: |
| 1540 | if (squeue_locked) { /* this means: sqe -> rts */ | 1538 | if (squeue_locked) { /* this means: sqe -> rts */ |
| 1541 | spin_unlock_irqrestore(&my_qp->spinlock_s, flags); | 1539 | spin_unlock_irqrestore(&my_qp->spinlock_s, flags); |
| @@ -1551,6 +1549,8 @@ modify_qp_exit1: | |||
| 1551 | int ehca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask, | 1549 | int ehca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask, |
| 1552 | struct ib_udata *udata) | 1550 | struct ib_udata *udata) |
| 1553 | { | 1551 | { |
| 1552 | int ret = 0; | ||
| 1553 | |||
| 1554 | struct ehca_shca *shca = container_of(ibqp->device, struct ehca_shca, | 1554 | struct ehca_shca *shca = container_of(ibqp->device, struct ehca_shca, |
| 1555 | ib_device); | 1555 | ib_device); |
| 1556 | struct ehca_qp *my_qp = container_of(ibqp, struct ehca_qp, ib_qp); | 1556 | struct ehca_qp *my_qp = container_of(ibqp, struct ehca_qp, ib_qp); |
| @@ -1597,12 +1597,18 @@ int ehca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask, | |||
| 1597 | attr->qp_state, my_qp->init_attr.port_num, | 1597 | attr->qp_state, my_qp->init_attr.port_num, |
| 1598 | ibqp->qp_type); | 1598 | ibqp->qp_type); |
| 1599 | spin_unlock_irqrestore(&sport->mod_sqp_lock, flags); | 1599 | spin_unlock_irqrestore(&sport->mod_sqp_lock, flags); |
| 1600 | return 0; | 1600 | goto out; |
| 1601 | } | 1601 | } |
| 1602 | spin_unlock_irqrestore(&sport->mod_sqp_lock, flags); | 1602 | spin_unlock_irqrestore(&sport->mod_sqp_lock, flags); |
| 1603 | } | 1603 | } |
| 1604 | 1604 | ||
| 1605 | return internal_modify_qp(ibqp, attr, attr_mask, 0); | 1605 | ret = internal_modify_qp(ibqp, attr, attr_mask, 0); |
| 1606 | |||
| 1607 | out: | ||
| 1608 | if ((ret == 0) && (attr_mask & IB_QP_STATE)) | ||
| 1609 | my_qp->state = attr->qp_state; | ||
| 1610 | |||
| 1611 | return ret; | ||
| 1606 | } | 1612 | } |
| 1607 | 1613 | ||
| 1608 | void ehca_recover_sqp(struct ib_qp *sqp) | 1614 | void ehca_recover_sqp(struct ib_qp *sqp) |
