aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211/patches/brcm
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2019-07-28 14:09:20 +0200
committerRafał Miłecki <rafal@milecki.pl>2019-07-28 14:21:50 +0200
commit8efccf76f8bdb0d0d902f71b0430abec265fb6e9 (patch)
treee313ba97bbbb8e7aebcc9431f2bae1e0d8f07ebe /package/kernel/mac80211/patches/brcm
parentd8c59fa69971e9578fbc6a0f9a8e2cc1752dab50 (diff)
downloadupstream-8efccf76f8bdb0d0d902f71b0430abec265fb6e9.tar.gz
upstream-8efccf76f8bdb0d0d902f71b0430abec265fb6e9.tar.bz2
upstream-8efccf76f8bdb0d0d902f71b0430abec265fb6e9.zip
mac80211: brcm: improve brcmfmac debugging of firmware crashes
This provides a complete console messages dump. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit 6a7b201b6c5c82d3d8d392ae931100c1909869e0)
Diffstat (limited to 'package/kernel/mac80211/patches/brcm')
-rw-r--r--package/kernel/mac80211/patches/brcm/385-v5.4-brcmfmac-don-t-net_ratelimit-CONSOLE-messages-on-fir.patch38
-rw-r--r--package/kernel/mac80211/patches/brcm/865-brcmfmac-get-RAM-info-right-before-downloading-PCIe-.patch2
2 files changed, 39 insertions, 1 deletions
diff --git a/package/kernel/mac80211/patches/brcm/385-v5.4-brcmfmac-don-t-net_ratelimit-CONSOLE-messages-on-fir.patch b/package/kernel/mac80211/patches/brcm/385-v5.4-brcmfmac-don-t-net_ratelimit-CONSOLE-messages-on-fir.patch
new file mode 100644
index 0000000000..60f6e49210
--- /dev/null
+++ b/package/kernel/mac80211/patches/brcm/385-v5.4-brcmfmac-don-t-net_ratelimit-CONSOLE-messages-on-fir.patch
@@ -0,0 +1,38 @@
+From e3b1d879ccda9ffd5332777bb1beeb2cc913faa8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
+Date: Sun, 21 Jul 2019 21:52:17 +0200
+Subject: [PATCH] brcmfmac: don't net_ratelimit() CONSOLE messages on firmware
+ crash
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Firmware crash is a pretty rare event and can't happen too frequently as
+it has to be followed by a hardware reinitialization and config reload.
+It should be safe to don't use net_ratelimit() when it happens.
+
+For reporting & debugging purposes it's important to provide a complete
+log as the last lines are actually the most important. This change
+modifies brcmfmac to print all messages in an unlimited way in that
+specific case. With this change there should be finally a backtrace of
+firmware finally visible after a crash.
+
+Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
+Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
+Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
+---
+ drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
+@@ -794,7 +794,8 @@ static void brcmf_pcie_bus_console_read(
+ if (ch == '\n') {
+ console->log_str[console->log_idx] = 0;
+ if (error)
+- brcmf_err(bus, "CONSOLE: %s", console->log_str);
++ __brcmf_err(bus, __func__, "CONSOLE: %s",
++ console->log_str);
+ else
+ pr_debug("CONSOLE: %s", console->log_str);
+ console->log_idx = 0;
diff --git a/package/kernel/mac80211/patches/brcm/865-brcmfmac-get-RAM-info-right-before-downloading-PCIe-.patch b/package/kernel/mac80211/patches/brcm/865-brcmfmac-get-RAM-info-right-before-downloading-PCIe-.patch
index 1ad26b6dea..9805634114 100644
--- a/package/kernel/mac80211/patches/brcm/865-brcmfmac-get-RAM-info-right-before-downloading-PCIe-.patch
+++ b/package/kernel/mac80211/patches/brcm/865-brcmfmac-get-RAM-info-right-before-downloading-PCIe-.patch
@@ -55,7 +55,7 @@ Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
void brcmf_chip_detach(struct brcmf_chip *chip);
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
-@@ -1769,6 +1769,12 @@ static void brcmf_pcie_setup(struct devi
+@@ -1770,6 +1770,12 @@ static void brcmf_pcie_setup(struct devi
nvram_len = fwreq->items[BRCMF_PCIE_FW_NVRAM].nv_data.len;
kfree(fwreq);