[PATCH] fix pcmcia_device_remove oops

Hugh Dickins hugh at veritas.com
Sun Apr 2 07:09:28 EDT 2006


On Fri, 31 Mar 2006, Dominik Brodowski wrote:
> On Fri, Mar 10, 2006 at 09:15:19PM +0000, Hugh Dickins wrote:
> > I've not yet seen my cards working in -mm (maybe intermittent
> > anomaly at my end), and saw oops when removing and inserting card; but
> > follow those issues up another time, this is a good start just for
> > closing down the box.
> 
> Is this issue persistent? What cards are you using? lspcmcia -vv output
> (from pcmciautils-013) preferred :)

The "not yet seen my cards working in -mm" does look like intermittent
anomaly at my end.  I have now seen the Orinoco Gold card (the only
one I was really using) working with 2.6.16-mm2 - but also seen it
not working.  I think we can assume problems there are with the
card itself, or with my wireless setup: not any PCMCIA concern.

But the crash when removing that card persists (with 2.6.16-mm2:
2.6.16-git20 has no problem).  It looks like inserting the card
for the first time is okay, removing it hits a BUG, then reinserting
hits a kernel page fault - almost certainly because of the unclean
state left by the BUGgy remove.  So let's assume inserting is fine.

Here's the BUG trace from removing the card
(that machine still using the old cardmgr handling):

pccard: card ejected from slot 1
------------[ cut here ]------------
kernel BUG at net/core/dev.c:3140!
invalid opcode: 0000 [#1]
last sysfs file: /class/net/lo/address
Modules linked in: snd_pcm_oss snd_intel8x0 snd_ac97_codec snd_ac97_bus snd_pcm snd_timer snd_page_alloc
CPU:    0
EIP:    0060:[<c022e20e>]    Not tainted VLI
EFLAGS: 00010293   (2.6.16-mm2 #2) 
EIP is at free_netdev+0x23/0x44
eax: 00000002   ebx: dfc84800   ecx: 0001e100   edx: dfc84800
esi: dfc84800   edi: c02d6220   ebp: dff15e48   esp: dff15e48
ds: 007b   es: 007b   ss: 0068
Process pccardd (pid: 718, threadinfo=dff14000 task=dfdd3580)
Stack: <0>dff15e5c c01e8169 dfc84800 00000000 c14ee400 dff15e70 c01eaaff dfc84800 
       c14ee400 c02d6238 dff15e88 c0205936 c14ee400 c14ee4ec c02d6238 c14ee484 
       dff15ea0 c01cec70 c14ee484 c14ee484 dffb2448 dffb5c28 dff15eb0 c01cecba 
Call Trace:
 [<c0103306>] show_stack_log_lvl+0x8c/0x94
 [<c0103457>] show_registers+0x112/0x17b
 [<c010362d>] die+0xd4/0x16b
 [<c0103732>] do_trap+0x6e/0x8a
 [<c010392d>] do_invalid_op+0x90/0x97
 [<c0102fbf>] error_code+0x4f/0x54
 [<c01e8169>] free_orinocodev+0x18/0x1d
 [<c01eaaff>] orinoco_cs_detach+0x28/0x2f
 [<c0205936>] pcmcia_device_remove+0x54/0xc6
 [<c01cec70>] __device_release_driver+0x56/0x82
 [<c01cecba>] device_release_driver+0x1e/0x30
 [<c01ce440>] bus_remove_device+0x54/0x66
 [<c01cd618>] device_del+0x3b/0x67
 [<c01cd651>] device_unregister+0xd/0x18
 [<c02058c0>] pcmcia_card_remove+0x82/0xa4
 [<c020668b>] ds_event+0x50/0x90
 [<c0201c24>] send_event+0x43/0x75
 [<c0201c65>] socket_remove_drivers+0xf/0x11
 [<c0201d22>] socket_shutdown+0xe/0xca
 [<c0202162>] socket_remove+0x1d/0x22
 [<c02021a5>] socket_detect_change+0x3e/0x57
 [<c02022dc>] pccardd+0x11e/0x1c9
 [<c0100d25>] kernel_thread_helper+0x5/0xb
Code: f4 89 f8 5b 5e 5f 5d c3 55 89 e5 8b 55 08 8b 82 70 01 00 00 85 c0 75 0e 0f b7 42 64 29 c2 52 e8 77 56 f1 ff eb 24 83 f8 04 74 09 <0f> 0b ea 30 b1 2a c0 44 0c c7 82 70 01 00 00 05 00 00 00 8d 82 
 BUG: pccardd/718, lock held at task exit time!
 [dffb5d40] {pcmcia_register_socket}
.. held by:           pccardd:  718 [dfdd3580, 115]
... acquired at:               pccardd+0x112/0x1c9

And here's the pcmciautils-013 lspci -vv output:

Socket 0 Bridge:   	[yenta_cardbus] 	(bus ID: 0000:02:01.0)
	Configuration:	state: on	ready: yes
			Voltage: 5.0V Vcc: 5.0V Vpp: 0.0V
			Available IRQs: 3, 4, 5, 7, 9, 10
			Available iomem:	0x00000100 - 0x00000377
						0x00000380 - 0x000003af
						0x000003e0 - 0x000004cf
						0x000004d8 - 0x000004ff
						0x00000820 - 0x000008bf
						0x000008e0 - 0x000008ff
						0x00000a00 - 0x00000aff
						0x00000c00 - 0x00000cf7
						0x0000e000 - 0x0000ffff
			Available ioports:	0x000c0000 - 0x000fffff
						0x60000000 - 0x60ffffff
						0xa0000000 - 0xa0ffffff
						0xf9000000 - 0xfbffffff
Socket 0 Device 0:	[serial_cs]		(bus ID: 0.0)
	Configuration:	state: on
	Product Name:   Psion Dacom Gold Card Global 56K+Fax 56K+Fax V8.25 
	Identification:	manf_id: 0x016c	card_id: 0x0005
			function: 2 (serial)
			prod_id(1): "Psion Dacom" (0xf5f025c2)
			prod_id(2): "Gold Card Global 56K+Fax" (0x200e6e61)
			prod_id(3): "56K+Fax" (0x26477db8)
			prod_id(4): "V8.25" (0x0bdc119d)
Socket 1 Bridge:   	[yenta_cardbus] 	(bus ID: 0000:02:01.1)
	Configuration:	state: on	ready: yes
			Voltage: 5.0V Vcc: 5.0V Vpp: 0.0V
			Available IRQs: 3, 4, 5, 7, 9, 10
			Available iomem:	0x00000100 - 0x00000377
						0x00000380 - 0x000003af
						0x000003e0 - 0x000004cf
						0x000004d8 - 0x000004ff
						0x00000820 - 0x000008bf
						0x000008e0 - 0x000008ff
						0x00000a00 - 0x00000aff
						0x00000c00 - 0x00000cf7
						0x0000e000 - 0x0000ffff
			Available ioports:	0x000c0000 - 0x000fffff
						0x60000000 - 0x60ffffff
						0xa0000000 - 0xa0ffffff
						0xf9800000 - 0xfbffffff
Socket 1 Device 0:	[orinoco_cs]		(bus ID: 1.0)
	Configuration:	state: on
	Product Name:   Lucent Technologies WaveLAN/IEEE Version 01.01 
	Identification:	manf_id: 0x0156	card_id: 0x0002
			function: 6 (network)
			prod_id(1): "Lucent Technologies" (0x23eb9949)
			prod_id(2): "WaveLAN/IEEE" (0xc562e72a)
			prod_id(3): "Version 01.01" (0xd27deb1a)
			prod_id(4): --- (---)

Hugh



More information about the linux-pcmcia mailing list