Search Linux Wireless

RE: mwifiex frequent "not allowed while suspended" crash on resume

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Daniel,

> As we haven't heard back from you in a while, and this is blocking
> several things on our end, I had a quick look myself.
> 
> The problem seems to be TX soon after resume, and there does seem to
> be a bit of a lack of synchronization here (i.e. mwifiex_main_process
> should maybe avoid doing TX while the interface is suspended).

Normally TX is blocked until resume handler is called and host sleep handshake between driver and firmware is done. Does the TX happen before "hs_deactivated" event?

> 
> As a quick hack I added netdev_device_detach() early in suspend, and
> netdev_device_attach() late in resume, and that seems to serialize
> things. But I don't think its a good fix. Hopefully you can find a
> solution that flows better with the mwifiex design.

I'm thinking of releasing IRQ in driver suspend handler and re-claim the IRQ in resume. Of course it needs some changes in sdio_release_irq to skip SDIO_CCCR_IENx disabling, otherwise host may not be woken up by SDIO DAT1.

Attached is the sample code, not tested.

Thanks,
Bing

Attachment: release_irq_in_suspend.diff
Description: release_irq_in_suspend.diff


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux