OSDN Git Service

mhi: pci_generic: Add health-check
authorLoic Poulain <loic.poulain@linaro.org>
Mon, 4 Jan 2021 16:14:56 +0000 (17:14 +0100)
committerManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Mon, 4 Jan 2021 16:20:25 +0000 (21:50 +0530)
commit8562d4fe34a3ef52da077f77985994bb9ad1f83e
tree5d7b0a107dd1e84892bc7a4028513912b5d1bab6
parentb012ee6bfe2ac99bdf7d70b7776187f416c1cab8
mhi: pci_generic: Add health-check

If the modem crashes for any reason, we may not be able to detect
it at MHI level (MHI registers not reachable anymore).

This patch implements a health-check mechanism to check regularly
that device is alive (MHI layer can communicate with). If device
is not alive (because a crash or unexpected reset), the recovery
procedure is triggered.

Tested successfully with Telit FN980m module.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Hemant Kumar <hemantk@codeaurora.org>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
drivers/bus/mhi/pci_generic.c