summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2014-04-23 12:20:55 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-09 11:18:28 -0700
commit9210bad0ecb522c1b89dd496274637cb92e403d5 (patch)
treeb25911c6dc043e5c0534bc4a3faeb77195057163
parent82b8759a69e9b0b795e897ec312599953a6c3946 (diff)
downloadlinux-stable-9210bad0ecb522c1b89dd496274637cb92e403d5.tar.gz
linux-stable-9210bad0ecb522c1b89dd496274637cb92e403d5.tar.bz2
linux-stable-9210bad0ecb522c1b89dd496274637cb92e403d5.zip
brcmfmac: Fix brcmf_chip_ai_coredisable not applying reset bits to BCMA_IOCTL
commit ffa216bb5eecfce0f01b0b2a95d5c320dde90005 upstream. brcmfmac has been broken on my cubietruck with a BCM43362: brcmfmac: brcmf_chip_recognition: found AXI chip: BCM43362, rev=1 brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: Apr 22 2013 14:50:00 version 5.90.195.89.6 FWID 01-b30a427d since commit 53036261033: "brcmfmac: update core reset and disable routines". The problem is that since this commit brcmf_chip_ai_resetcore no longer sets BCMA_IOCTL itself before bringing the core out of reset, instead relying on brcmf_chip_ai_coredisable to do so. But brcmf_chip_ai_coredisable is a nop of the chip is already in reset. This patch modifies brcmf_chip_ai_coredisable to always set BCMA_IOCTL even if the core is already in reset. This fixes brcmfmac hanging in firmware loading on my board. Cc: stable@vger.kernel.org # v3.14 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> [arend@broadcom.com: rebase patch on linux-3.14.y branch] Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/sdio_chip.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/sdio_chip.c b/drivers/net/wireless/brcm80211/brcmfmac/sdio_chip.c
index 82bf3c5d3cdc..2de2736eb332 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/sdio_chip.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/sdio_chip.c
@@ -300,10 +300,10 @@ brcmf_sdio_ai_coredisable(struct brcmf_sdio_dev *sdiodev,
wrapbase = ci->c_inf[idx].wrapbase;
- /* if core is already in reset, just return */
+ /* if core is already in reset, skip reset */
regdata = brcmf_sdiod_regrl(sdiodev, wrapbase + BCMA_RESET_CTL, NULL);
if ((regdata & BCMA_RESET_CTL_RESET) != 0)
- return;
+ goto post_reset_config;
/* configure reset */
brcmf_sdiod_regwl(sdiodev, wrapbase + BCMA_IOCTL, pre_resetbits |
@@ -319,6 +319,7 @@ brcmf_sdio_ai_coredisable(struct brcmf_sdio_dev *sdiodev,
SPINWAIT(brcmf_sdiod_regrl(sdiodev, wrapbase + BCMA_RESET_CTL, NULL) !=
BCMA_RESET_CTL_RESET, 300);
+post_reset_config:
/* post reset configure */
brcmf_sdiod_regwl(sdiodev, wrapbase + BCMA_IOCTL, pre_resetbits |
BCMA_IOCTL_FGC | BCMA_IOCTL_CLK, NULL);