aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/bnx2.c')
-rw-r--r--drivers/net/bnx2.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index b32d22762b9b..2c52d2c7c495 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -5664,14 +5664,12 @@ bnx2_reset_task(struct work_struct *work)
5664 if (!netif_running(bp->dev)) 5664 if (!netif_running(bp->dev))
5665 return; 5665 return;
5666 5666
5667 bp->in_reset_task = 1;
5668 bnx2_netif_stop(bp); 5667 bnx2_netif_stop(bp);
5669 5668
5670 bnx2_init_nic(bp, 1); 5669 bnx2_init_nic(bp, 1);
5671 5670
5672 atomic_set(&bp->intr_sem, 1); 5671 atomic_set(&bp->intr_sem, 1);
5673 bnx2_netif_start(bp); 5672 bnx2_netif_start(bp);
5674 bp->in_reset_task = 0;
5675} 5673}
5676 5674
5677static void 5675static void
@@ -5847,12 +5845,7 @@ bnx2_close(struct net_device *dev)
5847 struct bnx2 *bp = netdev_priv(dev); 5845 struct bnx2 *bp = netdev_priv(dev);
5848 u32 reset_code; 5846 u32 reset_code;
5849 5847
5850 /* Calling flush_scheduled_work() may deadlock because 5848 cancel_work_sync(&bp->reset_task);
5851 * linkwatch_event() may be on the workqueue and it will try to get
5852 * the rtnl_lock which we are holding.
5853 */
5854 while (bp->in_reset_task)
5855 msleep(1);
5856 5849
5857 bnx2_disable_int_sync(bp); 5850 bnx2_disable_int_sync(bp);
5858 bnx2_napi_disable(bp); 5851 bnx2_napi_disable(bp);