On 2/22/2019 6:07 PM, Rafał Miłecki wrote:
From: Rafał Miłecki <rafal@xxxxxxxxxx>
FullMAC firmware may happen to crash due to some potential bugs exposed
by e.g. a specific traffic or host-requested setup. It usually results
in various timeouts & running our of resources (e.g. ring slots).
Monitoring firmware state allows handling such a situation more
gracefully. At this point the watchdog:
1) Prints a clear error message about a firmware crash
2) Tries to dump a crash info data
Hi Rafał,
I like the idea of having firmware crashes detected, but not sure I am a
big fan of the watchdog mechanism.
That should be helpful for users & should allow providing a valuable
reports for the Broadcom developers. It obviously doesn't really fix
anything.
Agree on the value of it and it is new functionality indeed and not a fix.
This watchdog is important for USB & SDIO devices which don't have
anything alike implemented yet. It's also there to complement PCIe with
its FWHALT signal which does not work in all situations.
Actually, SDIO does already have a watchdog, but it serves different
purpose (get firmware console, idle detect). There is also a
brcmf_sdio_checkdied() function to detect a firmware crash. It is being
called in brcmf_sdio_bus_rxctl() when firwmare does not respond as
expected [1]. Similar thing can be done for PCIE and I actually started
working on that last week. USB is a bit different as it will switch to
bootloader image when firmware crashes.
Regards,
Arend
[1]
https://elixir.bootlin.com/linux/latest/source/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c#L3144