60f6e4921067e60e6998a23337482c1ac35c44f8
[openwrt/staging/blocktrron.git] /
1 From e3b1d879ccda9ffd5332777bb1beeb2cc913faa8 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
3 Date: Sun, 21 Jul 2019 21:52:17 +0200
4 Subject: [PATCH] brcmfmac: don't net_ratelimit() CONSOLE messages on firmware
5 crash
6 MIME-Version: 1.0
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
9
10 Firmware crash is a pretty rare event and can't happen too frequently as
11 it has to be followed by a hardware reinitialization and config reload.
12 It should be safe to don't use net_ratelimit() when it happens.
13
14 For reporting & debugging purposes it's important to provide a complete
15 log as the last lines are actually the most important. This change
16 modifies brcmfmac to print all messages in an unlimited way in that
17 specific case. With this change there should be finally a backtrace of
18 firmware finally visible after a crash.
19
20 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
21 Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
22 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
23 ---
24 drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 3 ++-
25 1 file changed, 2 insertions(+), 1 deletion(-)
26
27 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
28 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
29 @@ -794,7 +794,8 @@ static void brcmf_pcie_bus_console_read(
30 if (ch == '\n') {
31 console->log_str[console->log_idx] = 0;
32 if (error)
33 - brcmf_err(bus, "CONSOLE: %s", console->log_str);
34 + __brcmf_err(bus, __func__, "CONSOLE: %s",
35 + console->log_str);
36 else
37 pr_debug("CONSOLE: %s", console->log_str);
38 console->log_idx = 0;