Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 358858
b: refs/heads/master
c: 1ec779c
h: refs/heads/master
v: v3
  • Loading branch information
Vipul Pandya authored and Roland Dreier committed Feb 14, 2013
1 parent b5f2286 commit 4eb867b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 14 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: e8e5b9278ba0502ada73b8b94b8498cc19def743
refs/heads/master: 1ec779cc29238e6f4d315bff53cd36165819bfd5
29 changes: 16 additions & 13 deletions trunk/drivers/infiniband/hw/cxgb4/cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,12 @@ static void start_ep_timer(struct c4iw_ep *ep)
{
PDBG("%s ep %p\n", __func__, ep);
if (timer_pending(&ep->timer)) {
PDBG("%s stopped / restarted timer ep %p\n", __func__, ep);
del_timer_sync(&ep->timer);
} else
c4iw_get_ep(&ep->com);
pr_err("%s timer already started! ep %p\n",
__func__, ep);
return;
}
clear_bit(TIMEOUT, &ep->com.flags);
c4iw_get_ep(&ep->com);
ep->timer.expires = jiffies + ep_timeout_secs * HZ;
ep->timer.data = (unsigned long)ep;
ep->timer.function = ep_timeout;
Expand All @@ -171,14 +173,10 @@ static void start_ep_timer(struct c4iw_ep *ep)

static void stop_ep_timer(struct c4iw_ep *ep)
{
PDBG("%s ep %p\n", __func__, ep);
if (!timer_pending(&ep->timer)) {
WARN(1, "%s timer stopped when its not running! "
"ep %p state %u\n", __func__, ep, ep->com.state);
return;
}
PDBG("%s ep %p stopping\n", __func__, ep);
del_timer_sync(&ep->timer);
c4iw_put_ep(&ep->com);
if (!test_and_set_bit(TIMEOUT, &ep->com.flags))
c4iw_put_ep(&ep->com);
}

static int c4iw_l2t_send(struct c4iw_rdev *rdev, struct sk_buff *skb,
Expand Down Expand Up @@ -3191,11 +3189,16 @@ static DECLARE_WORK(skb_work, process_work);
static void ep_timeout(unsigned long arg)
{
struct c4iw_ep *ep = (struct c4iw_ep *)arg;
int kickit = 0;

spin_lock(&timeout_lock);
list_add_tail(&ep->entry, &timeout_list);
if (!test_and_set_bit(TIMEOUT, &ep->com.flags)) {
list_add_tail(&ep->entry, &timeout_list);
kickit = 1;
}
spin_unlock(&timeout_lock);
queue_work(workq, &skb_work);
if (kickit)
queue_work(workq, &skb_work);
}

/*
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/infiniband/hw/cxgb4/iw_cxgb4.h
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,7 @@ enum c4iw_ep_flags {
ABORT_REQ_IN_PROGRESS = 1,
RELEASE_RESOURCES = 2,
CLOSE_SENT = 3,
TIMEOUT = 4,
QP_REFERENCED = 5,
};

Expand Down

0 comments on commit 4eb867b

Please sign in to comment.