netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [BUG] e100: eth0 appers many times in /proc/interrupts after resume
       [not found]                   ` <20070121212209.GB8958@slug>
@ 2007-01-21 21:45                     ` Auke Kok
  2007-01-21 22:04                       ` Frederik Deweerdt
  0 siblings, 1 reply; 3+ messages in thread
From: Auke Kok @ 2007-01-21 21:45 UTC (permalink / raw)
  To: Frederik Deweerdt; +Cc: Andrei Popa, linux-kernel, nigel, NetDev

Frederik Deweerdt wrote:
> On Sun, Jan 21, 2007 at 09:17:41PM +0200, Andrei Popa wrote:
>> It's the 10th resume and in /proc/interrupts eth0 appers 10 times.
> 
> The e100_resume() function should be calling netif_device_detach and
> free_irq. Could you try the following (compile tested) patch?

I just fixed suspend/shutdown for e100 in 2.6.19, not sure why the problem still 
shows up. Since it's a driver/net issue, you should CC netdev on it tho, 
otherwise it might go unnoticed.

I'll open up the can-o-worms on this issue and see what's up with it.

I'm not so sure that this patch is OK, and I wonder why it stopped working, 
because I spent quite some time fixing it only a few months ago. Did swsup 
change again? sigh...

Auke

> 
> Signed-off-by: Frederik Deweerdt <frederik.deweerdt@gmail.com>
> 
> diff --git a/drivers/net/e100.c b/drivers/net/e100.c
> index 2fe0445..0c376e4 100644
> --- a/drivers/net/e100.c
> +++ b/drivers/net/e100.c
> @@ -2671,6 +2671,7 @@ static int e100_suspend(struct pci_dev *pdev, pm_message_t state)
>  	del_timer_sync(&nic->watchdog);
>  	netif_carrier_off(nic->netdev);
>  
> +	netif_device_detach(netdev);
>  	pci_save_state(pdev);
>  
>  	if ((nic->flags & wol_magic) | e100_asf(nic)) {
> @@ -2682,6 +2683,7 @@ static int e100_suspend(struct pci_dev *pdev, pm_message_t state)
>  	}
>  
>  	pci_disable_device(pdev);
> +	free_irq(pdev->irq, netdev);
>  	pci_set_power_state(pdev, PCI_D3hot);
>  
>  	return 0;
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [BUG] e100: eth0 appers many times in /proc/interrupts after resume
  2007-01-21 21:45                     ` [BUG] e100: eth0 appers many times in /proc/interrupts after resume Auke Kok
@ 2007-01-21 22:04                       ` Frederik Deweerdt
  2007-01-23  0:15                         ` Auke Kok
  0 siblings, 1 reply; 3+ messages in thread
From: Frederik Deweerdt @ 2007-01-21 22:04 UTC (permalink / raw)
  To: Auke Kok; +Cc: Andrei Popa, linux-kernel, nigel, NetDev

On Sun, Jan 21, 2007 at 01:45:27PM -0800, Auke Kok wrote:
> Frederik Deweerdt wrote:
> >On Sun, Jan 21, 2007 at 09:17:41PM +0200, Andrei Popa wrote:
> >>It's the 10th resume and in /proc/interrupts eth0 appers 10 times.
> >The e100_resume() function should be calling netif_device_detach and
> >free_irq. Could you try the following (compile tested) patch?
> 
> I just fixed suspend/shutdown for e100 in 2.6.19, not sure why the problem still shows up. Since it's a driver/net issue, you 
> should CC netdev on it tho, otherwise it might go unnoticed.
Thanks for adding the CC
> 
> I'll open up the can-o-worms on this issue and see what's up with it.
> 
> I'm not so sure that this patch is OK, and I wonder why it stopped working, because I spent quite some time fixing it only a 
> few months ago. Did swsup change again? sigh...

I may well be wrong (It appears that most of the time I am :)), but the
unbalanced netif_device_attach (in resume) looks suspicious.  resume()
also calls request_irq, so calling free_irq on suspend seemed logical.

Regards,
Frederik

> 
> Auke
> 
> >Signed-off-by: Frederik Deweerdt <frederik.deweerdt@gmail.com>
> >diff --git a/drivers/net/e100.c b/drivers/net/e100.c
> >index 2fe0445..0c376e4 100644
> >--- a/drivers/net/e100.c
> >+++ b/drivers/net/e100.c
> >@@ -2671,6 +2671,7 @@ static int e100_suspend(struct pci_dev *pdev, pm_message_t state)
> > 	del_timer_sync(&nic->watchdog);
> > 	netif_carrier_off(nic->netdev);
> > +	netif_device_detach(netdev);
> > 	pci_save_state(pdev);
> >  	if ((nic->flags & wol_magic) | e100_asf(nic)) {
> >@@ -2682,6 +2683,7 @@ static int e100_suspend(struct pci_dev *pdev, pm_message_t state)
> > 	}
> >  	pci_disable_device(pdev);
> >+	free_irq(pdev->irq, netdev);
> > 	pci_set_power_state(pdev, PCI_D3hot);
> >  	return 0;
> >-
> >To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> >the body of a message to majordomo@vger.kernel.org
> >More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >Please read the FAQ at  http://www.tux.org/lkml/
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [BUG] e100: eth0 appers many times in /proc/interrupts after resume
  2007-01-21 22:04                       ` Frederik Deweerdt
@ 2007-01-23  0:15                         ` Auke Kok
  0 siblings, 0 replies; 3+ messages in thread
From: Auke Kok @ 2007-01-23  0:15 UTC (permalink / raw)
  To: Frederik Deweerdt; +Cc: Andrei Popa, linux-kernel, nigel, NetDev

Frederik Deweerdt wrote:
> On Sun, Jan 21, 2007 at 01:45:27PM -0800, Auke Kok wrote:
>> Frederik Deweerdt wrote:
>>> On Sun, Jan 21, 2007 at 09:17:41PM +0200, Andrei Popa wrote:
>>>> It's the 10th resume and in /proc/interrupts eth0 appers 10 times.
>>> The e100_resume() function should be calling netif_device_detach and
>>> free_irq. Could you try the following (compile tested) patch?
>> I just fixed suspend/shutdown for e100 in 2.6.19, not sure why the problem still shows up. Since it's a driver/net issue, you 
>> should CC netdev on it tho, otherwise it might go unnoticed.
> Thanks for adding the CC
>> I'll open up the can-o-worms on this issue and see what's up with it.
>>
>> I'm not so sure that this patch is OK, and I wonder why it stopped working, because I spent quite some time fixing it only a 
>> few months ago. Did swsup change again? sigh...
> 
> I may well be wrong (It appears that most of the time I am :)), but the
> unbalanced netif_device_attach (in resume) looks suspicious.  resume()
> also calls request_irq, so calling free_irq on suspend seemed logical.

I just tested the patch and looked it over again. The patch works good and 
indeed fixes the problem, and netconsole works great. It even shows much of the 
suspend/resume over the wire, something which I can't remember seeing before 
with netconsole. reboot -f also works OK.

I'll push the patch upstream, thanks!

Auke

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-01-23  0:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1167520557.2566.23.camel@nigel.suspend2.net>
     [not found] ` <1167571281.7175.1.camel@localhost>
     [not found]   ` <1167599458.2662.8.camel@nigel.suspend2.net>
     [not found]     ` <1167605481.12328.0.camel@localhost>
     [not found]       ` <1167607994.2662.39.camel@nigel.suspend2.net>
     [not found]         ` <1167644970.7142.6.camel@localhost>
     [not found]           ` <1168317278.6948.9.camel@nigel.suspend2.net>
     [not found]             ` <1168448689.7430.1.camel@localhost>
     [not found]               ` <1168463852.3205.1.camel@nigel.suspend2.net>
     [not found]                 ` <1169407062.1932.4.camel@localhost>
     [not found]                   ` <20070121212209.GB8958@slug>
2007-01-21 21:45                     ` [BUG] e100: eth0 appers many times in /proc/interrupts after resume Auke Kok
2007-01-21 22:04                       ` Frederik Deweerdt
2007-01-23  0:15                         ` Auke Kok

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).