Skip to content

Commit

Permalink
jme: fix irq storm after suspend/resume
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Clemens Buchacher authored and David S. Miller committed Oct 24, 2011
1 parent 7cc9150 commit a7d5b76
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/net/jme.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit a7d5b76

Please sign in to comment.