Skip to contentSkip to conversation

brcmfmac: don't net_ratelimit() CONSOLE messages on firmware crash

PATCH In review Rafał Miłecki 3 participants 3 messages Jul 21, 2019 – Jul 24, 2019 Broadcom BRCM80211 IEEE802.11 wireless drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 brcmfmac: don't net_ratelimit() CONSOLE messages on firmware crash

From: Rafał Miłecki <[email protected]>

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.

---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +2 -1
index e488b1aaaee2..7ac945369762 100644
@@ -794,7 +794,8 @@ static void brcmf_pcie_bus_console_read(struct brcmf_pciedev_info *devinfo,
 		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;
Signature · 1 line
2.21.0
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · Rafał Miłecki

From: Rafał Miłecki <[email protected]>

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.

Quoted 4 lines
---
  drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
#2 lore raw
In reply to Rafał Miłecki
Quoted 6 lines · Rafał Miłecki

From: Rafał Miłecki <[email protected]>

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.

Quoted 8 lines

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.

Patch applied to wireless-drivers-next.git, thanks.

e3b1d879ccda brcmfmac: don't net_ratelimit() CONSOLE messages on firmware crash

Signature · 3 lines
https://patchwork.kernel.org/patch/11051195/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches