sis190: RTNL and flush_scheduled_work deadlock
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
committed by
Jeff Garzik
parent
eb2a021c47
commit
c014f6c8f8
@@ -909,6 +909,9 @@ static void sis190_phy_task(struct work_struct *work)
|
|||||||
|
|
||||||
rtnl_lock();
|
rtnl_lock();
|
||||||
|
|
||||||
|
if (!netif_running(dev))
|
||||||
|
goto out_unlock;
|
||||||
|
|
||||||
val = mdio_read(ioaddr, phy_id, MII_BMCR);
|
val = mdio_read(ioaddr, phy_id, MII_BMCR);
|
||||||
if (val & BMCR_RESET) {
|
if (val & BMCR_RESET) {
|
||||||
// FIXME: needlessly high ? -- FR 02/07/2005
|
// FIXME: needlessly high ? -- FR 02/07/2005
|
||||||
@@ -981,6 +984,7 @@ static void sis190_phy_task(struct work_struct *work)
|
|||||||
netif_carrier_on(dev);
|
netif_carrier_on(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
out_unlock:
|
||||||
rtnl_unlock();
|
rtnl_unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1102,8 +1106,6 @@ static void sis190_down(struct net_device *dev)
|
|||||||
|
|
||||||
netif_stop_queue(dev);
|
netif_stop_queue(dev);
|
||||||
|
|
||||||
flush_scheduled_work();
|
|
||||||
|
|
||||||
do {
|
do {
|
||||||
spin_lock_irq(&tp->lock);
|
spin_lock_irq(&tp->lock);
|
||||||
|
|
||||||
@@ -1857,6 +1859,7 @@ static void __devexit sis190_remove_one(struct pci_dev *pdev)
|
|||||||
struct net_device *dev = pci_get_drvdata(pdev);
|
struct net_device *dev = pci_get_drvdata(pdev);
|
||||||
|
|
||||||
sis190_mii_remove(dev);
|
sis190_mii_remove(dev);
|
||||||
|
flush_scheduled_work();
|
||||||
unregister_netdev(dev);
|
unregister_netdev(dev);
|
||||||
sis190_release_board(pdev);
|
sis190_release_board(pdev);
|
||||||
pci_set_drvdata(pdev, NULL);
|
pci_set_drvdata(pdev, NULL);
|
||||||
|
Reference in New Issue
Block a user