aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/sis190.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c
index 45d91b159100..b08508b35833 100644
--- a/drivers/net/sis190.c
+++ b/drivers/net/sis190.c
@@ -909,6 +909,9 @@ static void sis190_phy_task(struct work_struct *work)
909 909
910 rtnl_lock(); 910 rtnl_lock();
911 911
912 if (!netif_running(dev))
913 goto out_unlock;
914
912 val = mdio_read(ioaddr, phy_id, MII_BMCR); 915 val = mdio_read(ioaddr, phy_id, MII_BMCR);
913 if (val & BMCR_RESET) { 916 if (val & BMCR_RESET) {
914 // FIXME: needlessly high ? -- FR 02/07/2005 917 // FIXME: needlessly high ? -- FR 02/07/2005
@@ -981,6 +984,7 @@ static void sis190_phy_task(struct work_struct *work)
981 netif_carrier_on(dev); 984 netif_carrier_on(dev);
982 } 985 }
983 986
987out_unlock:
984 rtnl_unlock(); 988 rtnl_unlock();
985} 989}
986 990
@@ -1102,8 +1106,6 @@ static void sis190_down(struct net_device *dev)
1102 1106
1103 netif_stop_queue(dev); 1107 netif_stop_queue(dev);
1104 1108
1105 flush_scheduled_work();
1106
1107 do { 1109 do {
1108 spin_lock_irq(&tp->lock); 1110 spin_lock_irq(&tp->lock);
1109 1111
@@ -1857,6 +1859,7 @@ static void __devexit sis190_remove_one(struct pci_dev *pdev)
1857 struct net_device *dev = pci_get_drvdata(pdev); 1859 struct net_device *dev = pci_get_drvdata(pdev);
1858 1860
1859 sis190_mii_remove(dev); 1861 sis190_mii_remove(dev);
1862 flush_scheduled_work();
1860 unregister_netdev(dev); 1863 unregister_netdev(dev);
1861 sis190_release_board(pdev); 1864 sis190_release_board(pdev);
1862 pci_set_drvdata(pdev, NULL); 1865 pci_set_drvdata(pdev, NULL);