Rafał Miłecki <zajec5@xxxxxxxxx> writes: > From: Rafał Miłecki <rafal@xxxxxxxxxx> > > It may happen for FullMAC firmware to crash. It should be detected and > ideally somehow handled by a driver. > > Since commit ff4445a8502c ("brcmfmac: expose device memory to > devcoredump subsystem") brcmfmac has BRCMF_E_PSM_WATCHDOG event handler > but it wasn't enough to detect all kind of crashes. E.g. Netgear R8000 > (BCM4709A0 + 3 x BCM43602) user was exepriencing firmware crashes that > never resulted in passing BRCMF_E_PSM_WATCHDOG to the host driver. > > That made me implement this trivial software watchdog that simply checks > periodically if firmware still replies to the commands. > > Luckily this patch DOES NOT seem to be needed anymore since the commit > 8a3ab2f38f16 ("brcmfmac: trigger memory dump upon firmware halt > signal"). That change allows brcmfmac to detect firmware crashes > successfully. > > This patch is being posted for research/debugging purposes only. It > SHOULD NOT be applied until someone notices a firmware crash that > doesn't trigger the BRCMF_D2H_DEV_FWHALT signal. Kudos for making it clear that I can safely drop this in patchwork :) This makes it so much easier for me. -- Kalle Valo