Bug 116088

Summary: Module b44 produces kernel oops while waking up from suspend to disk
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Holger Macht <hmacht>
Component: KernelAssignee: Karsten Keil <karsten.keil>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: aj
Version: RC 1   
Target Milestone: ---   
Hardware: Other   
OS: All   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Image of kernel oops

Description Holger Macht 2005-09-09 11:22:07 UTC
Setting machine into suspend to disk with loaded module b44. While resuming,
kernel oopses and machine freezes after reloading data from swap. Image will be
appended.

If this can not be fixed in time, we could add this module to
UNLOAD_MODULES_BEFORE_SUSPEND in powersave configuratiion.
Comment 1 Holger Macht 2005-09-09 11:24:42 UTC
Created attachment 49363 [details]
Image of kernel oops
Comment 2 Forgotten User ZhJd0F0L3x 2005-09-09 11:37:55 UTC
Pavel already has done some b44 debugging ;-)
Holger: does removing the module before suspend actually help? (just to make sure)
Comment 3 Holger Macht 2005-09-09 11:44:48 UTC
Yes. I also tested adding it to UNLOAD_MODULES_BEFORE_SUSPEND variable and works
fine this way.
Comment 4 Holger Macht 2005-09-09 12:53:15 UTC
Not really. Don't know why it worked the last time I tried. It even does not
work anymore when unloading manually before suspend. So this must be fixed in
b44 module.
Comment 5 Olaf Kirch 2005-09-09 13:27:51 UTC
Karsten, can you track this please? 
 
Holger, please try this: 
 -	poweroff/power on machine 
 -	rmmod b44 
 -	suspend, then resume 
 -	insmod b44 b44_debug=16 
 
and let us know whether you find anything in syslog. 
Comment 6 Holger Macht 2005-09-09 13:40:10 UTC
Nothing then b44.c:v0.95 (Aug 3, 2004).. in syslog. But the machine is
suspicious anyway. Sometimes resume does not even work when removing b44 manually.
Comment 7 Olaf Kirch 2005-09-09 13:41:44 UTC
Hm. So what is the failure mode when you remove b44? 
Comment 8 Holger Macht 2005-09-09 13:51:43 UTC
I only get the oops when network is configured and module is loaded. If
unloading module manually, last line from resume sais:

ACPI: PCI Interrupt 0000:01:0d.0[A] -> Link [C0C9] -> GSI 10 (level), low) -> IRQ 10

And the cursor is blinking very slowly.
Comment 9 Pavel Machek 2005-09-11 10:06:26 UTC
I have had this in my tree pretty much forever, but I'm not quite sure it will
help...
diff --git a/drivers/net/b44.c b/drivers/net/b44.c
--- a/drivers/net/b44.c
+++ b/drivers/net/b44.c
@@ -1930,6 +1930,8 @@ static int b44_suspend(struct pci_dev *p
        b44_free_rings(bp);

        spin_unlock_irq(&bp->lock);
+
+       free_irq(dev->irq, dev);
        pci_disable_device(pdev);
        return 0;
 }
@@ -1946,6 +1948,9 @@ static int b44_resume(struct pci_dev *pd
        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);
pavel@amd:/usr/src/linux$


Comment 10 Daniel Gollub 2005-09-12 09:08:06 UTC
patch seems to work. resume works fine now ... without oops and without slowly
blinking cursor. module can suspend&resume without manually unload&load.
UNLOAD_MODULES_BEFORE_SUSPEND is not necessary in powersave.
Comment 11 Olaf Kirch 2005-09-12 10:03:09 UTC
Is this something we should include in 10.0? 
I am in favor of this. 
Comment 12 Andreas Jaeger 2005-09-12 11:10:49 UTC
Please add it.
Comment 13 Karsten Keil 2005-09-12 11:33:07 UTC
Yes it cannot hurt and may fix the problem. 
I'm doing it now. 
Comment 14 Karsten Keil 2005-09-12 12:03:23 UTC
patch is in CVS now