Commit 5a648dfa authored by Mike Marciniszyn's avatar Mike Marciniszyn Committed by Doug Ledford

IB/hfi1: Move iowait_init() to priv allocate

The call is misplaced in the reset calldown function
and causes issues with lockdep assertions that are to
be added.

Fixes: Commit a2c2d608 ("staging/rdma/hfi1: Remove create_qp functionality")
Reviewed-by: default avatarIra Weiny <ira.weiny@intel.com>
Reviewed-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: default avatarMike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent eefa1d89
...@@ -806,6 +806,13 @@ void *qp_priv_alloc(struct rvt_dev_info *rdi, struct rvt_qp *qp, ...@@ -806,6 +806,13 @@ void *qp_priv_alloc(struct rvt_dev_info *rdi, struct rvt_qp *qp,
kfree(priv); kfree(priv);
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
} }
iowait_init(
&priv->s_iowait,
1,
_hfi1_do_send,
iowait_sleep,
iowait_wakeup,
iowait_sdma_drained);
setup_timer(&priv->s_rnr_timer, hfi1_rc_rnr_retry, (unsigned long)qp); setup_timer(&priv->s_rnr_timer, hfi1_rc_rnr_retry, (unsigned long)qp);
qp->s_timer.function = hfi1_rc_timeout; qp->s_timer.function = hfi1_rc_timeout;
return priv; return priv;
...@@ -871,13 +878,6 @@ void notify_qp_reset(struct rvt_qp *qp) ...@@ -871,13 +878,6 @@ void notify_qp_reset(struct rvt_qp *qp)
{ {
struct hfi1_qp_priv *priv = qp->priv; struct hfi1_qp_priv *priv = qp->priv;
iowait_init(
&priv->s_iowait,
1,
_hfi1_do_send,
iowait_sleep,
iowait_wakeup,
iowait_sdma_drained);
priv->r_adefered = 0; priv->r_adefered = 0;
clear_ahg(qp); clear_ahg(qp);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment