public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Fix suspend/resume problems with b44
@ 2005-03-08  9:46 Pavel Machek
  2005-03-08 18:17 ` David S. Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Pavel Machek @ 2005-03-08  9:46 UTC (permalink / raw)
  To: kernel list, Andrew Morton, jgarzik, linux-net

Hi!

This should fix problems people have with b44 during
suspend/resume. Please apply,
								Pavel

--- clean/drivers/net/b44.c	2004-12-25 13:35:00.000000000 +0100
+++ linux/drivers/net/b44.c	2005-01-19 11:59:12.000000000 +0100
@@ -1921,6 +1921,8 @@
 	b44_free_rings(bp);
 
 	spin_unlock_irq(&bp->lock);
+
+	free_irq(dev->irq, dev);
 	return 0;
 }
 
@@ -1934,6 +1936,9 @@
 	if (!netif_running(dev))
 		return 0;
 
+	if (request_irq(dev->irq, b44_interrupt, SA_SHIRQ, dev->name, dev))
+		printk(KERN_ERR PFX "%s: request_irq failed\n", dev->name);
+
 	spin_lock_irq(&bp->lock);
 
 	b44_init_rings(bp);

-- 
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!

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

* Re: Fix suspend/resume problems with b44
  2005-03-08  9:46 Fix suspend/resume problems with b44 Pavel Machek
@ 2005-03-08 18:17 ` David S. Miller
  2005-03-08 21:55   ` Pavel Machek
  0 siblings, 1 reply; 4+ messages in thread
From: David S. Miller @ 2005-03-08 18:17 UTC (permalink / raw)
  To: Pavel Machek; +Cc: linux-kernel, akpm, jgarzik, linux-net

On Tue, 8 Mar 2005 10:46:55 +0100
Pavel Machek <pavel@ucw.cz> wrote:

> @@ -1934,6 +1936,9 @@
>  	if (!netif_running(dev))
>  		return 0;
>  
> +	if (request_irq(dev->irq, b44_interrupt, SA_SHIRQ, dev->name, dev))
> +		printk(KERN_ERR PFX "%s: request_irq failed\n", dev->name);
> +

This is a hard error and means that bringup of the chip
will totally fail.  It definitely deserves something harder
than a printk(), but unfortunately ->resume() has no way
to cleanly fail.


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

* Re: Fix suspend/resume problems with b44
  2005-03-08 18:17 ` David S. Miller
@ 2005-03-08 21:55   ` Pavel Machek
  2005-03-09  3:40     ` David S. Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Pavel Machek @ 2005-03-08 21:55 UTC (permalink / raw)
  To: David S. Miller; +Cc: linux-kernel, akpm, jgarzik, linux-net

Hi!

> > @@ -1934,6 +1936,9 @@
> >  	if (!netif_running(dev))
> >  		return 0;
> >  
> > +	if (request_irq(dev->irq, b44_interrupt, SA_SHIRQ, dev->name, dev))
> > +		printk(KERN_ERR PFX "%s: request_irq failed\n", dev->name);
> > +
> 
> This is a hard error and means that bringup of the chip
> will totally fail.  It definitely deserves something harder
> than a printk(), but unfortunately ->resume() has no way
> to cleanly fail.

Any idea what to do there? I'd say that request_irq is very unlikely
to fail given that it worked okay before suspend...
								Pavel
-- 
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!

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

* Re: Fix suspend/resume problems with b44
  2005-03-08 21:55   ` Pavel Machek
@ 2005-03-09  3:40     ` David S. Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David S. Miller @ 2005-03-09  3:40 UTC (permalink / raw)
  To: Pavel Machek; +Cc: linux-kernel, akpm, jgarzik, linux-net

On Tue, 8 Mar 2005 22:55:37 +0100
Pavel Machek <pavel@ucw.cz> wrote:

> Any idea what to do there? I'd say that request_irq is very unlikely
> to fail given that it worked okay before suspend...

What you have is fine for now.

It is just a general issue that ->resume() has no way to cleanly
fail.

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

end of thread, other threads:[~2005-03-09  3:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-08  9:46 Fix suspend/resume problems with b44 Pavel Machek
2005-03-08 18:17 ` David S. Miller
2005-03-08 21:55   ` Pavel Machek
2005-03-09  3:40     ` David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox