Hi Andi, > Hi, > > I'm working on this, currently testing it > http://www.mail-archive.com/linux-mmc@xxxxxxxxxxxxxxx/msg17726.html > > Within less than 3 days, the module always crashes. I observe > that mwifiex is looping in mwifiex_main_process, not exiting. The > loop is always entered from the sdio_irq_thread. > > I put printk statement to find cause for why it's not exiting: > > [18017.211513] scan processing 0 > [18017.214686] data sent 0 > [18017.217269] ps state 0 > [18017.219765] cmd sent 0 / curr cmd (null) > [18017.224134] is_command_pending 0 > [18017.227548] wmm list empty 0 > [18017.230592] tx_lock_flag 0 > > So it seems the wmm list has packets queued, but they are never > sent out. Adding a few more statements, it seems the problem is > in mwifiex_wmm_get_highest_priolist_ptr: > > for (j = adapter->priv_num - 1; j >= 0; --j) { > > spin_lock_irqsave(&adapter->bss_prio_tbl[j].bss_prio_lock, > flags); > is_list_empty = list_empty(&adapter->bss_prio_tbl[j] > .bss_prio_head); > spin_unlock_irqrestore(&adapter->bss_prio_tbl[j].bss_prio_lock, > flags); > if (is_list_empty) > continue; > > .... <snip> ... > > do { > priv_tmp = bssprio_node->priv; > hqp = &priv_tmp->wmm.highest_queued_prio; > > for (i = atomic_read(hqp); i >= LOW_PRIO_TID; > --i) { > ... > ... NEVER REACHED ... > ... > > > So there are packets queued, but the highest_queued_prio is too > low, so they are never sent out. Could you apply the debug patch attached to print out hqp number? > > I was never able to crash it without my patches, though trying > harder now. But maybe my patches only trigger the issue more > often. > > Is there a known issue, with highest_queued_prio getting out of > sync with the number of packets queued? I'm not aware of any known issue related to highest_queued_prio. Regards, Bing
Attachment:
wmm_hqp_debug.diff
Description: wmm_hqp_debug.diff