diff options
author | Loic Poulain | 2021-02-03 17:39:42 +0100 |
---|---|---|
committer | Manivannan Sadhasivam | 2021-02-05 17:58:49 +0530 |
commit | 1e2f29ba83c55b9778bdb60e77216b08dbd69bf5 (patch) | |
tree | 7348fa3e223c4dd817e47105f9a3353c7f336086 /drivers | |
parent | 77f2cb28ae5219decf9067e62907d3ecee839779 (diff) |
mhi: pci_generic: Print warning in case of firmware crash
Print warning when MHI detects sys error.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Reviewed-by: Hemant Kumar <hemantk@codeaurora.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/1612370382-21643-1-git-send-email-loic.poulain@linaro.org
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/bus/mhi/pci_generic.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/bus/mhi/pci_generic.c b/drivers/bus/mhi/pci_generic.c index 444693e3fd72..2476041f8d56 100644 --- a/drivers/bus/mhi/pci_generic.c +++ b/drivers/bus/mhi/pci_generic.c @@ -217,7 +217,17 @@ static void mhi_pci_write_reg(struct mhi_controller *mhi_cntrl, static void mhi_pci_status_cb(struct mhi_controller *mhi_cntrl, enum mhi_callback cb) { + struct pci_dev *pdev = to_pci_dev(mhi_cntrl->cntrl_dev); + /* Nothing to do for now */ + switch (cb) { + case MHI_CB_FATAL_ERROR: + case MHI_CB_SYS_ERROR: + dev_warn(&pdev->dev, "firmware crashed (%u)\n", cb); + break; + default: + break; + } } static bool mhi_pci_is_alive(struct mhi_controller *mhi_cntrl) |