Commit d4bc3927 authored by Michael Chan's avatar Michael Chan Committed by David S. Miller

[TG3]: Add interrupt test

This test uses the previously added tg3_test_interrupt() to perform the
test.
Signed-off-by: default avatarMichael Chan <mchan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c76949a6
...@@ -5894,6 +5894,9 @@ static int tg3_test_interrupt(struct tg3 *tp) ...@@ -5894,6 +5894,9 @@ static int tg3_test_interrupt(struct tg3 *tp)
int err, i; int err, i;
u32 int_mbox = 0; u32 int_mbox = 0;
if (!netif_running(dev))
return -ENODEV;
tg3_disable_ints(tp); tg3_disable_ints(tp);
free_irq(tp->pdev->irq, dev); free_irq(tp->pdev->irq, dev);
...@@ -7729,6 +7732,15 @@ static void tg3_self_test(struct net_device *dev, struct ethtool_test *etest, ...@@ -7729,6 +7732,15 @@ static void tg3_self_test(struct net_device *dev, struct ethtool_test *etest,
data[4] = 1; data[4] = 1;
} }
spin_unlock(&tp->tx_lock);
spin_unlock_irq(&tp->lock);
if (tg3_test_interrupt(tp) != 0) {
etest->flags |= ETH_TEST_FL_FAILED;
data[5] = 1;
}
spin_lock_irq(&tp->lock);
spin_lock(&tp->tx_lock);
tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); tg3_halt(tp, RESET_KIND_SHUTDOWN, 1);
if (netif_running(dev)) { if (netif_running(dev)) {
tp->tg3_flags |= TG3_FLAG_INIT_COMPLETE; tp->tg3_flags |= TG3_FLAG_INIT_COMPLETE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment