diff options
author | Clemens Buchacher | 2011-10-22 02:56:20 +0000 |
---|---|---|
committer | David S. Miller | 2011-10-24 02:58:09 -0400 |
commit | a7d5b76d9a7e434e32a5b2815db45489617dcba6 (patch) | |
tree | 0613e55954020f70fd21d9da6bce4bc74dd46489 /drivers/net | |
parent | 7cc9150ebe8ec06cafea9f1c10d92ddacf88d8ae (diff) |
jme: fix irq storm after suspend/resume
If the device is down during suspend/resume, interrupts are enabled
without a registered interrupt handler, causing a storm of
unhandled interrupts until the IRQ is disabled because "nobody
cared".
Instead, check that the device is up before touching it in the
suspend/resume code.
Fixes https://bugzilla.kernel.org/show_bug.cgi?id=39112
Helped-by: Adrian Chadd <adrian@freebsd.org>
Helped-by: Mohammed Shafi <shafi.wireless@gmail.com>
Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/jme.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/jme.c b/drivers/net/jme.c index 3ac262f55633..7a8a3b64276c 100644 --- a/drivers/net/jme.c +++ b/drivers/net/jme.c @@ -3131,6 +3131,9 @@ jme_suspend(struct device *dev) struct net_device *netdev = pci_get_drvdata(pdev); struct jme_adapter *jme = netdev_priv(netdev); + if (!netif_running(netdev)) + return 0; + atomic_dec(&jme->link_changing); netif_device_detach(netdev); @@ -3171,6 +3174,9 @@ jme_resume(struct device *dev) struct net_device *netdev = pci_get_drvdata(pdev); struct jme_adapter *jme = netdev_priv(netdev); + if (!netif_running(netdev)) + return 0; + jme_clear_pm(jme); jme_phy_on(jme); if (test_bit(JME_FLAG_SSET, &jme->flags)) |