diff options
author | Tejun Heo <tj@kernel.org> | 2010-12-12 10:45:14 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2010-12-12 10:45:14 -0500 |
commit | 760141a53e5d72d4cc1d8c6e2a0232a24bedb36b (patch) | |
tree | 662158c0c23ee16e2bc16d9ba53eeadc6d9fa17e /drivers/net/igb | |
parent | 9beb4896cec71e40738a7752072174fbf0d5b7b4 (diff) |
igb[v],ixgbe: don't use flush_scheduled_work()
All three drivers use flush_scheduled_work() similarly during driver
detach. Replace it with explicit cancels.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: e1000-devel@lists.sourceforge.net
Cc: netdev@vger.kernel.org
Diffstat (limited to 'drivers/net/igb')
-rw-r--r-- | drivers/net/igb/igb_main.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index 041f8e6f74f4..62348fc60e53 100644 --- a/drivers/net/igb/igb_main.c +++ b/drivers/net/igb/igb_main.c | |||
@@ -2050,13 +2050,16 @@ static void __devexit igb_remove(struct pci_dev *pdev) | |||
2050 | struct igb_adapter *adapter = netdev_priv(netdev); | 2050 | struct igb_adapter *adapter = netdev_priv(netdev); |
2051 | struct e1000_hw *hw = &adapter->hw; | 2051 | struct e1000_hw *hw = &adapter->hw; |
2052 | 2052 | ||
2053 | /* flush_scheduled work may reschedule our watchdog task, so | 2053 | /* |
2054 | * explicitly disable watchdog tasks from being rescheduled */ | 2054 | * The watchdog timer may be rescheduled, so explicitly |
2055 | * disable watchdog from being rescheduled. | ||
2056 | */ | ||
2055 | set_bit(__IGB_DOWN, &adapter->state); | 2057 | set_bit(__IGB_DOWN, &adapter->state); |
2056 | del_timer_sync(&adapter->watchdog_timer); | 2058 | del_timer_sync(&adapter->watchdog_timer); |
2057 | del_timer_sync(&adapter->phy_info_timer); | 2059 | del_timer_sync(&adapter->phy_info_timer); |
2058 | 2060 | ||
2059 | flush_scheduled_work(); | 2061 | cancel_work_sync(&adapter->reset_task); |
2062 | cancel_work_sync(&adapter->watchdog_task); | ||
2060 | 2063 | ||
2061 | #ifdef CONFIG_IGB_DCA | 2064 | #ifdef CONFIG_IGB_DCA |
2062 | if (adapter->flags & IGB_FLAG_DCA_ENABLED) { | 2065 | if (adapter->flags & IGB_FLAG_DCA_ENABLED) { |