aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorAnton Vorontsov <avorontsov@ru.mvista.com>2009-12-30 03:23:32 -0500
committerDavid S. Miller <davem@davemloft.net>2009-12-31 01:03:43 -0500
commit29fb00e047eae927a3f1a0367c0cfed7ad5228ef (patch)
treed438872b3e386ddd37daaa79bd3b3f4c62b43d36 /drivers/net
parent2f5cb43406d0b29b96248f5328a14a6f6abf8ae6 (diff)
ucc_geth: Fix netdev watchdog triggering on suspend
Sometimes ucc_geth fails to suspend with the following trace: ucc_geth e0103000.ucc: suspend ucc_geth e0102000.ucc: suspend NETDEV WATCHDOG: eth0 (ucc_geth): transmit queue 0 timed out ------------[ cut here ]------------ Badness at net/sched/sch_generic.c:255 NIP: c021cb5c LR: c021cb5c CTR: c01ab4b4 [...] NIP [c021cb5c] dev_watchdog+0x298/0x2a8 LR [c021cb5c] dev_watchdog+0x298/0x2a8 Call Trace: [c0389da0] [c021cb5c] dev_watchdog+0x298/0x2a8 (unreliable) [c0389e00] [c0031ed8] run_timer_softirq+0x16c/0x1dc [c0389e50] [c002c638] __do_softirq+0xa4/0x11c [...] This patch fixes the issue by properly detaching the device on suspend, and attaching it back on resume. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ucc_geth.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
index 41ad2f3697c7..96bdc0b43889 100644
--- a/drivers/net/ucc_geth.c
+++ b/drivers/net/ucc_geth.c
@@ -3607,6 +3607,7 @@ static int ucc_geth_suspend(struct of_device *ofdev, pm_message_t state)
3607 if (!netif_running(ndev)) 3607 if (!netif_running(ndev))
3608 return 0; 3608 return 0;
3609 3609
3610 netif_device_detach(ndev);
3610 napi_disable(&ugeth->napi); 3611 napi_disable(&ugeth->napi);
3611 3612
3612 /* 3613 /*
@@ -3665,7 +3666,7 @@ static int ucc_geth_resume(struct of_device *ofdev)
3665 phy_start(ugeth->phydev); 3666 phy_start(ugeth->phydev);
3666 3667
3667 napi_enable(&ugeth->napi); 3668 napi_enable(&ugeth->napi);
3668 netif_start_queue(ndev); 3669 netif_device_attach(ndev);
3669 3670
3670 return 0; 3671 return 0;
3671} 3672}