public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Auke Kok <auke-jan.h.kok@intel.com>
To: torvalds@osdl.org, linux-kernel@vger.kernel.org, greg@kroah.com,
	stable@vger.kernel.org
Cc: rjw@sisk.pl, bunk@stusta.de, akpm@osdl.org,
	laurent.riffard@free.fr, rajesh.shah@intel.com,
	toralf.foerster@gmx.de, jeff@garzik.org, pavel@ucw.cz,
	auke-jan.h.kok@intel.com, jesse.brandeburg@intel.com, "Ronciak,
	John" <john.ronciak@intel.com>,
	"John W. Linville" <linville@tuxdriver.com>,
	nhorman@redhat.com, cluebot@fedorafaq.org, notting@redhat.com,
	bruce.w.allan@intel.com, davej@redhat.com, linville@redhat.com,
	wtogami@redhat.com, dag@wieers.com, error27@gmail.com,
	e1000-list <e1000-devel@lists.sourceforge.net>
Subject: [PATCH] e1000: Fix regression: garbled stats and irq allocation during swsusp
Date: Fri, 03 Nov 2006 11:43:41 -0800	[thread overview]
Message-ID: <454B9BED.306@intel.com> (raw)


e1000: Fix regression: garbled stats and irq allocation during swsusp

After 7.0.33/2.6.16, e1000 suspend/resume left the user with an enabled
device showing garbled statistics and undetermined irq allocation state,
where `ifconfig eth0 down` would display `trying to free already freed irq`.

Explicitly free and allocate irq as well as powerup the PHY during resume
fixes.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>

diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index c0269b5..32cdccb 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -5081,6 +5081,8 @@ #endif
  	if (adapter->hw.phy_type == e1000_phy_igp_3)
  		e1000_phy_powerdown_workaround(&adapter->hw);

+	e1000_free_irq(adapter);
+
  	/* Release control of h/w to f/w.  If f/w is AMT enabled, this
  	 * would have already happened in close and is redundant. */
  	e1000_release_hw_control(adapter);
@@ -5111,6 +5113,10 @@ e1000_resume(struct pci_dev *pdev)
  	pci_enable_wake(pdev, PCI_D3hot, 0);
  	pci_enable_wake(pdev, PCI_D3cold, 0);

+	if ((err = e1000_request_irq(adapter)))
+		return err;
+
+	e1000_power_up_phy(adapter);
  	e1000_reset(adapter);
  	E1000_WRITE_REG(&adapter->hw, WUS, ~0);

             reply	other threads:[~2006-11-03 19:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-03 19:43 Auke Kok [this message]
2006-11-04 15:20 ` [PATCH] e1000: Fix regression: garbled stats and irq allocation during swsusp Toralf Förster
2006-11-06  7:55 ` Jeff Garzik
2006-11-06  9:39   ` Pavel Machek
2006-11-06 15:38   ` Auke Kok
  -- strict thread matches above, loose matches on Subject: below --
2006-11-06 16:57 Auke Kok

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=454B9BED.306@intel.com \
    --to=auke-jan.h.kok@intel.com \
    --cc=akpm@osdl.org \
    --cc=bruce.w.allan@intel.com \
    --cc=bunk@stusta.de \
    --cc=cluebot@fedorafaq.org \
    --cc=dag@wieers.com \
    --cc=davej@redhat.com \
    --cc=e1000-devel@lists.sourceforge.net \
    --cc=error27@gmail.com \
    --cc=greg@kroah.com \
    --cc=jeff@garzik.org \
    --cc=jesse.brandeburg@intel.com \
    --cc=john.ronciak@intel.com \
    --cc=laurent.riffard@free.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linville@redhat.com \
    --cc=linville@tuxdriver.com \
    --cc=nhorman@redhat.com \
    --cc=notting@redhat.com \
    --cc=pavel@ucw.cz \
    --cc=rajesh.shah@intel.com \
    --cc=rjw@sisk.pl \
    --cc=stable@vger.kernel.org \
    --cc=toralf.foerster@gmx.de \
    --cc=torvalds@osdl.org \
    --cc=wtogami@redhat.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