Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
rtnl_lock();
+ if (!netif_running(dev))
+ goto out_unlock;
+
val = mdio_read(ioaddr, phy_id, MII_BMCR);
if (val & BMCR_RESET) {
// FIXME: needlessly high ? -- FR 02/07/2005
netif_carrier_on(dev);
}
+out_unlock:
rtnl_unlock();
}
netif_stop_queue(dev);
- flush_scheduled_work();
-
do {
spin_lock_irq(&tp->lock);
struct net_device *dev = pci_get_drvdata(pdev);
sis190_mii_remove(dev);
+ flush_scheduled_work();
unregister_netdev(dev);
sis190_release_board(pdev);
pci_set_drvdata(pdev, NULL);