aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Chan <mchan@broadcom.com>2005-05-29 17:59:20 -0400
committerDavid S. Miller <davem@davemloft.net>2005-05-29 17:59:20 -0400
commitd4bc3927d284784b3f0bff05b4eed2242cc3e226 (patch)
treeacf2ae55152e4ec68abf108e978e6e8b6d719a32
parentc76949a6826fc11efcd6bb1abdca1ae02761071d (diff)
[TG3]: Add interrupt test
This test uses the previously added tg3_test_interrupt() to perform the test. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/tg3.c12
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;