Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 71934 - pcmcia unregister_netdev wlan0: usage count 1 problem
Summary: pcmcia unregister_netdev wlan0: usage count 1 problem
Status: VERIFIED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High critical (vote)
Assignee: Mobile Herd (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 68964
  Show dependency tree
 
Reported: 2004-11-21 05:05 UTC by Georg Müller
Modified: 2005-05-19 01:13 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Georg Müller 2004-11-21 05:05:36 UTC
When shutting down, I get the message, that unregister_netdev failed, because wlan0 is still in use, but it is stopped by net.wlan0 stop earlier.

If I remove the card before (or earlier while) shutting down I don't have these problems.

This issue is a bit critical because this causes the system to unmount (or remount ro) the file systems, what could lead to data loss.


I have a prism 2.5 wlan card and I am using the following versions:
sys-apps/pcmcia-cs-3.2.7-r2
net-wireless/hostap-driver-0.2.5

Reproducible: Always
Steps to Reproduce:
1. shut down system, pcmcia wlan card inserted
Actual Results:  
Error while stopping pcmcia
When in step remounting remaining fs ro, it gives me the possibility to login
again or press Ctrl-D to continue.
After next start the system says that the fs is not clean


Portage 2.0.51-r3 (default-linux/x86/2004.3, gcc-3.4.3,
glibc-2.3.4.20041102-r0,2.6.9-gentoo-r1 i686)
=================================================================
System uname: 2.6.9-gentoo-r1 i686 Mobile Intel(R) Pentium(R) 4 - M CPU 1.80GHz
Gentoo Base System version 1.6.6
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.15.92.0.2-r1
Headers:  sys-kernel/linux26-headers-2.6.8.1-r1
Libtools: sys-devel/libtool-1.5.2-r7
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer -fprefetch-loop-arrays"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown
/usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/
/usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/
/usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer -fprefetch-loop-arrays"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/
ftp://ftp.gentoo.mesh-solutions.com/gentoo/
ftp://ftp.tu-clausthal.de/pub/linux/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X X509 aalib acl acpi alsa apache2 arts artswrappersuid avi berkdb
bitmap-fonts cdr chroot crypt cups dba dvd encode esd ethereal fam flac
foomaticdb gd gdbm ggi gif gnutls gphoto2 gps gstreamer gtk gtk2 hostap-nopci
hostap-noplx imagemagick imlib ipv6 java jce jmx jpeg junit kde kerberos latex
ldap libg++ libwww madmikmod mmx mozdevelop mpeg mysql nas ncurses nls nptl
nptlonly ntlm odbc oggvorbis opengl pam pcmcia pdflib perl pic plotutils png pnp
postgres ppds pwdb python qt quicktime readline real samba scanner sdl slang slp
snmp spell sse sse2 ssl svg svga tcltk tcpd tetex theora tiff truetype trusted
unicode usagi usb wifi x86 xine xml xml2 xmms xprint xv xvid zlib linguas_de"
Comment 1 Doug Goldstein (RETIRED) gentoo-dev 2004-11-30 12:50:42 UTC
what card? what module? a listing of lsmod before you shutdown? Are you using hotplug or have the module in modules.autoload.d/kernel-2.6 or letting cardmgr load it? Those are my 4 questions. Anyone else think of any others?
Comment 2 Georg Müller 2004-11-30 13:17:22 UTC
- what card?

ASUS WL-100, this one has a prism 2.5 chip

Host AP driver diagnostics information for 'wlan0'

NICID: id=0x800c v1.0.0 (PRISM II (2.5) PCMCIA (SST parallel flash))
PRIID: id=0x0015 v1.1.1
STAID: id=0x001f v1.8.0 (station firmware)


- what module?

hostap_cs


- a listing of lsmod before you shutdown?

Here before shutting down:
Module                  Size  Used by
hostap_cs              54424  3
hostap_crypt_wep        5248  1
hostap                113032  2 hostap_cs,hostap_crypt_wep
ds                     14340  5 hostap_cs
yenta_socket           18688  2
pcmcia_core            52620  3 hostap_cs,ds,yenta_socket
... (rest is sound, nvidia, usb)

I will try to get some info about the state directly before power off and post it here

- Are you using hotplug or have the module in modules.autoload.d/kernel-2.6 or letting cardmgr load it?

hm, I have hotplug, but I think it is handled by cardmgr.
The association between card and module is in /etc/pcmcia/hostap.conf

cardmgr[6271]: socket 0: ASUS WL-100 802.11b WLAN  PC Card
hostap_cs: 0.2.5 - 2004-10-03 (Jouni Malinen <jkmaline@cc.hut.fi>)
hostap_cs: Registered netdevice wifi0
hostap_cs: index 0x01: Vcc 3.3, irq 11, io 0x0100-0x013f
wifi0: registered netdevice wlan0
net.agent[8446]: add event not handled
Comment 3 Georg Müller 2004-11-30 13:38:35 UTC
lsmod at maintenance login directly before halt:

Module                  Size  Used by
hostap_cs              54424  1
hostap_crypt_wep        5248  0
hostap                113032  2 hostap_cs,hostap_crypt_wep
ds                     14340  5 hostap_cs
yenta_socket           18688  2
pcmcia_core            52620  3 hostap_cs,ds,yenta_socket
nvidia               3463164  0
usb_storage            27136  0
ohci_hcd               18948  0
usbcore               101604  4 usb_storage,ohci_hcd

tail of dmesg:
wifi0: TXEXC - status=0x0004 ([Discon]) tx_control=000c
   retry_count=0 tx_rate=0 fc=0x4108 (Data::0 ToDS)
   A1=00:0c:41:a5:91:c6 A2=00:e0:18:ed:d0:46 A3=33:33:00:00:00:16 A4=00:00:00:00:00:00
unregister_netdevice: waiting for wlan0 to become free. Usage count = 1
... (several times) ...
unregister_netdevice: waiting for wlan0 to become free. Usage count = 1


Then I unplug my card manually before shutdown, dmesg shows this:

wifi0: Interrupt, but SWSUPPORT0 does not match: FFFF != 8A32 - card removed?
wifi0: prism2_interrupt: ev=0xffff
hostap_cs: CS_EVENT_CARD_REMOVAL
wifi0: card already removed or not configured during shutdown
wifi0: card already removed or not configured during shutdown
hostap_cs: Driver unloaded

and lsmod doesn't show hostap_cs anymore
Comment 4 Henrik Brix Andersen 2005-04-25 04:37:42 UTC
Reporter, please check if net-wireless/hostap-driver-0.3.7 fixes this issue.
Comment 5 Georg Müller 2005-05-18 16:51:41 UTC
Hm - I have a new PCI pccard now which uses hotplug.

I have emerged the latest hostap-driver and tried my old card and had no problems.
Comment 6 Henrik Brix Andersen 2005-05-19 01:13:23 UTC
Thank you for verifying.