|
@@ -1534,8 +1534,6 @@ static int internal_modify_qp(struct ib_qp *ibqp,
|
|
if (attr_mask & IB_QP_QKEY)
|
|
if (attr_mask & IB_QP_QKEY)
|
|
my_qp->qkey = attr->qkey;
|
|
my_qp->qkey = attr->qkey;
|
|
|
|
|
|
- my_qp->state = qp_new_state;
|
|
|
|
-
|
|
|
|
modify_qp_exit2:
|
|
modify_qp_exit2:
|
|
if (squeue_locked) { /* this means: sqe -> rts */
|
|
if (squeue_locked) { /* this means: sqe -> rts */
|
|
spin_unlock_irqrestore(&my_qp->spinlock_s, flags);
|
|
spin_unlock_irqrestore(&my_qp->spinlock_s, flags);
|
|
@@ -1551,6 +1549,8 @@ modify_qp_exit1:
|
|
int ehca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask,
|
|
int ehca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask,
|
|
struct ib_udata *udata)
|
|
struct ib_udata *udata)
|
|
{
|
|
{
|
|
|
|
+ int ret = 0;
|
|
|
|
+
|
|
struct ehca_shca *shca = container_of(ibqp->device, struct ehca_shca,
|
|
struct ehca_shca *shca = container_of(ibqp->device, struct ehca_shca,
|
|
ib_device);
|
|
ib_device);
|
|
struct ehca_qp *my_qp = container_of(ibqp, struct ehca_qp, ib_qp);
|
|
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,
|
|
attr->qp_state, my_qp->init_attr.port_num,
|
|
attr->qp_state, my_qp->init_attr.port_num,
|
|
ibqp->qp_type);
|
|
ibqp->qp_type);
|
|
spin_unlock_irqrestore(&sport->mod_sqp_lock, flags);
|
|
spin_unlock_irqrestore(&sport->mod_sqp_lock, flags);
|
|
- return 0;
|
|
|
|
|
|
+ goto out;
|
|
}
|
|
}
|
|
spin_unlock_irqrestore(&sport->mod_sqp_lock, flags);
|
|
spin_unlock_irqrestore(&sport->mod_sqp_lock, flags);
|
|
}
|
|
}
|
|
|
|
|
|
- return internal_modify_qp(ibqp, attr, attr_mask, 0);
|
|
|
|
|
|
+ ret = internal_modify_qp(ibqp, attr, attr_mask, 0);
|
|
|
|
+
|
|
|
|
+out:
|
|
|
|
+ if ((ret == 0) && (attr_mask & IB_QP_STATE))
|
|
|
|
+ my_qp->state = attr->qp_state;
|
|
|
|
+
|
|
|
|
+ return ret;
|
|
}
|
|
}
|
|
|
|
|
|
void ehca_recover_sqp(struct ib_qp *sqp)
|
|
void ehca_recover_sqp(struct ib_qp *sqp)
|