bnx2x: Adapter not recovery from EEH error injection
authorwenxiong@linux.vnet.ibm.com <wenxiong@linux.vnet.ibm.com>
Tue, 3 Jun 2014 19:14:45 +0000 (14:14 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 4 Jun 2014 01:37:38 +0000 (18:37 -0700)
When injecting EEH error to bnx2x adapter, adapter couldn't be recovery
and caused recursive EEH errors. The patch fixes the issue.

Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c

index 3b0d43154e677bfe8fd1f66aac7d3c0a6afbcfd5..6fa9cd4758884eb789dfc15d0f0a7139fdf7b731 100644 (file)
@@ -13283,8 +13283,8 @@ static int bnx2x_eeh_nic_unload(struct bnx2x *bp)
        netdev_reset_tc(bp->dev);
 
        del_timer_sync(&bp->timer);
-       cancel_delayed_work(&bp->sp_task);
-       cancel_delayed_work(&bp->period_task);
+       cancel_delayed_work_sync(&bp->sp_task);
+       cancel_delayed_work_sync(&bp->period_task);
 
        spin_lock_bh(&bp->stats_lock);
        bp->stats_state = STATS_STATE_DISABLED;