From a02c768bc3f6709412fee42e2e6c01d2d81ae9e5 Mon Sep 17 00:00:00 2001 From: Pranav Vinayak Wagh Date: Thu, 15 Feb 2024 05:24:04 -0600 Subject: [PATCH 251/296] non-upstream: Increase delay in kso sequence There exists a corner case specially when in low RSSI, where at DS2 exit, SDIO core accesses from ucode and FMAC clash and DS2 exit fails leaving the chip in a bad/stuck state. Changes: Increase the usleep_range to (2500 to 3000)us when the first KSO wr-rd-check fails before starting subsequent checks to avoid the clash. This gives some more time for device to wakeup. NOTE: This is a WAR and will be updated once proper fix is found. Signed-off-by: Pranav Vinayak Wagh --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c index 3ba1e852b886..711d2f105cb3 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c @@ -836,7 +836,7 @@ brcmf_sdio_kso_control(struct brcmf_sdio *bus, bool on) * already up and ready, leading to more power consumptions of both * host and device, as well as overall increased response delays */ - usleep_range(1000, 1500); + usleep_range(2500, 3000); } else { /* Initial delay is done, now do continuous KSO wr-rd-check * sequence with some small delay -- 2.25.1