madwifi does not unload after resume

Bug #13389 reported by Reinhard Tartler
4
Affects Status Importance Assigned to Milestone
Ubuntu
Invalid
Medium
Fabio Massimo Di Nitto

Bug Description

madwifi modules must be able to unload on shutdown and on suspend. I have the
problem that after suspending, madwifi stops working.
I happen to find this posting today:
http://article.gmane.org/gmane.linux.drivers.madwifi.user/6080
The problem occured the last days, but I'm not exactly sure what broke it (it
worked before).
Perhaps a new cvs snapshot of cvs could help?

Are there any instruction how I can rebuild restricted modules myself? I'll
happy to help testing new versions of madwifi, but I didn't figure out how to
rebuild restricted modules the way ubuntu distributes.

Revision history for this message
Daniel Stone (daniels) wrote :

madwifi hasn't been updated in weeks. This works fine with my Atheros card -- I
unload and reload ath_pci around suspend/resume. Does running sudo ifconfig
ath0 down, before you try to remove it, help?

Revision history for this message
Chuck Short (zulcss) wrote :

Which verison of linux-restricted are you using?

chuck

Revision history for this message
Reinhard Tartler (siretart) wrote :

I'm very sorry, I think I misdiagnosed my problem.
I'm still using 2.6.10-2, (linux-image and -restricted modules) and suffering
from swsusp not reenabling my IRQ routing correctly.
I'm upgrading to latest 2.6.10-4 image with corresponding -restricted and will
reinvestagate this problem again.

Revision history for this message
Reinhard Tartler (siretart) wrote :

I installed latest 2.6.10-4.
Steps to reproduce the problem:
Booting and loggin in, networking with madwifi doing fine
suspending via swsusp
resuming from suspend
trying to do any networking results in these messages in /var/log/kern.log:
Feb 28 09:15:50 localhost kernel: unregister_netdevice: waiting for ath0 to
become free. Usage count = 1

Perhaps of interest could be my kernel command line: root=/dev/hda2 ro nolapic
acpi=noirq usepirqmask routeirq resume=/dev/hda3 vga=0x317 quiet splash

I'm on a Thinkpad R40 B3G 2772, I figured these option out for getting swsup
working at all.
Please tell me what more information I could provide to diagnose the problem.

Revision history for this message
Matthew Garrett (mjg59) wrote :

Ok, I think I may have seen this before. Can you edit /etc/acpi/prepare.sh and
change

# And shut them down
for x in $INTERFACES; do
    ifdown $x;
    ifconfig $x down;
done

to

# And shut them down
for x in $INTERFACES; do
    ifdown $x;
done

killall dhclient

for x in $INTERFACES; do
    ifconfig $x down;
done

then reboot and try suspend/resume?

Revision history for this message
Reinhard Tartler (siretart) wrote :

I tried that, but symptoms didn't change.
I tried several boot options, but madwifi is unusable after suspend anymore :(
This worked before for me, so I will do more investigation what could have changed.

Now I'm also considering hardware damage as possible cause :(

Revision history for this message
Reinhard Tartler (siretart) wrote :

I did some more research: Unloading of ath-pci seems to success only once, after
reloading it another time, a `modprobe -r ath-pci` fails with the process
getting stuck in state 'D', leaving the rest of the system nearly unusable,
because the process 'x-session-manager' gets also in state 'D' afterwards.

Dmesg is emitting these lines:
kernel: unregister_netdevice: waiting for ethw to become free. Usage count = 7

Revision history for this message
Matthew Garrett (mjg59) wrote :

If you ifconfig down the interface before unloading it and make sure that there
are no dhclient processes running, does it work?

Revision history for this message
Reinhard Tartler (siretart) wrote :

In my tests I always made sure that neither dhclient nor wpa_supplicant is
running (by killing them) and downed the interface with ifconfig ath0 down manually.
Somethings very weird is going on here...

Revision history for this message
Matthew Garrett (mjg59) wrote :

Ok, it sounds very much like a madwifi bug. Could you possibly bring this up on
their dev lists? (I can't find a handy bugtracker for them)

Revision history for this message
Reinhard Tartler (siretart) wrote :

I reinstalled completly from hoary current install cd, and restored my local
configuration step by step.
Now I'm using a different Kernel command line: root=/dev/hda2 ro noapic nolapic
acpi=noirq vga=0x317 pci=routeirq quiet splash

I cannot tell for sure what the culprit was, but I think this is was a local
configuration problem, so I'm closing this bug.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.