diff options
-rw-r--r-- | drivers/net/bnx2.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index ab0068c7070a..188e356c30a3 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -656,19 +656,11 @@ bnx2_netif_stop(struct bnx2 *bp, bool stop_cnic) | |||
656 | if (stop_cnic) | 656 | if (stop_cnic) |
657 | bnx2_cnic_stop(bp); | 657 | bnx2_cnic_stop(bp); |
658 | if (netif_running(bp->dev)) { | 658 | if (netif_running(bp->dev)) { |
659 | int i; | ||
660 | |||
661 | bnx2_napi_disable(bp); | 659 | bnx2_napi_disable(bp); |
662 | netif_tx_disable(bp->dev); | 660 | netif_tx_disable(bp->dev); |
663 | /* prevent tx timeout */ | ||
664 | for (i = 0; i < bp->dev->num_tx_queues; i++) { | ||
665 | struct netdev_queue *txq; | ||
666 | |||
667 | txq = netdev_get_tx_queue(bp->dev, i); | ||
668 | txq->trans_start = jiffies; | ||
669 | } | ||
670 | } | 661 | } |
671 | bnx2_disable_int_sync(bp); | 662 | bnx2_disable_int_sync(bp); |
663 | netif_carrier_off(bp->dev); /* prevent tx timeout */ | ||
672 | } | 664 | } |
673 | 665 | ||
674 | static void | 666 | static void |
@@ -677,6 +669,10 @@ bnx2_netif_start(struct bnx2 *bp, bool start_cnic) | |||
677 | if (atomic_dec_and_test(&bp->intr_sem)) { | 669 | if (atomic_dec_and_test(&bp->intr_sem)) { |
678 | if (netif_running(bp->dev)) { | 670 | if (netif_running(bp->dev)) { |
679 | netif_tx_wake_all_queues(bp->dev); | 671 | netif_tx_wake_all_queues(bp->dev); |
672 | spin_lock_bh(&bp->phy_lock); | ||
673 | if (bp->link_up) | ||
674 | netif_carrier_on(bp->dev); | ||
675 | spin_unlock_bh(&bp->phy_lock); | ||
680 | bnx2_napi_enable(bp); | 676 | bnx2_napi_enable(bp); |
681 | bnx2_enable_int(bp); | 677 | bnx2_enable_int(bp); |
682 | if (start_cnic) | 678 | if (start_cnic) |