|
@@ -2013,13 +2013,11 @@ static void adjust_timeout(struct ib_mad_agent_private *mad_agent_priv)
|
|
|
if (time_after(mad_agent_priv->timeout,
|
|
|
mad_send_wr->timeout)) {
|
|
|
mad_agent_priv->timeout = mad_send_wr->timeout;
|
|
|
- __cancel_delayed_work(&mad_agent_priv->timed_work);
|
|
|
delay = mad_send_wr->timeout - jiffies;
|
|
|
if ((long)delay <= 0)
|
|
|
delay = 1;
|
|
|
- queue_delayed_work(mad_agent_priv->qp_info->
|
|
|
- port_priv->wq,
|
|
|
- &mad_agent_priv->timed_work, delay);
|
|
|
+ mod_delayed_work(mad_agent_priv->qp_info->port_priv->wq,
|
|
|
+ &mad_agent_priv->timed_work, delay);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -2052,11 +2050,9 @@ static void wait_for_response(struct ib_mad_send_wr_private *mad_send_wr)
|
|
|
list_add(&mad_send_wr->agent_list, list_item);
|
|
|
|
|
|
/* Reschedule a work item if we have a shorter timeout */
|
|
|
- if (mad_agent_priv->wait_list.next == &mad_send_wr->agent_list) {
|
|
|
- __cancel_delayed_work(&mad_agent_priv->timed_work);
|
|
|
- queue_delayed_work(mad_agent_priv->qp_info->port_priv->wq,
|
|
|
- &mad_agent_priv->timed_work, delay);
|
|
|
- }
|
|
|
+ if (mad_agent_priv->wait_list.next == &mad_send_wr->agent_list)
|
|
|
+ mod_delayed_work(mad_agent_priv->qp_info->port_priv->wq,
|
|
|
+ &mad_agent_priv->timed_work, delay);
|
|
|
}
|
|
|
|
|
|
void ib_reset_mad_timeout(struct ib_mad_send_wr_private *mad_send_wr,
|