Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 5216
b: refs/heads/master
c: 29bb33d
h: refs/heads/master
v: v3
  • Loading branch information
Hal Rosenstock authored and Linus Torvalds committed Jul 27, 2005
1 parent a80d81f commit d464647
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 03b61ad2f29295f019e095d0f490f30a4d678d3f
refs/heads/master: 29bb33dd87dbe8db07c2b19df3fb453d999c96de
21 changes: 13 additions & 8 deletions trunk/drivers/infiniband/core/mad.c
Original file line number Diff line number Diff line change
Expand Up @@ -1754,14 +1754,18 @@ static void wait_for_response(struct ib_mad_send_wr_private *mad_send_wr)
delay = mad_send_wr->timeout;
mad_send_wr->timeout += jiffies;

list_for_each_prev(list_item, &mad_agent_priv->wait_list) {
temp_mad_send_wr = list_entry(list_item,
struct ib_mad_send_wr_private,
agent_list);
if (time_after(mad_send_wr->timeout,
temp_mad_send_wr->timeout))
break;
if (delay) {
list_for_each_prev(list_item, &mad_agent_priv->wait_list) {
temp_mad_send_wr = list_entry(list_item,
struct ib_mad_send_wr_private,
agent_list);
if (time_after(mad_send_wr->timeout,
temp_mad_send_wr->timeout))
break;
}
}
else
list_item = &mad_agent_priv->wait_list;
list_add(&mad_send_wr->agent_list, list_item);

/* Reschedule a work item if we have a shorter timeout */
Expand Down Expand Up @@ -2197,7 +2201,8 @@ static void timeout_sends(void *data)
}

list_del(&mad_send_wr->agent_list);
if (!retry_send(mad_send_wr))
if (mad_send_wr->status == IB_WC_SUCCESS &&
!retry_send(mad_send_wr))
continue;

spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
Expand Down

0 comments on commit d464647

Please sign in to comment.