mac80211: update brcmfmac to the wireless-drivers-next-for-davem-2015-04-09
[openwrt.git] / package / kernel / mac80211 / patches / 346-brcmfmac-avoid-runtime-pm-for-sdio-host-controller.patch
1 From: Arend van Spriel <arend@broadcom.com>
2 Date: Wed, 18 Mar 2015 13:25:21 +0100
3 Subject: [PATCH] brcmfmac: avoid runtime-pm for sdio host controller
4
5 Several host controllers supporting runtime-pm are causing issues
6 with our sdio wireless cards because they disable the sdio interrupt
7 upon going into runtime suspend. This patch avoids that by doing
8 a pm_runtime_forbid() call during the probe. Tested with Sony Vaio
9 Duo 13 which uses sdhci-acpi host controller.
10
11 Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
12 Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
13 Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
14 Signed-off-by: Arend van Spriel <arend@broadcom.com>
15 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
16 ---
17
18 --- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
19 +++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
20 @@ -29,6 +29,7 @@
21  #include <linux/mmc/host.h>
22  #include <linux/platform_device.h>
23  #include <linux/platform_data/brcmfmac-sdio.h>
24 +#include <linux/pm_runtime.h>
25  #include <linux/suspend.h>
26  #include <linux/errno.h>
27  #include <linux/module.h>
28 @@ -1006,6 +1007,7 @@ static int brcmf_sdiod_remove(struct brc
29         sg_free_table(&sdiodev->sgtable);
30         sdiodev->sbwad = 0;
31  
32 +       pm_runtime_allow(sdiodev->func[1]->card->host->parent);
33         return 0;
34  }
35  
36 @@ -1074,7 +1076,7 @@ static int brcmf_sdiod_probe(struct brcm
37                 ret = -ENODEV;
38                 goto out;
39         }
40 -
41 +       pm_runtime_forbid(host->parent);
42  out:
43         if (ret)
44                 brcmf_sdiod_remove(sdiodev);