d99a01426b17ad7482c0644b17fb43acbe12e40b
[openwrt/staging/981213.git] /
1 From 29f6589140a10ece8c1d73f58043ea5b3473ab3e Mon Sep 17 00:00:00 2001
2 From: Wright Feng <wright.feng@cypress.com>
3 Date: Wed, 21 Nov 2018 07:53:52 +0000
4 Subject: [PATCH] brcmfmac: disable command decode in sdio_aos
5
6 AOS is a part of the SDIOD core that becomes active when the rest of
7 SDIOD is sleeping to keep SDIO bus alive responding to reduced set of
8 commands.
9
10 Transaction between AOS and SDIOD is not protected, and if cmd 52 is
11 received in AOS and in the middle of response state changed from AOS to
12 SDIOD, response is corrupted and it causes to SDIO Host controller to
13 hang.
14
15 Command decode for below chips are disabled in this commit:
16 - 4339
17 - 4345
18 - 4354
19 - 4373
20
21 Reviewed-by: Arend van Spriel <arend.vanspriel@broadcom.com>
22 Signed-off-by: Wright Feng <wright.feng@cypress.com>
23 Signed-off-by: Double Lo <double.lo@cypress.com>
24 Signed-off-by: Madhan Mohan R <madhanmohan.r@cypress.com>
25 Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
26 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
27 ---
28 drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 6 +++++-
29 1 file changed, 5 insertions(+), 1 deletion(-)
30
31 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
32 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
33 @@ -3369,7 +3369,11 @@ err:
34
35 static bool brcmf_sdio_aos_no_decode(struct brcmf_sdio *bus)
36 {
37 - if (bus->ci->chip == CY_CC_43012_CHIP_ID)
38 + if (bus->ci->chip == CY_CC_43012_CHIP_ID ||
39 + bus->ci->chip == CY_CC_4373_CHIP_ID ||
40 + bus->ci->chip == BRCM_CC_4339_CHIP_ID ||
41 + bus->ci->chip == BRCM_CC_4345_CHIP_ID ||
42 + bus->ci->chip == BRCM_CC_4354_CHIP_ID)
43 return true;
44 else
45 return false;