Thread (18 messages) 18 messages, 3 authors, 2013-03-29

Re: mwifiex crash when removing interface while scanning

From: Daniel Drake <hidden>
Date: 2013-02-21 14:20:10

On Wed, Feb 20, 2013 at 6:00 PM, Bing Zhao [off-list ref] wrote:
Hi Daniel,
quoted
quoted
quoted
quoted
    mwifiex_sdio mmc0:0001:1: rx_pending=0, tx_pending=0, cmd_pending=-1
    eth0      Failed to read scan data : No such device
After this error message, do you see the sd8787 card is removed from the bus?

"mmc0: card 0001 removed"
No.
That's strange.
"mwifiex_sdio mmc0:0001:1: rx_pending=0, tx_pending=0, cmd_pending=-1" is from
mwifiex_remove_card().
I haven't dug into the code, but it seems quite normal to me. It makes
sense for mwifiex_remove_card to be called in the rmmod path. And it
makes sense for the kernel not to report that the card was removed,
since it wasn't actually removed. Only the module was unloaded.
quoted
Under this kernel, I'm not sure if the power is or isn't being cut at
this point. I don't think this is relevant though; regular
"we quite regularly will power down the wireless card when it is not
being actively used..."

I interpreted this statement as "the power to the card is being cut while inactive".
mwifiex_remove_card() is called seems agrees with it. Perhaps I'm missing something here.
Yes, we will want to make sure that the power is physically cut. I
just haven't verified what the exact behaviour is under 3.8.
Nevertheless, I think this detail is irrelevant, given that
rmmod/insmod cycles work fine, but the problem only occurs when
scanning is involved.
quoted
insmod/rmmod cycles work fine, the problem only appears when tearing
down the interface while a scan is in progress.
Could you add some debug logs in the tear-down path to show where exactly it gets stuck?
I mis-spoke there, sorry. The problem happens on the next modprobe
*after* a teardown when a scan was in progress. The teardown itself
seems to have completed without getting stuck.

If you have any suggestions for where to add debug messages, that
would be appreciated. Otherwise I will look into sprinkling a few
throughout the probe sequences to see if any communication succeeds
before the first error is printed.

Thanks,
Daniel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help