Kurt Van Dijck wrote:
> This is my first iteration to make softing_cs driver compile under
> linux-2.6.33 kernel.
> Please not it just compiles. I had no way to verify actual operation
> yet.
>
> The pcmcia_request_window() is postponed a little, as some flags must be
> set before this call (I believe). It is a small change, but with some
> noise in the patch.
>
> Oliver (or anyone else with a softing pcmcia card),
> are you able to verify this with a net-next-2.6 kernel?
> Otherwise, I'll have to see if I get it working.
I'll check it tomorrow morning as i don't have a softing card at home.
Especially i'm interested if i do get the same lockdep warning at card
insertion i've currently seen on the latest PEAK SVN snapshot and the
ems_pcmcia driver (see below).
If so, there is a general problem that emerged in 2.6.32 ...
Thanks,
Oliver
----
[ 615.070944] tg3 0000:09:00.0: eth0: Flow control is on for TX and on for RX
[ 615.071375] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 625.272097] eth0: no IPv6 routers present
[ 854.289725] CAN device driver interface
[ 866.056470] sja1000 CAN netdevice driver
[ 886.796096] pcmcia_socket pcmcia_socket0: pccard: PCMCIA card inserted into
slot 0
[ 886.796201] pcmcia_socket pcmcia_socket0: cs: memory probe
0x0c0000-0x0fffff: excluding 0xc0000-0xcffff 0xf0000-0xfffff
[ 886.813584] pcmcia_socket pcmcia_socket0: cs: memory probe
0x60000000-0x60ffffff: excluding 0x60000000-0x60ffffff
[ 886.813671] pcmcia_socket pcmcia_socket0: cs: memory probe
0x80000000-0x83ffffff: excluding 0x80000000-0x83ffffff
[ 886.813726] pcmcia_socket pcmcia_socket0: cs: memory probe
0xa0000000-0xa0ffffff: clean.
[ 886.833267] pcmcia_socket pcmcia_socket0: cs: memory probe
0xfe400000-0xfe4fffff: excluding 0xfe400000-0xfe40ffff 0xfe4f0000-0xfe4fffff
[ 886.851065] pcmcia 0.0: pcmcia: registering new device pcmcia0.0
[ 886.892049]
[ 886.892051] =======================================================
[ 886.892054] [ INFO: possible circular locking dependency detected ]
[ 886.892057] 2.6.33-rc8-03785-gcf261b2 #81
[ 886.892059] -------------------------------------------------------
[ 886.892061] pccardd/1786 is trying to acquire lock:
[ 886.892064] (rtnl_mutex){+.+.+.}, at: [<c128d0f0>] rtnl_lock+0xf/0x11
[ 886.892073]
[ 886.892073] but task is already holding lock:
[ 886.892075] (device_add_lock){+.+.+.}, at: [<f97e0048>]
pcmcia_device_add+0x29/0x25a [pcmcia]
[ 886.892084]
[ 886.892085] which lock already depends on the new lock.
[ 886.892086]
[ 886.892088]
[ 886.892088] the existing dependency chain (in reverse order) is:
[ 886.892091]
[ 886.892092] -> #4 (device_add_lock){+.+.+.}:
[ 886.892096] [<c1045f86>] __lock_acquire+0x9fb/0xb6d
[ 886.892101] [<c1046154>] lock_acquire+0x5c/0x73
[ 886.892105] [<c1313e27>] __mutex_lock_common+0x26/0x2ba
[ 886.892110] [<c1314159>] mutex_lock_nested+0x30/0x38
[ 886.892114] [<f97e0048>] pcmcia_device_add+0x29/0x25a [pcmcia]
[ 886.892120] [<f97e02e3>] pcmcia_card_add+0x6a/0x8a [pcmcia]
[ 886.892125] [<f97e0406>] ds_event+0x78/0x95 [pcmcia]
[ 886.892131] [<f845033a>] send_event+0x54/0x6e [pcmcia_core]
[ 886.892137] [<f84506d0>] socket_insert+0xe0/0xf3 [pcmcia_core]
[ 886.892143] [<f8450e4b>] pccardd+0x173/0x210 [pcmcia_core]
[ 886.892150] [<c10375af>] kthread+0x5f/0x64
[ 886.892154] [<c1002cfa>] kernel_thread_helper+0x6/0x1a
[ 886.892159]
[ 886.892160] -> #3 (&socket->skt_mutex){+.+.+.}:
[ 886.892164] [<c1045f86>] __lock_acquire+0x9fb/0xb6d
[ 886.892168] [<c1046154>] lock_acquire+0x5c/0x73
[ 886.892171] [<c1313e27>] __mutex_lock_common+0x26/0x2ba
[ 886.892175] [<c1314159>] mutex_lock_nested+0x30/0x38
[ 886.892179] [<f8452c5d>] pccard_store_resource+0x57/0xc6 [pcmcia_core]
[ 886.892186] [<c11cfa63>] dev_attr_store+0x1b/0x23
[ 886.892191] [<c10b9997>] sysfs_write_file+0xc0/0xeb
[ 886.892196] [<c1082f88>] vfs_write+0x78/0xac
[ 886.892201] [<c1083050>] sys_write+0x3b/0x5d
[ 886.892205] [<c10027d0>] sysenter_do_call+0x12/0x36
[ 886.892209]
[ 886.892210] -> #2 (s_active){++++.+}:
[ 886.892214] [<c1045f86>] __lock_acquire+0x9fb/0xb6d
[ 886.892218] [<c1046154>] lock_acquire+0x5c/0x73
[ 886.892222] [<c10ba7b1>] sysfs_addrm_finish+0x8f/0xe2
[ 886.892226] [<c10b92e8>] sysfs_hash_and_remove+0x3d/0x4f
[ 886.892229] [<c10bb4c9>] sysfs_remove_group+0x52/0x81
[ 886.892233] [<c11d4ea8>] dpm_sysfs_remove+0x10/0x12
[ 886.892238] [<c11d04f8>] device_del+0x33/0x138
[ 886.892242] [<c11d0608>] device_unregister+0xb/0x15
[ 886.892246] [<c11d6c63>] _request_firmware+0x315/0x35f
[ 886.892250] [<c11d6d0d>] request_firmware+0xa/0xd
[ 886.892254] [<f9f42210>] b43_do_request_fw+0x97/0x18f [b43]
[ 886.892265] [<f9f43132>] b43_try_request_fw+0x66/0x254 [b43]
[ 886.892274] [<f9f44a87>] b43_chip_init+0x56/0x804 [b43]
[ 886.892283] [<f9f45392>] b43_wireless_core_init+0x15d/0x5be [b43]
[ 886.892293] [<f9f45c36>] b43_op_start+0x116/0x161 [b43]
[ 886.892302] [<f9c8c09d>] ieee80211_open+0x24e/0x559 [mac80211]
[ 886.892314] [<c1285c12>] dev_open+0x86/0xbb
[ 886.892319] [<c128529a>] dev_change_flags+0x96/0x145
[ 886.892323] [<c12b7401>] devinet_ioctl+0x21e/0x497
[ 886.892328] [<c12b86cd>] inet_ioctl+0x8e/0xa7
[ 886.892331] [<c1278469>] sock_ioctl+0x1c9/0x1ed
[ 886.892336] [<c108c702>] vfs_ioctl+0x27/0x91
[ 886.892340] [<c108cc87>] do_vfs_ioctl+0x47c/0x4ba
[ 886.892343] [<c108ccf3>] sys_ioctl+0x2e/0x48
[ 886.892347] [<c10027d0>] sysenter_do_call+0x12/0x36
[ 886.892351]
[ 886.892352] -> #1 (&wl->mutex){+.+.+.}:
[ 886.892356] [<c1045f86>] __lock_acquire+0x9fb/0xb6d
[ 886.892360] [<c1046154>] lock_acquire+0x5c/0x73
[ 886.892364] [<c1313e27>] __mutex_lock_common+0x26/0x2ba
[ 886.892368] [<c1314159>] mutex_lock_nested+0x30/0x38
[ 886.892371] [<f9f45c25>] b43_op_start+0x105/0x161 [b43]
[ 886.892383] [<f9c8c09d>] ieee80211_open+0x24e/0x559 [mac80211]
[ 886.892394] [<c1285c12>] dev_open+0x86/0xbb
[ 886.892398] [<c128529a>] dev_change_flags+0x96/0x145
[ 886.892402] [<c12b7401>] devinet_ioctl+0x21e/0x497
[ 886.892406] [<c12b86cd>] inet_ioctl+0x8e/0xa7
[ 886.892410] [<c1278469>] sock_ioctl+0x1c9/0x1ed
[ 886.892414] [<c108c702>] vfs_ioctl+0x27/0x91
[ 886.892418] [<c108cc87>] do_vfs_ioctl+0x47c/0x4ba
[ 886.892421] [<c108ccf3>] sys_ioctl+0x2e/0x48
[ 886.892425] [<c10027d0>] sysenter_do_call+0x12/0x36
[ 886.892429]
[ 886.892429] -> #0 (rtnl_mutex){+.+.+.}:
[ 886.892433] [<c1045e88>] __lock_acquire+0x8fd/0xb6d
[ 886.892437] [<c1046154>] lock_acquire+0x5c/0x73
[ 886.892441] [<c1313e27>] __mutex_lock_common+0x26/0x2ba
[ 886.892445] [<c1314159>] mutex_lock_nested+0x30/0x38
[ 886.892449] [<c128d0f0>] rtnl_lock+0xf/0x11
[ 886.892452] [<c1286af7>] register_netdev+0xe/0x41
[ 886.892456] [<f844d20a>] unregister_candev+0x1c/0x1e [can_dev]
[ 886.892461] [<f846b32b>] register_sja1000dev+0x12b/0x133 [sja1000]
[ 886.892466] [<f847e39e>] ems_pcmcia_probe+0x277/0x341 [ems_pcmcia]
[ 886.892470] [<f97df6f1>] pcmcia_device_probe+0xdf/0x14f [pcmcia]
[ 886.892477] [<c11d2419>] driver_probe_device+0x79/0xed
[ 886.892482] [<c11d2516>] __device_attach+0x2a/0x2e
[ 886.892486] [<c11d1a28>] bus_for_each_drv+0x3d/0x67
[ 886.892490] [<c11d2580>] device_attach+0x47/0x5b
[ 886.892494] [<c11d18c4>] bus_probe_device+0x1b/0x30
[ 886.892498] [<c11d09a8>] device_add+0x2e3/0x42b
[ 886.892502] [<c11d0b02>] device_register+0x12/0x15
[ 886.892506] [<f97e0201>] pcmcia_device_add+0x1e2/0x25a [pcmcia]
[ 886.892512] [<f97e02e3>] pcmcia_card_add+0x6a/0x8a [pcmcia]
[ 886.892517] [<f97e0406>] ds_event+0x78/0x95 [pcmcia]
[ 886.892523] [<f845033a>] send_event+0x54/0x6e [pcmcia_core]
[ 886.892529] [<f84506d0>] socket_insert+0xe0/0xf3 [pcmcia_core]
[ 886.892535] [<f8450e4b>] pccardd+0x173/0x210 [pcmcia_core]
[ 886.892541] [<c10375af>] kthread+0x5f/0x64
[ 886.892545] [<c1002cfa>] kernel_thread_helper+0x6/0x1a
[ 886.892549]
[ 886.892550] other info that might help us debug this:
[ 886.892551]
[ 886.892553] 2 locks held by pccardd/1786:
[ 886.892555] #0: (&socket->skt_mutex){+.+.+.}, at: [<f8450dfc>]
pccardd+0x124/0x210 [pcmcia_core]
[ 886.892565] #1: (device_add_lock){+.+.+.}, at: [<f97e0048>]
pcmcia_device_add+0x29/0x25a [pcmcia]
[ 886.892573]
[ 886.892574] stack backtrace:
[ 886.892577] Pid: 1786, comm: pccardd Not tainted 2.6.33-rc8-03785-gcf261b2
#81
[ 886.892579] Call Trace:
[ 886.892583] [<c1312f60>] ? printk+0xf/0x11
[ 886.892587] [<c104524f>] print_circular_bug+0x8a/0x96
[ 886.892591] [<c1045e88>] __lock_acquire+0x8fd/0xb6d
[ 886.892595] [<c1046154>] lock_acquire+0x5c/0x73
[ 886.892599] [<c128d0f0>] ? rtnl_lock+0xf/0x11
[ 886.892603] [<c1313e27>] __mutex_lock_common+0x26/0x2ba
[ 886.892607] [<c128d0f0>] ? rtnl_lock+0xf/0x11
[ 886.892611] [<c1132211>] ? __raw_spin_lock_init+0x28/0x4b
[ 886.892616] [<c104b704>] ? is_module_address+0x8/0xf
[ 886.892619] [<c1043d2d>] ? static_obj+0x6b/0x7a
[ 886.892623] [<c1314159>] mutex_lock_nested+0x30/0x38
[ 886.892626] [<c128d0f0>] ? rtnl_lock+0xf/0x11
[ 886.892630] [<c128d0f0>] rtnl_lock+0xf/0x11
[ 886.892634] [<c1286af7>] register_netdev+0xe/0x41
[ 886.892638] [<f844d20a>] unregister_candev+0x1c/0x1e [can_dev]
[ 886.892642] [<f846b32b>] register_sja1000dev+0x12b/0x133 [sja1000]
[ 886.892646] [<f847e39e>] ems_pcmcia_probe+0x277/0x341 [ems_pcmcia]
[ 886.892655] [<f8452751>] ? pccard_read_tuple+0xa3/0xad [pcmcia_core]
[ 886.892660] [<f97df6f1>] pcmcia_device_probe+0xdf/0x14f [pcmcia]
[ 886.892665] [<c11d2300>] ? driver_sysfs_add+0xe/0x4e
[ 886.892669] [<c11d2419>] driver_probe_device+0x79/0xed
[ 886.892673] [<c11d2516>] __device_attach+0x2a/0x2e
[ 886.892678] [<c11d1a28>] bus_for_each_drv+0x3d/0x67
[ 886.892682] [<c11d2580>] device_attach+0x47/0x5b
[ 886.892686] [<c11d24ec>] ? __device_attach+0x0/0x2e
[ 886.892690] [<c11d18c4>] bus_probe_device+0x1b/0x30
[ 886.892693] [<c11d09a8>] device_add+0x2e3/0x42b
[ 886.892697] [<c1132211>] ? __raw_spin_lock_init+0x28/0x4b
[ 886.892701] [<c11d041f>] ? device_initialize+0xac/0xb4
[ 886.892705] [<c11d0b02>] device_register+0x12/0x15
[ 886.892711] [<f97e0201>] pcmcia_device_add+0x1e2/0x25a [pcmcia]
[ 886.892717] [<f97e02e3>] pcmcia_card_add+0x6a/0x8a [pcmcia]
[ 886.892722] [<c112075c>] ? kobject_get+0x12/0x17
[ 886.892728] [<f97e0406>] ds_event+0x78/0x95 [pcmcia]
[ 886.892734] [<f845033a>] send_event+0x54/0x6e [pcmcia_core]
[ 886.892741] [<f84506d0>] socket_insert+0xe0/0xf3 [pcmcia_core]
[ 886.892748] [<f8450e4b>] pccardd+0x173/0x210 [pcmcia_core]
[ 886.892754] [<f8450cd8>] ? pccardd+0x0/0x210 [pcmcia_core]
[ 886.892758] [<c10375af>] kthread+0x5f/0x64
[ 886.892761] [<c1037550>] ? kthread+0x0/0x64
[ 886.892765] [<c1002cfa>] kernel_thread_helper+0x6/0x1a
[ 886.893670] ems_pcmcia: registered can0 on channel #0 at 0xfb5c6100, irq 19
[ 886.895023] ems_pcmcia: registered can1 on channel #1 at 0xfb5c6180, irq 19
_______________________________________________
Socketcan-core mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-core