brcmfmac: fix 43455 CRC error under SDIO 3.0 SDR104 mode
This patch fixes 43455 CRC error while running throughput test with suspend/resume stress test. The continuous failure messages before system crash: brcmfmac: brcmf_sdiod_sglist_rw: CMD53 sg block read failed -84 brcmfmac: brcmf_sdio_rxglom: glom read of 25600 bytes failed: -5 brcmfmac: brcmf_sdio_rxfail: abort command, terminate frame brcmfmac: brcmf_sdiod_sglist_rw: CMD53 sg block read failed -84 brcmfmac: brcmf_sdio_rxglom: glom read of 24576 bytes failed: -5 brcmfmac: brcmf_sdio_rxfail: abort command, terminate frame Signed-off-by: Wright Feng <wright.feng@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-5-chi-hsien.lin@cypress.com
This commit is contained in:
parent
2bee41270f
commit
df18c257bd
|
@ -47,9 +47,14 @@
|
||||||
#define CY_4339_MES_WATERMARK 80
|
#define CY_4339_MES_WATERMARK 80
|
||||||
#define CY_4339_MESBUSYCTRL (CY_4339_MES_WATERMARK | \
|
#define CY_4339_MESBUSYCTRL (CY_4339_MES_WATERMARK | \
|
||||||
SBSDIO_MESBUSYCTRL_ENAB)
|
SBSDIO_MESBUSYCTRL_ENAB)
|
||||||
|
#define CY_43455_F2_WATERMARK 0x60
|
||||||
|
#define CY_43455_MES_WATERMARK 0x50
|
||||||
|
#define CY_43455_MESBUSYCTRL (CY_43455_MES_WATERMARK | \
|
||||||
|
SBSDIO_MESBUSYCTRL_ENAB)
|
||||||
#define CY_435X_F2_WATERMARK 0x40
|
#define CY_435X_F2_WATERMARK 0x40
|
||||||
#define CY_435X_F1_MESBUSYCTRL (CY_435X_F2_WATERMARK | \
|
#define CY_435X_F1_MESBUSYCTRL (CY_435X_F2_WATERMARK | \
|
||||||
SBSDIO_MESBUSYCTRL_ENAB)
|
SBSDIO_MESBUSYCTRL_ENAB)
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
|
||||||
#define BRCMF_TRAP_INFO_SIZE 80
|
#define BRCMF_TRAP_INFO_SIZE 80
|
||||||
|
@ -4226,6 +4231,19 @@ static void brcmf_sdio_firmware_callback(struct device *dev, int err,
|
||||||
brcmf_sdiod_writeb(sdiod, SBSDIO_FUNC1_MESBUSYCTRL,
|
brcmf_sdiod_writeb(sdiod, SBSDIO_FUNC1_MESBUSYCTRL,
|
||||||
CY_4339_MESBUSYCTRL, &err);
|
CY_4339_MESBUSYCTRL, &err);
|
||||||
break;
|
break;
|
||||||
|
case SDIO_DEVICE_ID_BROADCOM_43455:
|
||||||
|
brcmf_dbg(INFO, "set F2 watermark to 0x%x*4 bytes for 43455\n",
|
||||||
|
CY_43455_F2_WATERMARK);
|
||||||
|
brcmf_sdiod_writeb(sdiod, SBSDIO_WATERMARK,
|
||||||
|
CY_43455_F2_WATERMARK, &err);
|
||||||
|
devctl = brcmf_sdiod_readb(sdiod, SBSDIO_DEVICE_CTL,
|
||||||
|
&err);
|
||||||
|
devctl |= SBSDIO_DEVCTL_F2WM_ENAB;
|
||||||
|
brcmf_sdiod_writeb(sdiod, SBSDIO_DEVICE_CTL, devctl,
|
||||||
|
&err);
|
||||||
|
brcmf_sdiod_writeb(sdiod, SBSDIO_FUNC1_MESBUSYCTRL,
|
||||||
|
CY_43455_MESBUSYCTRL, &err);
|
||||||
|
break;
|
||||||
case SDIO_DEVICE_ID_BROADCOM_4359:
|
case SDIO_DEVICE_ID_BROADCOM_4359:
|
||||||
/* fallthrough */
|
/* fallthrough */
|
||||||
case SDIO_DEVICE_ID_BROADCOM_4354:
|
case SDIO_DEVICE_ID_BROADCOM_4354:
|
||||||
|
|
Loading…
Reference in New Issue