brcmfmac: Fix brcmf_chip_ai_coredisable not applying reset bits to BCMA_IOCTL
authorHans de Goede <hdegoede@redhat.com>
Wed, 23 Apr 2014 10:20:55 +0000 (12:20 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 25 Apr 2014 01:46:22 +0000 (21:46 -0400)
commitffa216bb5eecfce0f01b0b2a95d5c320dde90005
tree79e4259da728b8f27410719e8fc572bbf1d8f83a
parent8c7ae357cc5b6bd037ad2d666e9f3789cf882925
brcmfmac: Fix brcmf_chip_ai_coredisable not applying reset bits to BCMA_IOCTL

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>
drivers/net/wireless/brcm80211/brcmfmac/chip.c