* [PATCH] e1000: Fix regression: garbled stats and irq allocation during swsusp
@ 2006-11-03 19:43 Auke Kok
2006-11-04 15:20 ` Toralf Förster
2006-11-06 7:55 ` Jeff Garzik
0 siblings, 2 replies; 6+ messages in thread
From: Auke Kok @ 2006-11-03 19:43 UTC (permalink / raw)
To: torvalds, linux-kernel, greg, stable
Cc: rjw, bunk, akpm, laurent.riffard, rajesh.shah, toralf.foerster,
jeff, pavel, auke-jan.h.kok, jesse.brandeburg, Ronciak, John,
John W. Linville, nhorman, cluebot, notting, bruce.w.allan, davej,
linville, wtogami, dag, error27, e1000-list
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);
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] e1000: Fix regression: garbled stats and irq allocation during swsusp
2006-11-03 19:43 [PATCH] e1000: Fix regression: garbled stats and irq allocation during swsusp Auke Kok
@ 2006-11-04 15:20 ` Toralf Förster
2006-11-06 7:55 ` Jeff Garzik
1 sibling, 0 replies; 6+ messages in thread
From: Toralf Förster @ 2006-11-04 15:20 UTC (permalink / raw)
To: Auke Kok
Cc: torvalds, linux-kernel, greg, stable, rjw, bunk, akpm,
laurent.riffard, rajesh.shah, jeff, pavel, jesse.brandeburg,
Ronciak, John, John W. Linville, nhorman, cluebot, notting,
bruce.w.allan, davej, linville, wtogami, dag, error27, e1000-list
[-- Attachment #1: Type: text/plain, Size: 2741 bytes --]
Hi Auke,
good news. I incorporated the changes manually b/cI couldn't apply your patch
against the latest git tree from Linux with the program patch.
The patch would solve http://bugzilla.kernel.org/show_bug.cgi?id=7207 :-)
Here's the diff after my edit of the file e1000_main.c:
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 8d04752..400bdee 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -4799,7 +4799,8 @@ e1000_suspend(struct pci_dev *pdev, pm_m
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);
@@ -4830,6 +4831,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);
Am Friday 03 November 2006 20:43 schrieb Auke Kok:
>
> 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);
>
>
--
MfG/Sincerely
Toralf Förster
+++ I'm not subscribed to the email list, please Cc: me +++
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] e1000: Fix regression: garbled stats and irq allocation during swsusp
2006-11-03 19:43 [PATCH] e1000: Fix regression: garbled stats and irq allocation during swsusp Auke Kok
2006-11-04 15:20 ` Toralf Förster
@ 2006-11-06 7:55 ` Jeff Garzik
2006-11-06 9:39 ` Pavel Machek
2006-11-06 15:38 ` Auke Kok
1 sibling, 2 replies; 6+ messages in thread
From: Jeff Garzik @ 2006-11-06 7:55 UTC (permalink / raw)
To: Auke Kok
Cc: torvalds, linux-kernel, greg, stable, rjw, bunk, akpm,
laurent.riffard, rajesh.shah, toralf.foerster, pavel,
jesse.brandeburg, Ronciak, John, John W. Linville, nhorman,
cluebot, notting, bruce.w.allan, davej, linville, wtogami, dag,
error27, e1000-list
Auke Kok wrote:
>
> 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>
ACK, but:
Applying 'e1000: Fix regression: garbled stats and irq allocation during
swsusp'
fatal: corrupt patch at line 8
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] e1000: Fix regression: garbled stats and irq allocation during swsusp
2006-11-06 7:55 ` Jeff Garzik
@ 2006-11-06 9:39 ` Pavel Machek
2006-11-06 15:38 ` Auke Kok
1 sibling, 0 replies; 6+ messages in thread
From: Pavel Machek @ 2006-11-06 9:39 UTC (permalink / raw)
To: Jeff Garzik
Cc: Auke Kok, torvalds, linux-kernel, greg, stable, rjw, bunk, akpm,
laurent.riffard, rajesh.shah, toralf.foerster, jesse.brandeburg,
Ronciak, John, John W. Linville, nhorman, cluebot, notting,
bruce.w.allan, davej, linville, wtogami, dag, error27, e1000-list
Hi!
> >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>
>
> ACK, but:
>
> Applying 'e1000: Fix regression: garbled stats and irq allocation during
> swsusp'
>
> fatal: corrupt patch at line 8
Toralf posted rediffed (manually applied) version... should I forward
it to you?
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] e1000: Fix regression: garbled stats and irq allocation during swsusp
2006-11-06 7:55 ` Jeff Garzik
2006-11-06 9:39 ` Pavel Machek
@ 2006-11-06 15:38 ` Auke Kok
1 sibling, 0 replies; 6+ messages in thread
From: Auke Kok @ 2006-11-06 15:38 UTC (permalink / raw)
To: Jeff Garzik
Cc: torvalds, linux-kernel, greg, stable, rjw, bunk, akpm,
laurent.riffard, rajesh.shah, toralf.foerster, pavel,
jesse.brandeburg, Ronciak, John, John W. Linville, nhorman,
cluebot, notting, bruce.w.allan, davej, linville, wtogami, dag,
error27, e1000-list
Jeff Garzik wrote:
> Auke Kok wrote:
>>
>> 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>
>
> ACK, but:
>
> Applying 'e1000: Fix regression: garbled stats and irq allocation during
> swsusp'
>
> fatal: corrupt patch at line 8
There's another problem with it, that needs attention as well. I will reformat and
re-post the patch to everyone.
Cheers,
Auke
From: <chrisw@sous-sol.org>
Also, would this cause a problem if I ifdown the interface to call
->close then suspend? Looks like it'd free_irq twice, maybe need a
netif_running() check?
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] e1000: Fix regression: garbled stats and irq allocation during swsusp
@ 2006-11-06 16:57 Auke Kok
0 siblings, 0 replies; 6+ messages in thread
From: Auke Kok @ 2006-11-06 16:57 UTC (permalink / raw)
To: jeff, torvalds, linux-kernel, stable
Cc: rjw, bunk, akpm, laurent.riffard, rajesh.shah, toralf.foerster,
pavel, auke-jan.h.kok, jesse.brandeburg, Ronciak, John,
John W. Linville, nhorman, cluebot, notting, bruce.w.allan, davej,
e1000-list
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>
---
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 8d04752..726ec5e 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -4800,6 +4800,9 @@ e1000_suspend(struct pci_dev *pdev, pm_m
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);
@@ -4830,6 +4833,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) && (err = e1000_request_irq(adapter)))
+ return err;
+
+ e1000_power_up_phy(adapter);
e1000_reset(adapter);
E1000_WRITE_REG(&adapter->hw, WUS, ~0);
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-11-06 16:57 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-03 19:43 [PATCH] e1000: Fix regression: garbled stats and irq allocation during swsusp Auke Kok
2006-11-04 15:20 ` 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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox