Commit a7d5b76d authored by Clemens Buchacher's avatar Clemens Buchacher Committed by David S. Miller

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=39112Helped-by: default avatarAdrian Chadd <adrian@freebsd.org>
Helped-by: default avatarMohammed Shafi <shafi.wireless@gmail.com>
Signed-off-by: default avatarClemens Buchacher <drizzd@aon.at>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7cc9150e
...@@ -3131,6 +3131,9 @@ jme_suspend(struct device *dev) ...@@ -3131,6 +3131,9 @@ jme_suspend(struct device *dev)
struct net_device *netdev = pci_get_drvdata(pdev); struct net_device *netdev = pci_get_drvdata(pdev);
struct jme_adapter *jme = netdev_priv(netdev); struct jme_adapter *jme = netdev_priv(netdev);
if (!netif_running(netdev))
return 0;
atomic_dec(&jme->link_changing); atomic_dec(&jme->link_changing);
netif_device_detach(netdev); netif_device_detach(netdev);
...@@ -3171,6 +3174,9 @@ jme_resume(struct device *dev) ...@@ -3171,6 +3174,9 @@ jme_resume(struct device *dev)
struct net_device *netdev = pci_get_drvdata(pdev); struct net_device *netdev = pci_get_drvdata(pdev);
struct jme_adapter *jme = netdev_priv(netdev); struct jme_adapter *jme = netdev_priv(netdev);
if (!netif_running(netdev))
return 0;
jme_clear_pm(jme); jme_clear_pm(jme);
jme_phy_on(jme); jme_phy_on(jme);
if (test_bit(JME_FLAG_SSET, &jme->flags)) if (test_bit(JME_FLAG_SSET, &jme->flags))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment