diff options
author | Auke Kok <auke-jan.h.kok@intel.com> | 2006-11-06 08:57:12 -0800 |
---|---|---|
committer | Chris Wright <chrisw@sous-sol.org> | 2006-11-18 19:28:02 -0800 |
commit | f8d0f4c70c1b99e37102367bf37e394245fae1c0 (patch) | |
tree | 26e97815f524c5c1e20a89e174fa595f21694a43 | |
parent | b7d3dcaa7a0b39129ac089ab1a6d9179c0a7fb1b (diff) | |
download | lwn-f8d0f4c70c1b99e37102367bf37e394245fae1c0.tar.gz lwn-f8d0f4c70c1b99e37102367bf37e394245fae1c0.zip |
[PATCH] e1000: Fix regression: garbled stats and irq allocation during swsusp
e1000: Fix suspend/resume powerup and irq allocation
From: Auke Kok <auke-jan.h.kok@intel.com>
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 when needed.
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
[chrisw: trivial 2.6.18 backport s/err/ret_val/]
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 98ef9f85482f..aefcba701108 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c @@ -4683,6 +4683,9 @@ e1000_suspend(struct pci_dev *pdev, pm_message_t state) if (adapter->hw.phy_type == e1000_phy_igp_3) e1000_phy_powerdown_workaround(&adapter->hw); + if (netif_running(netdev)) + 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); @@ -4710,6 +4713,10 @@ e1000_resume(struct pci_dev *pdev) pci_enable_wake(pdev, PCI_D3hot, 0); pci_enable_wake(pdev, PCI_D3cold, 0); + if (netif_running(netdev) && (ret_val = e1000_request_irq(adapter))) + return ret_val; + + e1000_power_up_phy(adapter); e1000_reset(adapter); E1000_WRITE_REG(&adapter->hw, WUS, ~0); |