Return-path: Received: from wolverine01.qualcomm.com ([199.106.114.254]:51664 "EHLO wolverine01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754306Ab1JZHWh (ORCPT ); Wed, 26 Oct 2011 03:22:37 -0400 Message-ID: <4EA7B536.70107@qca.qualcomm.com> (sfid-20111026_092242_667403_457F4168) Date: Wed, 26 Oct 2011 10:22:30 +0300 From: Kalle Valo MIME-Version: 1.0 To: Vasanthakumar Thiagarajan CC: Subject: Re: [PATCH V2 00/31] ath6kl Add multiple vif support References: <1319551466-29070-1-git-send-email-vthiagar@qca.qualcomm.com> In-Reply-To: <1319551466-29070-1-git-send-email-vthiagar@qca.qualcomm.com> Content-Type: text/plain; charset="ISO-8859-1" Sender: linux-wireless-owner@vger.kernel.org List-ID: On 10/25/2011 05:03 PM, Vasanthakumar Thiagarajan wrote: > This patch set adds basic infrastructure for multiple > virtual interface. As configuring the firmware with more than one > vif causes random target assert, the number of supported vifs is > restricted to 1 for now. I would like to thank Vivek Natarajan > (nataraja@qca.qualcomm.com) for his inital work in this area and > Arthi Thiruvengadam (athiruve@qca.qualcomm.com) for finding some > critical bugs. I saw the lockdep warning below after I loaded the module and connected to an AP. But the driver still functioned normally. Kalle [ 73.439849] ath6kl: hw 2.1.1 fw 3.1.1.609 [ 75.408050] [ 75.408081] ========================================================= [ 75.416320] [ INFO: possible irq lock inversion dependency detected ] [ 75.423004] 3.1.0-rc9-wl+ #44 [ 75.426086] --------------------------------------------------------- [ 75.432800] swapper/0 just changed the state of lock: [ 75.438049] (&(&ar->lock)->rlock){+.-...}, at: [] ath6kl_indicate_tx_activity+0x38/0xb8 [ath6kl] [ 75.448303] but this lock took another, SOFTIRQ-unsafe lock in the past: [ 75.455261] (&(&ar->list_lock)->rlock){+.+...} [ 75.459808] [ 75.459808] and interrupts could create inverse lock ordering between them. [ 75.459808] [ 75.470306] [ 75.470306] other info that might help us debug this: [ 75.477081] Possible interrupt unsafe locking scenario: [ 75.477081] [ 75.484130] CPU0 CPU1 [ 75.488861] ---- ---- [ 75.493560] lock(&(&ar->list_lock)->rlock); [ 75.498107] local_irq_disable(); [ 75.504241] lock(&(&ar->lock)->rlock); [ 75.510955] lock(&(&ar->list_lock)->rlock); [ 75.518096] [ 75.520812] lock(&(&ar->lock)->rlock); [ 75.525085] [ 75.525085] *** DEADLOCK *** [ 75.525085] [ 75.531249] 3 locks held by swapper/0: [ 75.535156] #0: (&n->timer){+.-...}, at: [] run_timer_softirq+0x244/0x564 [ 75.543334] #1: (rcu_read_lock_bh){.+....}, at: [] dev_queue_xmit+0x0/0x714 [ 75.551696] #2: (_xmit_ETHER#2){+.-...}, at: [] sch_direct_xmit+0x38/0x2dc [ 75.559936] [ 75.559967] the shortest dependencies between 2nd lock and 1st lock: [ 75.568115] -> (&(&ar->list_lock)->rlock){+.+...} ops: 60 { [ 75.574035] HARDIRQ-ON-W at: [ 75.577392] [] __lock_acquire+0x7b0/0x1a8c [ 75.586273] [] lock_acquire+0x158/0x1a8 [ 75.594879] [] _raw_spin_lock+0x4c/0x84 [ 75.603485] [] ath6kl_interface_add+0x184/0x1e0 [ath6kl] [ 75.613677] [] ath6kl_core_init+0xe9c/0x1760 [ath6kl] [ 75.623565] [] ath6kl_sdio_probe+0x324/0x3bc [ath6kl] [ 75.633483] [] sdio_bus_probe+0x100/0x164 [ 75.642272] [] driver_probe_device+0x14c/0x290 [ 75.651519] [] __driver_attach+0x68/0x8c [ 75.660217] [] bus_for_each_dev+0x4c/0x8c [ 75.669006] [] bus_add_driver+0xc4/0x250 [ 75.677703] [] driver_register+0xc0/0x150 [ 75.686462] [] 0xbf02700c [ 75.693817] [] do_one_initcall+0x94/0x160 [ 75.702606] [] sys_init_module+0x1220/0x13e0 [ 75.711669] [] ret_fast_syscall+0x0/0x3c [ 75.720367] SOFTIRQ-ON-W at: [ 75.723724] [] __lock_acquire+0x7d4/0x1a8c [ 75.732604] [] lock_acquire+0x158/0x1a8 [ 75.741180] [] _raw_spin_lock+0x4c/0x84 [ 75.749786] [] ath6kl_interface_add+0x184/0x1e0 [ath6kl] [ 75.759979] [] ath6kl_core_init+0xe9c/0x1760 [ath6kl] [ 75.769897] [] ath6kl_sdio_probe+0x324/0x3bc [ath6kl] [ 75.779785] [] sdio_bus_probe+0x100/0x164 [ 75.788574] [] driver_probe_device+0x14c/0x290 [ 75.797821] [] __driver_attach+0x68/0x8c [ 75.806518] [] bus_for_each_dev+0x4c/0x8c [ 75.815307] [] bus_add_driver+0xc4/0x250 [ 75.824005] [] driver_register+0xc0/0x150 [ 75.832794] [] 0xbf02700c [ 75.840118] [] do_one_initcall+0x94/0x160 [ 75.848907] [] sys_init_module+0x1220/0x13e0 [ 75.857940] [] ret_fast_syscall+0x0/0x3c [ 75.866638] INITIAL USE at: [ 75.869903] [] __lock_acquire+0x838/0x1a8c [ 75.878692] [] lock_acquire+0x158/0x1a8 [ 75.887207] [] _raw_spin_lock+0x4c/0x84 [ 75.895721] [] ath6kl_interface_add+0x184/0x1e0 [ath6kl] [ 75.905792] [] ath6kl_core_init+0xe9c/0x1760 [ath6kl] [ 75.915618] [] ath6kl_sdio_probe+0x324/0x3bc [ath6kl] [ 75.925445] [] sdio_bus_probe+0x100/0x164 [ 75.934143] [] driver_probe_device+0x14c/0x290 [ 75.943298] [] __driver_attach+0x68/0x8c [ 75.951904] [] bus_for_each_dev+0x4c/0x8c [ 75.960571] [] bus_add_driver+0xc4/0x250 [ 75.969177] [] driver_register+0xc0/0x150 [ 75.977874] [] 0xbf02700c [ 75.985107] [] do_one_initcall+0x94/0x160 [ 75.993804] [] sys_init_module+0x1220/0x13e0 [ 76.002777] [] ret_fast_syscall+0x0/0x3c [ 76.011383] } [ 76.013183] ... key at: [] __key.38763+0x0/0xffff848c [ath6kl] [ 76.020843] ... acquired at: [ 76.024017] [] lock_acquire+0x158/0x1a8 [ 76.029174] [] _raw_spin_lock+0x4c/0x84 [ 76.034362] [] ath6kl_get_vif_by_index+0x68/0x78 [ath6kl] [ 76.041198] [] ath6kl_tx_complete+0x178/0x4c0 [ath6kl] [ 76.047760] [] htc_tx_comp_handler+0x4c/0x54 [ath6kl] [ 76.054229] [] ath6kl_hif_rw_comp_handler+0x48/0x60 [ath6kl] [ 76.061340] [] ath6kl_sdio_write_async_work+0x90/0xbc [ath6kl] [ 76.068634] [] process_one_work+0x354/0x628 [ 76.074157] [] worker_thread+0x1f4/0x3c0 [ 76.079437] [] kthread+0x80/0x88 [ 76.083953] [] kernel_thread_exit+0x0/0x8 [ 76.089324] [ 76.090850] -> (&(&ar->lock)->rlock){+.-...} ops: 23 { [ 76.096221] HARDIRQ-ON-W at: [ 76.099487] [] __lock_acquire+0x7b0/0x1a8c [ 76.108184] [] lock_acquire+0x158/0x1a8 [ 76.116607] [] _raw_spin_lock_bh+0x54/0x8c [ 76.125305] [] ath6kl_refill_amsdu_rxbufs+0x68/0x94 [ath6kl] [ 76.135681] [] ath6kl_core_init+0x1730/0x1760 [ath6kl] [ 76.145477] [] ath6kl_sdio_probe+0x324/0x3bc [ath6kl] [ 76.155212] [] sdio_bus_probe+0x100/0x164 [ 76.163818] [] driver_probe_device+0x14c/0x290 [ 76.172882] [] __driver_attach+0x68/0x8c [ 76.181396] [] bus_for_each_dev+0x4c/0x8c [ 76.190002] [] bus_add_driver+0xc4/0x250 [ 76.198516] [] driver_register+0xc0/0x150 [ 76.207122] [] 0xbf02700c [ 76.214263] [] do_one_initcall+0x94/0x160 [ 76.222869] [] sys_init_module+0x1220/0x13e0 [ 76.231750] [] ret_fast_syscall+0x0/0x3c [ 76.240264] IN-SOFTIRQ-W at: [ 76.243530] [] __lock_acquire+0x748/0x1a8c [ 76.252227] [] lock_acquire+0x158/0x1a8 [ 76.260650] [] _raw_spin_lock_bh+0x54/0x8c [ 76.269348] [] ath6kl_indicate_tx_activity+0x38/0xb8 [ath6kl] [ 76.279785] [] ath6kl_wmi_create_pstream_cmd+0x1e0/0x224 [ath6kl] [ 76.290618] [] ath6kl_wmi_implicit_create_pstream+0x100/0x138 [ath6kl] [ 76.301910] [] ath6kl_data_tx+0x2d0/0x5fc [ath6kl] [ 76.311370] [] dev_hard_start_xmit+0x504/0x840 [ 76.320404] [] sch_direct_xmit+0x5c/0x2dc [ 76.329010] [] dev_queue_xmit+0x424/0x714 [ 76.337615] [] arp_solicit+0x214/0x254 [ 76.345977] [] neigh_timer_handler+0x22c/0x2a8 [ 76.355010] [] run_timer_softirq+0x36c/0x564 [ 76.363891] [] __do_softirq+0x138/0x314 [ 76.372314] [] irq_exit+0x54/0xb4 [ 76.380187] [] handle_IRQ+0x68/0x8c [ 76.388244] [] __irq_svc+0x38/0xa0 [ 76.396240] [] trace_hardirqs_on_caller+0x1c/0x19c [ 76.405639] [] cpu_idle+0x7c/0xcc [ 76.413513] [] start_kernel+0x2ac/0x30c [ 76.421936] INITIAL USE at: [ 76.425109] [] __lock_acquire+0x838/0x1a8c [ 76.433715] [] lock_acquire+0x158/0x1a8 [ 76.442047] [] _raw_spin_lock_bh+0x54/0x8c [ 76.450653] [] ath6kl_refill_amsdu_rxbufs+0x68/0x94 [ath6kl] [ 76.460937] [] ath6kl_core_init+0x1730/0x1760 [ath6kl] [ 76.470672] [] ath6kl_sdio_probe+0x324/0x3bc [ath6kl] [ 76.480316] [] sdio_bus_probe+0x100/0x164 [ 76.488830] [] driver_probe_device+0x14c/0x290 [ 76.497802] [] __driver_attach+0x68/0x8c [ 76.506225] [] bus_for_each_dev+0x4c/0x8c [ 76.514739] [] bus_add_driver+0xc4/0x250 [ 76.523162] [] driver_register+0xc0/0x150 [ 76.531677] [] 0xbf02700c [ 76.538757] [] do_one_initcall+0x94/0x160 [ 76.547241] [] sys_init_module+0x1220/0x13e0 [ 76.556030] [] ret_fast_syscall+0x0/0x3c [ 76.564453] } [ 76.566192] ... key at: [] __key.38761+0x0/0xffff847c [ath6kl] [ 76.573730] ... acquired at: [ 76.576812] [] check_usage_forwards+0xd8/0xfc [ 76.582519] [] mark_lock+0x388/0x618 [ 76.587432] [] __lock_acquire+0x748/0x1a8c [ 76.592864] [] lock_acquire+0x158/0x1a8 [ 76.598022] [] _raw_spin_lock_bh+0x54/0x8c [ 76.603485] [] ath6kl_indicate_tx_activity+0x38/0xb8 [ath6kl] [ 76.610687] [] ath6kl_wmi_create_pstream_cmd+0x1e0/0x224 [ath6kl] [ 76.618255] [] ath6kl_wmi_implicit_create_pstream+0x100/0x138 [ath6kl] [ 76.626251] [] ath6kl_data_tx+0x2d0/0x5fc [ath6kl] [ 76.632476] [] dev_hard_start_xmit+0x504/0x840 [ 76.638275] [] sch_direct_xmit+0x5c/0x2dc [ 76.643615] [] dev_queue_xmit+0x424/0x714 [ 76.648956] [] arp_solicit+0x214/0x254 [ 76.654052] [] neigh_timer_handler+0x22c/0x2a8 [ 76.659851] [] run_timer_softirq+0x36c/0x564 [ 76.665466] [] __do_softirq+0x138/0x314 [ 76.670654] [] irq_exit+0x54/0xb4 [ 76.675262] [] handle_IRQ+0x68/0x8c [ 76.680084] [] __irq_svc+0x38/0xa0 [ 76.684814] [] trace_hardirqs_on_caller+0x1c/0x19c [ 76.690979] [] cpu_idle+0x7c/0xcc [ 76.695587] [] start_kernel+0x2ac/0x30c [ 76.700775] [ 76.702301] [ 76.702301] stack backtrace: [ 76.706878] [] (unwind_backtrace+0x0/0x128) from [] (print_irq_inversion_bug+0x194/0x1d8) [ 76.717193] [] (print_irq_inversion_bug+0x194/0x1d8) from [] (check_usage_forwards+0xd8/0xfc) [ 76.727874] [] (check_usage_forwards+0xd8/0xfc) from [] (mark_lock+0x388/0x618) [ 76.737274] [] (mark_lock+0x388/0x618) from [] (__lock_acquire+0x748/0x1a8c) [ 76.746429] [] (__lock_acquire+0x748/0x1a8c) from [] (lock_acquire+0x158/0x1a8) [ 76.755859] [] (lock_acquire+0x158/0x1a8) from [] (_raw_spin_lock_bh+0x54/0x8c) [ 76.765319] [] (_raw_spin_lock_bh+0x54/0x8c) from [] (ath6kl_indicate_tx_activity+0x38/0xb8 [ath6kl]) [ 76.776824] [] (ath6kl_indicate_tx_activity+0x38/0xb8 [ath6kl]) from [] (ath6kl_wmi_create_pstream_cmd+0x1e0/0x224 [ath6kl]) [ 76.790405] [] (ath6kl_wmi_create_pstream_cmd+0x1e0/0x224 [ath6kl]) from [] (ath6kl_wmi_implicit_create_pstream+0x100/0x138 [ath6kl]) [ 76.804809] [] (ath6kl_wmi_implicit_create_pstream+0x100/0x138 [ath6kl]) from [] (ath6kl_data_tx+0x2d0/0x5fc [ath6kl]) [ 76.817779] [] (ath6kl_data_tx+0x2d0/0x5fc [ath6kl]) from [] (dev_hard_start_xmit+0x504/0x840) [ 76.828552] [] (dev_hard_start_xmit+0x504/0x840) from [] (sch_direct_xmit+0x5c/0x2dc) [ 76.838531] [] (sch_direct_xmit+0x5c/0x2dc) from [] (dev_queue_xmit+0x424/0x714) [ 76.848022] [] (dev_queue_xmit+0x424/0x714) from [] (arp_solicit+0x214/0x254) [ 76.857269] [] (arp_solicit+0x214/0x254) from [] (neigh_timer_handler+0x22c/0x2a8) [ 76.866973] [] (neigh_timer_handler+0x22c/0x2a8) from [] (run_timer_softirq+0x36c/0x564) [ 76.877197] [] (run_timer_softirq+0x36c/0x564) from [] (__do_softirq+0x138/0x314) [ 76.886779] [] (__do_softirq+0x138/0x314) from [] (irq_exit+0x54/0xb4) [ 76.895385] [] (irq_exit+0x54/0xb4) from [] (handle_IRQ+0x68/0x8c) [ 76.903625] [] (handle_IRQ+0x68/0x8c) from [] (__irq_svc+0x38/0xa0) [ 76.911987] [] (__irq_svc+0x38/0xa0) from [] (trace_hardirqs_on_caller+0x1c/0x19c) [ 76.921661] [] (trace_hardirqs_on_caller+0x1c/0x19c) from [] (cpu_idle+0x7c/0xcc) [ 76.931243] [] (cpu_idle+0x7c/0xcc) from [] (start_kernel+0x2ac/0x30c)