Bug 7244 - zd1211rw: inconsistent lock state
Summary: zd1211rw: inconsistent lock state
Status: CLOSED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: network-wireless (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Ulrich Kunitz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-01 08:56 UTC by Laurent Riffard
Modified: 2006-10-04 14:36 UTC (History)
0 users

See Also:
Kernel Version: 2.6.18-mm2
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
Full dmesg (24.71 KB, text/plain)
2006-10-01 08:59 UTC, Laurent Riffard
Details
.config (48.21 KB, text/plain)
2006-10-01 09:00 UTC, Laurent Riffard
Details
Patch (1.89 KB, patch)
2006-10-03 13:37 UTC, Ulrich Kunitz
Details | Diff

Description Laurent Riffard 2006-10-01 08:56:38 UTC
Distribution: Mandriva 2007 RC2

Hardware Environment: i686-based desktop, USB Wifi adapter which appears to be a
"Sagem XG76NA" (USB ID is 079b:0062, RF Type is AL2230). 

Problem Description: When I plug the adapter, the following lines appear in dmesg:

usb 1-1: new full speed USB device using uhci_hcd and address 3
usb 1-1: new device found, idVendor=079b, idProduct=0062
usb 1-1: new device strings: Mfr=16, Product=32, SerialNumber=0
usb 1-1: Product: 802.11b/g USB WLAN
usb 1-1: Manufacturer: ZyDAS
usb 1-1: configuration #1 chosen from 1 choice
ieee80211_crypt: registered algorithm 'NULL'
ieee80211: 802.11 data/management/control stack, git-1.1.13
ieee80211: Copyright (C) 2004-2005 Intel Corporation <jketreno@linux.intel.com>

=================================
[ INFO: inconsistent lock state ]
2.6.18-mm2 #163
---------------------------------
inconsistent {hardirq-on-W} -> {in-hardirq-W} usage.
swapper/0 [HC1[1]:SC0[0]:HE0:SE1] takes:
(&intr->lock){+-..}, at: [<e1057675>] int_urb_complete+0x6f/0xde [zd1211rw]
{hardirq-on-W} state was registered at:
 [<c012d16f>] __lock_acquire+0x43b/0x9aa
 [<c012d9a3>] lock_acquire+0x60/0x80
 [<c029232e>] _spin_lock+0x19/0x28
 [<e1056d28>] zd_usb_ioread16v+0xc8/0x1d1 [zd1211rw]
 [<e1056e4e>] zd_usb_init_hw+0x1d/0x1f [zd1211rw]
 [<e105647a>] zd_chip_init_hw+0x67/0x5b4 [zd1211rw]
 [<e1054fc8>] zd_mac_init_hw+0x28/0x10a [zd1211rw]
 [<e1057cd6>] probe+0x3f6/0x49f [zd1211rw]
 [<e0bf63b1>] usb_probe_interface+0x92/0xc9 [usbcore]
 [<c021e083>] really_probe+0x3b/0xb9
 [<c021e181>] driver_probe_device+0x80/0x8b
 [<c021e283>] __driver_attach+0x74/0xab
 [<c021d7a7>] bus_for_each_dev+0x3a/0x5f
 [<c021dfa6>] driver_attach+0x14/0x16
 [<c021da80>] bus_add_driver+0x61/0x15b
 [<c021e49a>] driver_register+0x72/0x77
 [<e0bf5f6b>] usb_register_driver+0x6f/0xd0 [usbcore]
 [<e1061044>] usb_init+0x44/0x65 [zd1211rw]
 [<c01336c4>] sys_init_module+0x1234/0x139d
 [<c0102c41>] sysenter_past_esp+0x56/0x8d
 [<ffffffff>] 0xffffffff
irq event stamp: 20712220
hardirqs last  enabled at (20712219): [<c0101a9a>] default_idle+0x41/0x72
hardirqs last disabled at (20712220): [<c01036a3>] common_interrupt+0x1b/0x2c
softirqs last  enabled at (20712204): [<c011af9d>] __do_softirq+0x97/0x9c
softirqs last disabled at (20712137): [<c011afcc>] do_softirq+0x2a/0x42

other info that might help us debug this:
no locks held by swapper/0.

stack backtrace:
[<c0103939>] show_trace_log_lvl+0x12/0x25
[<c0103a1a>] show_trace+0xd/0x10
[<c010412c>] dump_stack+0x19/0x1b
[<c012c063>] print_usage_bug+0x1d1/0x1de
[<c012c3d0>] mark_lock+0x8a/0x349
[<c012d0f0>] __lock_acquire+0x3bc/0x9aa
[<c012d9a3>] lock_acquire+0x60/0x80
[<c029232e>] _spin_lock+0x19/0x28
[<e1057675>] int_urb_complete+0x6f/0xde [zd1211rw]
[<e0bf29e0>] usb_hcd_giveback_urb+0x1a/0x48 [usbcore]
[<e0a8c71f>] uhci_giveback_urb+0x11b/0x142 [uhci_hcd]
[<e0a8cd3e>] uhci_scan_schedule+0x4fd/0x771 [uhci_hcd]
[<e0a8e7bf>] uhci_irq+0x122/0x138 [uhci_hcd]
[<e0bf3229>] usb_hcd_irq+0x26/0x53 [usbcore]
[<c013829c>] handle_IRQ_event+0x20/0x4d
[<c0139539>] handle_level_irq+0x90/0xe3
[<c0104fad>] do_IRQ+0x87/0x9a
[<c01036ad>] common_interrupt+0x25/0x2c
[<c0101b07>] cpu_idle+0x3c/0x51
[<c010053b>] rest_init+0x1e/0x23
[<c03c26cd>] start_kernel+0x2e2/0x2e4
[<00000000>] 0x0
=======================
zd1211rw 1-1:1.0: firmware version 4725
zd1211rw 1-1:1.0: zd1211b chip 079b:0062 v4810 full 00-60-b3 AL2230_RF pa0 g---
zd1211rw 1-1:1.0: eth1
usbcore: registered new interface driver zd1211rw
ieee80211_crypt: registered algorithm 'WEP'
SoftMAC: Open Authentication completed with 00:16:41:8f:79:0d

Steps to reproduce: Plug the USB Wifi adapter...
Comment 1 Laurent Riffard 2006-10-01 08:59:44 UTC
Created attachment 9140 [details]
Full dmesg

BTW, the zd1211rw driver comes from http://dsd.object4.net/git/zd1211.git, this
is not in-kernel one.
Comment 2 Laurent Riffard 2006-10-01 09:00:27 UTC
Created attachment 9141 [details]
.config
Comment 3 Laurent Riffard 2006-10-03 13:22:41 UTC
This bug seems to have gone with kernel 2.6.18-mm3, here is the dmesg output
produced while pluging and unplugging the device:

usb 1-1: new full speed USB device using uhci_hcd and address 4
usb 1-1: new device found, idVendor=079b, idProduct=0062
usb 1-1: new device strings: Mfr=16, Product=32, SerialNumber=0
usb 1-1: Product: 802.11b/g USB WLAN
usb 1-1: Manufacturer: ZyDAS
usb 1-1: configuration #1 chosen from 1 choice
ieee80211_crypt: registered algorithm 'NULL'
ieee80211: 802.11 data/management/control stack, git-1.1.13
ieee80211: Copyright (C) 2004-2005 Intel Corporation <jketreno@linux.intel.com>
zd1211rw 1-1:1.0: firmware version 4725
zd1211rw 1-1:1.0: zd1211b chip 079b:0062 v4810 full 00-60-b3 AL2230_RF pa0 g---
zd1211rw 1-1:1.0: eth1
usbcore: registered new interface driver zd1211rw
usb 1-1: USB disconnect, address 4
Comment 4 Ulrich Kunitz 2006-10-03 13:37:03 UTC
Created attachment 9150 [details]
Patch
Comment 5 Ulrich Kunitz 2006-10-03 13:39:30 UTC
Bug is fixed see patch.

It is also available in my git tree: http://www.deine-taler.de/zd1211/zd1211.git/
Comment 6 Laurent Riffard 2006-10-04 14:36:21 UTC
Confirmed, the patch fixed the warning in 2.6.18-mm2.

Note You need to log in before you can comment on or make changes to this bug.