diff mbox

[1/8] brcmfmac: avoid runtime-pm for sdio host controller

Message ID 1426681528-15831-2-git-send-email-arend@broadcom.com (mailing list archive)
State Accepted
Delegated to: Kalle Valo
Headers show

Commit Message

Arend van Spriel March 18, 2015, 12:25 p.m. UTC
Several host controllers supporting runtime-pm are causing issues
with our sdio wireless cards because they disable the sdio interrupt
upon going into runtime suspend. This patch avoids that by doing
a pm_runtime_forbid() call during the probe. Tested with Sony Vaio
Duo 13 which uses sdhci-acpi host controller.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
 drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Kalle Valo March 20, 2015, 7:06 a.m. UTC | #1
> Several host controllers supporting runtime-pm are causing issues
> with our sdio wireless cards because they disable the sdio interrupt
> upon going into runtime suspend. This patch avoids that by doing
> a pm_runtime_forbid() call during the probe. Tested with Sony Vaio
> Duo 13 which uses sdhci-acpi host controller.
> 
> Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
> Signed-off-by: Arend van Spriel <arend@broadcom.com>

Thanks, 8 patches applied to wireless-drivers-next.git:

063d51776bd6 brcmfmac: avoid runtime-pm for sdio host controller
2c64e16d1ff1 brcmfmac: Add necessary memory barriers for SDIO.
a74196bb67c4 brcmfmac: Update msgbuf commonring size for improved throughput.
ef5671d29df5 brcmfmac: Remove unnecessary new-line in pcie console logging.
7fca40eb0030 brcmfmac: add MODULE_FIRMWARE() macros for bcm4356 PCIe device
25911556283e brcmfmac: add support for BCM43430 SDIO chipset
228a71763d9f brcmfmac: only support the BCM43455/7 device
55ab9a72bd32 brcmfmac: remove support for unreleased BCM4354 PCIe

Kalle Valo
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
index 4399530..9667b6a 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
@@ -29,6 +29,7 @@ 
 #include <linux/mmc/host.h>
 #include <linux/platform_device.h>
 #include <linux/platform_data/brcmfmac-sdio.h>
+#include <linux/pm_runtime.h>
 #include <linux/suspend.h>
 #include <linux/errno.h>
 #include <linux/module.h>
@@ -1006,6 +1007,7 @@  static int brcmf_sdiod_remove(struct brcmf_sdio_dev *sdiodev)
 	sg_free_table(&sdiodev->sgtable);
 	sdiodev->sbwad = 0;
 
+	pm_runtime_allow(sdiodev->func[1]->card->host->parent);
 	return 0;
 }
 
@@ -1074,7 +1076,7 @@  static int brcmf_sdiod_probe(struct brcmf_sdio_dev *sdiodev)
 		ret = -ENODEV;
 		goto out;
 	}
-
+	pm_runtime_forbid(host->parent);
 out:
 	if (ret)
 		brcmf_sdiod_remove(sdiodev);