summaryrefslogtreecommitdiff
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorDouble Lo <double.lo@cypress.com>2020-05-28 22:49:38 -0500
committerKalle Valo <kvalo@codeaurora.org>2020-05-29 20:39:40 +0300
commit113a57a400a2d4974448760464f6443d52a1e498 (patch)
tree56a4ced3b4996547f23a05793f1599802ce8dd0e /drivers/net/wireless
parentdf18c257bd6a3fe1906a9c87bcb0bb30cf87ef64 (diff)
brcmfmac: 43012 Update MES Watermark
Set MES watermark size to 0x50 for 43012. It fixes SDIO bus hang issue when running at high throughput. Signed-off-by: Double Lo <double.lo@cypress.com> Signed-off-by: Chi-hsien Lin <chi-hsien.lin@cypress.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20200529034938.124533-6-chi-hsien.lin@cypress.com
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
index 58d9f0b90ad3..760b7737e745 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
@@ -43,6 +43,9 @@
#define CY_4373_F2_WATERMARK 0x40
#define CY_4373_F1_MESBUSYCTRL (CY_4373_F2_WATERMARK | SBSDIO_MESBUSYCTRL_ENAB)
#define CY_43012_F2_WATERMARK 0x60
+#define CY_43012_MES_WATERMARK 0x50
+#define CY_43012_MESBUSYCTRL (CY_43012_MES_WATERMARK | \
+ SBSDIO_MESBUSYCTRL_ENAB)
#define CY_4339_F2_WATERMARK 48
#define CY_4339_MES_WATERMARK 80
#define CY_4339_MESBUSYCTRL (CY_4339_MES_WATERMARK | \
@@ -4217,6 +4220,8 @@ static void brcmf_sdio_firmware_callback(struct device *dev, int err,
devctl |= SBSDIO_DEVCTL_F2WM_ENAB;
brcmf_sdiod_writeb(sdiod, SBSDIO_DEVICE_CTL, devctl,
&err);
+ brcmf_sdiod_writeb(sdiod, SBSDIO_FUNC1_MESBUSYCTRL,
+ CY_43012_MESBUSYCTRL, &err);
break;
case SDIO_DEVICE_ID_BROADCOM_4339:
brcmf_dbg(INFO, "set F2 watermark to 0x%x*4 bytes for 4339\n",