IB/rdmavt, IB/qib, IB/hfi1: Use new QP put get routines
This improves readability and hides the reference count mechanism from the client drivers. Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:

committed by
Doug Ledford

parent
4107b8a029
commit
4d6f85c3fa
@@ -588,8 +588,7 @@ move_along:
|
||||
qib_schedule_send(qp);
|
||||
spin_unlock_irqrestore(&qp->s_lock, flags);
|
||||
}
|
||||
if (atomic_dec_and_test(&qp->refcount))
|
||||
wake_up(&qp->wait);
|
||||
rvt_put_qp(qp);
|
||||
}
|
||||
|
||||
bail:
|
||||
|
@@ -1177,7 +1177,7 @@ static int do_rc_ack(struct rvt_qp *qp, u32 aeth, u32 psn, int opcode,
|
||||
qib_restart_rc(qp, qp->s_last_psn + 1, 0);
|
||||
if (list_empty(&qp->rspwait)) {
|
||||
qp->r_flags |= RVT_R_RSP_SEND;
|
||||
atomic_inc(&qp->refcount);
|
||||
rvt_get_qp(qp);
|
||||
list_add_tail(&qp->rspwait,
|
||||
&rcd->qp_wait_list);
|
||||
}
|
||||
@@ -1361,7 +1361,7 @@ static void rdma_seq_err(struct rvt_qp *qp, struct qib_ibport *ibp, u32 psn,
|
||||
qib_restart_rc(qp, qp->s_last_psn + 1, 0);
|
||||
if (list_empty(&qp->rspwait)) {
|
||||
qp->r_flags |= RVT_R_RSP_SEND;
|
||||
atomic_inc(&qp->refcount);
|
||||
rvt_get_qp(qp);
|
||||
list_add_tail(&qp->rspwait, &rcd->qp_wait_list);
|
||||
}
|
||||
}
|
||||
@@ -1640,7 +1640,7 @@ static int qib_rc_rcv_error(struct qib_other_headers *ohdr,
|
||||
*/
|
||||
if (list_empty(&qp->rspwait)) {
|
||||
qp->r_flags |= RVT_R_RSP_NAK;
|
||||
atomic_inc(&qp->refcount);
|
||||
rvt_get_qp(qp);
|
||||
list_add_tail(&qp->rspwait, &rcd->qp_wait_list);
|
||||
}
|
||||
}
|
||||
@@ -2233,7 +2233,7 @@ rnr_nak:
|
||||
/* Queue RNR NAK for later */
|
||||
if (list_empty(&qp->rspwait)) {
|
||||
qp->r_flags |= RVT_R_RSP_NAK;
|
||||
atomic_inc(&qp->refcount);
|
||||
rvt_get_qp(qp);
|
||||
list_add_tail(&qp->rspwait, &rcd->qp_wait_list);
|
||||
}
|
||||
return;
|
||||
@@ -2245,7 +2245,7 @@ nack_op_err:
|
||||
/* Queue NAK for later */
|
||||
if (list_empty(&qp->rspwait)) {
|
||||
qp->r_flags |= RVT_R_RSP_NAK;
|
||||
atomic_inc(&qp->refcount);
|
||||
rvt_get_qp(qp);
|
||||
list_add_tail(&qp->rspwait, &rcd->qp_wait_list);
|
||||
}
|
||||
return;
|
||||
@@ -2259,7 +2259,7 @@ nack_inv:
|
||||
/* Queue NAK for later */
|
||||
if (list_empty(&qp->rspwait)) {
|
||||
qp->r_flags |= RVT_R_RSP_NAK;
|
||||
atomic_inc(&qp->refcount);
|
||||
rvt_get_qp(qp);
|
||||
list_add_tail(&qp->rspwait, &rcd->qp_wait_list);
|
||||
}
|
||||
return;
|
||||
|
Reference in New Issue
Block a user