All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wright Feng <wright.feng@cypress.com>
To: linux-wireless@vger.kernel.org
Cc: wright.feng@cypress.com, brcm80211-dev-list@broadcom.com,
	brcm80211-dev-list@cypress.com,
	Arend van Spriel <arend.vanspriel@broadcom.com>,
	Franky Lin <franky.lin@broadcom.com>,
	Hante Meuleman <hante.meuleman@broadcom.com>,
	Kalle Valo <kvalo@codeaurora.org>,
	chi-hsien.lin@cypress.com
Subject: [PATCH v2 3/5] brcmfmac: keep SDIO watchdog running when console_interval is non-zero
Date: Thu,  4 Jun 2020 02:18:33 -0500	[thread overview]
Message-ID: <20200604071835.3842-4-wright.feng@cypress.com> (raw)
In-Reply-To: <20200604071835.3842-1-wright.feng@cypress.com>

brcmfmac host driver makes SDIO bus sleep and stops SDIO watchdog if no
pending event or data. As a result, host driver does not poll firmware
console buffer before buffer overflow, which leads to missing firmware
logs. We should not stop SDIO watchdog if console_interval is non-zero
in debug build.

Signed-off-by: Wright Feng <wright.feng@cypress.com>
Signed-off-by: Chi-hsien Lin <chi-hsien.lin@cypress.com>
---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
index ce6f15284277..50444989ae09 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
@@ -3686,7 +3686,11 @@ static void brcmf_sdio_bus_watchdog(struct brcmf_sdio *bus)
 			if (bus->idlecount > bus->idletime) {
 				brcmf_dbg(SDIO, "idle\n");
 				sdio_claim_host(bus->sdiodev->func1);
-				brcmf_sdio_wd_timer(bus, false);
+#ifdef DEBUG
+				if (!BRCMF_FWCON_ON() ||
+				    bus->console_interval == 0)
+#endif
+					brcmf_sdio_wd_timer(bus, false);
 				bus->idlecount = 0;
 				brcmf_sdio_bus_sleep(bus, true, false);
 				sdio_release_host(bus->sdiodev->func1);
-- 
2.25.0


  parent reply	other threads:[~2020-06-04  7:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-04  7:18 [PATCH v2 0/5] brcmfmac: Stability change series Wright Feng
2020-06-04  7:18 ` [PATCH v2 1/5] brcmfmac: To fix kernel crash on out of boundary access Wright Feng
2020-07-14  9:44   ` Kalle Valo
2020-06-04  7:18 ` [PATCH v2 2/5] brcmfmac: fix invalid permanent MAC address in wiphy Wright Feng
2020-06-04  7:18 ` Wright Feng [this message]
2020-06-04  7:18 ` [PATCH v2 4/5] brcmfmac: reduce maximum station interface from 2 to 1 in RSDB mode Wright Feng
2020-06-04  7:18 ` [PATCH v2 5/5] brcmfmac: To fix Bss Info flag definition Bug Wright Feng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200604071835.3842-4-wright.feng@cypress.com \
    --to=wright.feng@cypress.com \
    --cc=arend.vanspriel@broadcom.com \
    --cc=brcm80211-dev-list@broadcom.com \
    --cc=brcm80211-dev-list@cypress.com \
    --cc=chi-hsien.lin@cypress.com \
    --cc=franky.lin@broadcom.com \
    --cc=hante.meuleman@broadcom.com \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.