summaryrefslogtreecommitdiff
path: root/drivers/net/smc91x.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-06-25 12:32:01 +0200
committerIngo Molnar <mingo@elte.hu>2008-06-25 12:32:01 +0200
commitda7878d75b8520c9ae00d27dfbbce546a7bfdfbb (patch)
tree547fd497a80818a60ac36831377d5df97868173c /drivers/net/smc91x.c
parent0e50a4c6ab94ffe7e5515b86b5df9e5abc8c6b13 (diff)
parent543cf4cb3fe6f6cae3651ba918b9c56200b257d0 (diff)
Merge branch 'linus' into x86/pebstip-x86-pebs-2008-06-25_10.32_Wed
Diffstat (limited to 'drivers/net/smc91x.c')
-rw-r--r--drivers/net/smc91x.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c
index a188e33484e6..f2051b209da2 100644
--- a/drivers/net/smc91x.c
+++ b/drivers/net/smc91x.c
@@ -1016,15 +1016,8 @@ static void smc_phy_powerdown(struct net_device *dev)
/* We need to ensure that no calls to smc_phy_configure are
pending.
-
- flush_scheduled_work() cannot be called because we are
- running with the netlink semaphore held (from
- devinet_ioctl()) and the pending work queue contains
- linkwatch_event() (scheduled by netif_carrier_off()
- above). linkwatch_event() also wants the netlink semaphore.
*/
- while(lp->work_pending)
- yield();
+ cancel_work_sync(&lp->phy_configure);
bmcr = smc_phy_read(dev, phy, MII_BMCR);
smc_phy_write(dev, phy, MII_BMCR, bmcr | BMCR_PDOWN);
@@ -1161,7 +1154,6 @@ static void smc_phy_configure(struct work_struct *work)
smc_phy_configure_exit:
SMC_SELECT_BANK(lp, 2);
spin_unlock_irq(&lp->lock);
- lp->work_pending = 0;
}
/*
@@ -1389,11 +1381,8 @@ static void smc_timeout(struct net_device *dev)
* smc_phy_configure() calls msleep() which calls schedule_timeout()
* which calls schedule(). Hence we use a work queue.
*/
- if (lp->phy_type != 0) {
- if (schedule_work(&lp->phy_configure)) {
- lp->work_pending = 1;
- }
- }
+ if (lp->phy_type != 0)
+ schedule_work(&lp->phy_configure);
/* We can accept TX packets again */
dev->trans_start = jiffies;