Re: [PATCH v2] mhi: pci_generic: Print warning in case of firmware crash

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 03, 2021 at 05:39:42PM +0100, Loic Poulain wrote:
> Print warning when MHI detects sys error.
> 
> Signed-off-by: Loic Poulain <loic.poulain@xxxxxxxxxx>

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>

Thanks,
Mani

> ---
>  v2: remove useless fallthough & unused mhi_pdev variable
> 
>  drivers/bus/mhi/pci_generic.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/drivers/bus/mhi/pci_generic.c b/drivers/bus/mhi/pci_generic.c
> index 444693e..2476041 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)
> -- 
> 2.7.4
> 



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux