summaryrefslogtreecommitdiffstats
path: root/drivers/net/tg3.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2007-05-09 02:33:57 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-09 12:30:51 -0700
commit2b3cb2e778811a1df99e37fd7c359837501ab103 (patch)
tree736b6e149fababf75b1bd0d94a316b790e7f59ae /drivers/net/tg3.c
parent19a75d83ffeab004cfcfac64024ad3997bac7220 (diff)
downloadop-kernel-dev-2b3cb2e778811a1df99e37fd7c359837501ab103.zip
op-kernel-dev-2b3cb2e778811a1df99e37fd7c359837501ab103.tar.gz
tg3: use flush_work_keventd()
Convert tg3 over to flush_work_keventd(). Remove nasty now-unneeded deadlock avoidance logic. (akpm: bypassed maintainers, sorry. There are other patches which depend on this) Cc: "Maciej W. Rozycki" <macro@linux-mips.org> Cc: David Howells <dhowells@redhat.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Michael Chan <mchan@broadcom.com> Cc: Jeff Garzik <jeff@garzik.org> Cc: Oleg Nesterov <oleg@tv-sign.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/net/tg3.c')
-rw-r--r--drivers/net/tg3.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index e5e901e..0c0f9c8 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -3716,10 +3716,8 @@ static void tg3_reset_task(struct work_struct *work)
unsigned int restart_timer;
tg3_full_lock(tp, 0);
- tp->tg3_flags |= TG3_FLAG_IN_RESET_TASK;
if (!netif_running(tp->dev)) {
- tp->tg3_flags &= ~TG3_FLAG_IN_RESET_TASK;
tg3_full_unlock(tp);
return;
}
@@ -3750,8 +3748,6 @@ static void tg3_reset_task(struct work_struct *work)
mod_timer(&tp->timer, jiffies + 1);
out:
- tp->tg3_flags &= ~TG3_FLAG_IN_RESET_TASK;
-
tg3_full_unlock(tp);
}
@@ -7390,12 +7386,7 @@ static int tg3_close(struct net_device *dev)
{
struct tg3 *tp = netdev_priv(dev);
- /* Calling flush_scheduled_work() may deadlock because
- * linkwatch_event() may be on the workqueue and it will try to get
- * the rtnl_lock which we are holding.
- */
- while (tp->tg3_flags & TG3_FLAG_IN_RESET_TASK)
- msleep(1);
+ flush_work_keventd(&tp->reset_task);
netif_stop_queue(dev);
OpenPOWER on IntegriCloud