MLK-12360-3 bcmdhd: fix bcmdhd blocks system suspend issue
authorDong Aisheng <aisheng.dong@nxp.com>
Fri, 29 Jan 2016 13:34:45 +0000 (21:34 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 19:50:03 +0000 (14:50 -0500)
commitc0cd1a07831093803c406c5d9104ede81d95756f
tree5ab48c07525b823917ccbae79cad5710c3281d49
parentbe72844d1e22ea76c91a6964271f59b18b6d1eb8
MLK-12360-3 bcmdhd: fix bcmdhd blocks system suspend issue

When enable WIFi and connected with AP, the system is unable to suspend.
root@imx6qdlsolo:~# echo standby > /sys/power/state
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.001 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
dhdsdio_isr: Enter
dhdsdio_isr: Enter
dhdsdio_isr: disable SDIO interrupts
Calling dhdsdio_dpc() from dhdsdio_isr
dhdsdio_dpc: Enter
dhdsdio_bussleep: request WAKE (currently SLEEP)

(Keypress still response here.... )

It's caused by Broadcom WiFi driver will keep handling SDIO irq even after
the driver is already suspended.
This weird behavior will block the MMC host suspend during its irq
synchronize operation in free_irq(), then the system suspend is blocked
too and hanged.

Add SDHCI_QUIRK2_SDIO_IRQ_THREAD for BCM WiFi to use kernel thread
to process sdio interrupts which won't block system suspend and process
freeze operation.

Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
drivers/mmc/host/sdhci-esdhc-imx.c
drivers/mmc/host/sdhci.c
drivers/mmc/host/sdhci.h