diff options
Diffstat (limited to 'drivers/net/tg3.c')
-rw-r--r-- | drivers/net/tg3.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 2a771fd4c7cd..82afd26a829f 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -5894,6 +5894,9 @@ static int tg3_test_interrupt(struct tg3 *tp) | |||
5894 | int err, i; | 5894 | int err, i; |
5895 | u32 int_mbox = 0; | 5895 | u32 int_mbox = 0; |
5896 | 5896 | ||
5897 | if (!netif_running(dev)) | ||
5898 | return -ENODEV; | ||
5899 | |||
5897 | tg3_disable_ints(tp); | 5900 | tg3_disable_ints(tp); |
5898 | 5901 | ||
5899 | free_irq(tp->pdev->irq, dev); | 5902 | free_irq(tp->pdev->irq, dev); |
@@ -7729,6 +7732,15 @@ static void tg3_self_test(struct net_device *dev, struct ethtool_test *etest, | |||
7729 | data[4] = 1; | 7732 | data[4] = 1; |
7730 | } | 7733 | } |
7731 | 7734 | ||
7735 | spin_unlock(&tp->tx_lock); | ||
7736 | spin_unlock_irq(&tp->lock); | ||
7737 | if (tg3_test_interrupt(tp) != 0) { | ||
7738 | etest->flags |= ETH_TEST_FL_FAILED; | ||
7739 | data[5] = 1; | ||
7740 | } | ||
7741 | spin_lock_irq(&tp->lock); | ||
7742 | spin_lock(&tp->tx_lock); | ||
7743 | |||
7732 | tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); | 7744 | tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); |
7733 | if (netif_running(dev)) { | 7745 | if (netif_running(dev)) { |
7734 | tp->tg3_flags |= TG3_FLAG_INIT_COMPLETE; | 7746 | tp->tg3_flags |= TG3_FLAG_INIT_COMPLETE; |