From: Clemens Buchacher <drizzd@aon.at>
To: Guo-Fu Tseng <cooldavid@cooldavid.org>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Adrian Chadd <adrian@freebsd.org>,
Mohammed Shafi <shafi.wireless@gmail.com>
Subject: [PATCH] jme: fix irq storm after suspend/resume
Date: Sat, 22 Oct 2011 14:56:20 +0200 [thread overview]
Message-ID: <20111022125620.GA2256@ecki.lan> (raw)
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>
---
Unfortunately, bugzilla.kernel.org is still down. There is at least
one other person who reported the issue, and I don't have their
email address. So for now, I am the only one who tested this fix.
The patch applies to current tip (2efd7c0) of Linus' tree. I also
tested it based on v3.0 and it worked the same.
Many thanks to Adrian and Mohammed for helping me debug this issue.
See this thread for the history:
http://mid.gmane.org/20110827113253.GA1444@ecki
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 3ac262f..7a8a3b6 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))
--
1.7.7
next reply other threads:[~2011-10-22 12:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-22 12:56 Clemens Buchacher [this message]
2011-10-22 13:09 ` [PATCH] jme: fix irq storm after suspend/resume Mohammed Shafi
2011-10-22 16:27 ` Mantas M.
2011-10-24 6:58 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111022125620.GA2256@ecki.lan \
--to=drizzd@aon.at \
--cc=adrian@freebsd.org \
--cc=cooldavid@cooldavid.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=shafi.wireless@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).