Commit 34cee28f authored by Mike Marciniszyn's avatar Mike Marciniszyn Committed by Doug Ledford

staging/rdma/hfi1: actually use new RNR timer API in loopback path

The patch series which added a new API for the RNR timer did not include an
updated call in the loopback path. RC/UC RNR loopback would be broken
without this.
Reviewed-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: default avatarMike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 97167e81
......@@ -81,7 +81,7 @@ static inline void hfi1_add_retry_timer(struct rvt_qp *qp)
*
* add an rnr timer on the QP
*/
static inline void hfi1_add_rnr_timer(struct rvt_qp *qp, u32 to)
void hfi1_add_rnr_timer(struct rvt_qp *qp, u32 to)
{
struct hfi1_qp_priv *priv = qp->priv;
......
......@@ -371,6 +371,7 @@ static void ruc_loopback(struct rvt_qp *sqp)
int release;
int ret;
int copy_last = 0;
u32 to;
rcu_read_lock();
......@@ -600,11 +601,8 @@ static void ruc_loopback(struct rvt_qp *sqp)
spin_lock_irqsave(&sqp->s_lock, flags);
if (!(ib_rvt_state_ops[sqp->state] & RVT_PROCESS_RECV_OK))
goto clr_busy;
sqp->s_flags |= RVT_S_WAIT_RNR;
sqp->s_timer.function = hfi1_rc_rnr_retry;
sqp->s_timer.expires = jiffies +
usecs_to_jiffies(ib_hfi1_rnr_table[qp->r_min_rnr_timer]);
add_timer(&sqp->s_timer);
to = ib_hfi1_rnr_table[qp->r_min_rnr_timer];
hfi1_add_rnr_timer(sqp, to);
goto clr_busy;
op_err:
......
......@@ -404,6 +404,7 @@ u8 ah_to_sc(struct ib_device *ibdev, struct ib_ah_attr *ah_attr);
struct ib_ah *hfi1_create_qp0_ah(struct hfi1_ibport *ibp, u16 dlid);
void hfi1_rc_rnr_retry(unsigned long arg);
void hfi1_add_rnr_timer(struct rvt_qp *qp, u32 to);
void hfi1_rc_timeout(unsigned long arg);
void hfi1_del_timers_sync(struct rvt_qp *qp);
void hfi1_stop_rc_timers(struct rvt_qp *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