brcmfmac: trigger memory dump on SDIO firmware halt message
authorFranky Lin <franky.lin@broadcom.com>
Wed, 16 May 2018 12:12:03 +0000 (14:12 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 23 May 2018 15:52:02 +0000 (18:52 +0300)
Attempt to dump dongle memory for debug upon receiving firmware halt
message through dongle to host mail box interrupt.

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/sdio.c

index 412a05b9a2b2720d619f89af5a9c3ddf42be735a..c99a191e8d693a3e6ef006826fcde5affb74a02d 100644 (file)
@@ -1072,8 +1072,10 @@ static u32 brcmf_sdio_hostmail(struct brcmf_sdio *bus)
        bus->sdcnt.f1regdata += 2;
 
        /* dongle indicates the firmware has halted/crashed */
-       if (hmb_data & HMB_DATA_FWHALT)
+       if (hmb_data & HMB_DATA_FWHALT) {
                brcmf_err("mailbox indicates firmware halted\n");
+               brcmf_dev_coredump(&sdiod->func1->dev);
+       }
 
        /* Dongle recomposed rx frames, accept them again */
        if (hmb_data & HMB_DATA_NAKHANDLED) {