int err, i;
        u32 int_mbox = 0;
 
+       if (!netif_running(dev))
+               return -ENODEV;
+
        tg3_disable_ints(tp);
 
        free_irq(tp->pdev->irq, dev);
                        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);
                if (netif_running(dev)) {
                        tp->tg3_flags |= TG3_FLAG_INIT_COMPLETE;