diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2018-07-26 22:43:18 +0200 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2018-07-27 08:14:13 +0200 |
commit | 29aab93ea2a334026c0cc87414e7d1e731aedb11 (patch) | |
tree | 1fe3cf90534d134a15545af58c3fc8333f0c311f /package/kernel/mac80211/patches/335-v4.18-0005-brcmfmac-trigger-memory-dump-upon-firmware-halt-sign.patch | |
parent | 4e7f4777b0a311c354461f890e863453f462ca28 (diff) | |
download | upstream-29aab93ea2a334026c0cc87414e7d1e731aedb11.tar.gz upstream-29aab93ea2a334026c0cc87414e7d1e731aedb11.tar.bz2 upstream-29aab93ea2a334026c0cc87414e7d1e731aedb11.zip |
mac80211: backport brcmfmac fixes & debugging helpers from 4.18
The most important is probably regression fix in handling platform
NVRAM. That bug stopped hardware from being properly calibrated breaking
e.g. 5 GHz for Netgear R8000.
Other than that it triggers memory dumps when experiencing firmware
problems which is important for debugging purposes.
Fixes: 2811c97803e5 ("mac80211: backport brcmfmac firmware & clm_blob loading rework")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit b26214adb53da2816ff830b6cd6e31e1dafa2635)
Diffstat (limited to 'package/kernel/mac80211/patches/335-v4.18-0005-brcmfmac-trigger-memory-dump-upon-firmware-halt-sign.patch')
-rw-r--r-- | package/kernel/mac80211/patches/335-v4.18-0005-brcmfmac-trigger-memory-dump-upon-firmware-halt-sign.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/335-v4.18-0005-brcmfmac-trigger-memory-dump-upon-firmware-halt-sign.patch b/package/kernel/mac80211/patches/335-v4.18-0005-brcmfmac-trigger-memory-dump-upon-firmware-halt-sign.patch new file mode 100644 index 0000000000..b94e06fa44 --- /dev/null +++ b/package/kernel/mac80211/patches/335-v4.18-0005-brcmfmac-trigger-memory-dump-upon-firmware-halt-sign.patch @@ -0,0 +1,38 @@ +From 8a3ab2f38f1669e3be6433a1f6b82a077b38c4c7 Mon Sep 17 00:00:00 2001 +From: Franky Lin <franky.lin@broadcom.com> +Date: Wed, 16 May 2018 14:12:02 +0200 +Subject: [PATCH] brcmfmac: trigger memory dump upon firmware halt signal + +PCIe dongle firmware signals a halt/trap through mailbox interrupt. +Trigger a memory dump upon receiving such signal could help to provide +useful information for issue debug. + +Reviewed-by: Arend van Spriel <arend.vanspriel@broadcom.com> +Signed-off-by: Franky Lin <franky.lin@broadcom.com> +Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com> +Signed-off-by: Kalle Valo <kvalo@codeaurora.org> +--- + drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +@@ -182,6 +182,7 @@ static const struct brcmf_firmware_mappi + #define BRCMF_D2H_DEV_D3_ACK 0x00000001 + #define BRCMF_D2H_DEV_DS_ENTER_REQ 0x00000002 + #define BRCMF_D2H_DEV_DS_EXIT_NOTE 0x00000004 ++#define BRCMF_D2H_DEV_FWHALT 0x10000000 + + #define BRCMF_H2D_HOST_D3_INFORM 0x00000001 + #define BRCMF_H2D_HOST_DS_ACK 0x00000002 +@@ -717,6 +718,10 @@ static void brcmf_pcie_handle_mb_data(st + devinfo->mbdata_completed = true; + wake_up(&devinfo->mbdata_resp_wait); + } ++ if (dtoh_mb_data & BRCMF_D2H_DEV_FWHALT) { ++ brcmf_dbg(PCIE, "D2H_MB_DATA: FW HALT\n"); ++ brcmf_dev_coredump(&devinfo->pdev->dev); ++ } + } + + |