summaryrefslogtreecommitdiff
path: root/drivers/net/bnx2.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-06-12 02:22:02 -0700
committerDavid S. Miller <davem@davemloft.net>2008-06-12 02:22:02 -0700
commit4bb073c0e32a0862bdb5215d11af19f6c0180c98 (patch)
tree009d95592e3813346c75129bb19d140d393ca913 /drivers/net/bnx2.h
parent7afb380db43ed137b7f67e0e3c3e5afd1ecde730 (diff)
downloadlinux-3.10-4bb073c0e32a0862bdb5215d11af19f6c0180c98.tar.gz
linux-3.10-4bb073c0e32a0862bdb5215d11af19f6c0180c98.tar.bz2
linux-3.10-4bb073c0e32a0862bdb5215d11af19f6c0180c98.zip
net: Eliminate flush_scheduled_work() calls while RTNL is held.
If the RTNL is held when we invoke flush_scheduled_work() we could deadlock. One such case is linkwatch, it is a work struct which tries to grab the RTNL semaphore. The most common case are net driver ->stop() methods. The simplest conversion is to instead use cancel_{delayed_}work_sync() explicitly on the various work struct the driver uses. This is an OK transformation because these work structs are doing things like resetting the chip, restarting link negotiation, and so forth. And if we're bringing down the device, we're about to turn the chip off and reset it anways. So if we cancel a pending work event, that's fine here. Some drivers were working around this deadlock by using a msleep() polling loop of some sort, and those cases are converted to instead use cancel_{delayed_}work_sync() as well. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2.h')
-rw-r--r--drivers/net/bnx2.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/net/bnx2.h b/drivers/net/bnx2.h
index 1eaf5bb3d9c..2377cc13bf6 100644
--- a/drivers/net/bnx2.h
+++ b/drivers/net/bnx2.h
@@ -6656,7 +6656,6 @@ struct bnx2 {
int current_interval;
struct timer_list timer;
struct work_struct reset_task;
- int in_reset_task;
/* Used to synchronize phy accesses. */
spinlock_t phy_lock;