Skip to contentSkip to conversation

Fix suspend/resume problems with b44

PATCH Pavel Machek 2 participants 4 messages Mar 8, 2005 – Mar 9, 2005 Network drivers

lore
Share & tools
lore
#0 lore raw

Hi!

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

drivers/net/b44.c +5 -0
@@ -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);
Signature · 2 lines
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
maintainer
#1 lore raw

drivers/net/b44.c line 1941

Quoted 7 lines · On Tue, 8 Mar 2005 10:46:55 +0100 Pavel Machek <[email protected]> wrote:
drivers/net/b44.c +3 -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);
+

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.

#2 lore raw

Hi!

Quoted 4 lines
Quoted 4 lines
drivers/net/b44.c +0 -0
@@ -1934,6 +1936,9 @@
 	if (!netif_running(dev))
 		return 0;
 
Quoted 8 lines

drivers/net/b44.c line 1941

Quoted 3 lines
drivers/net/b44.c +3 -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

Signature · 2 lines
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
maintainer
#3 lore raw
Quoted 2 lines · On Tue, 8 Mar 2005 22:55:37 +0100 Pavel Machek <[email protected]> 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.