diff mbox series

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

Message ID 1612370382-21643-1-git-send-email-loic.poulain@linaro.org
State Accepted
Commit 1e2f29ba83c55b9778bdb60e77216b08dbd69bf5
Headers show
Series [v2] mhi: pci_generic: Print warning in case of firmware crash | expand

Commit Message

Loic Poulain Feb. 3, 2021, 4:39 p.m. UTC
Print warning when MHI detects sys error.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>

---
 v2: remove useless fallthough & unused mhi_pdev variable

 drivers/bus/mhi/pci_generic.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

-- 
2.7.4

Comments

Hemant Kumar Feb. 3, 2021, 5:13 p.m. UTC | #1
On 2/3/21 8:39 AM, Loic Poulain wrote:
> Print warning when MHI detects sys error.

> 

> Signed-off-by: Loic Poulain <loic.poulain@linaro.org>

> ---

>   v2: remove useless fallthough & unused mhi_pdev variable

> 

>   drivers/bus/mhi/pci_generic.c | 10 ++++++++++

>   1 file changed, 10 insertions(+)


Reviewed-by: Hemant Kumar <hemantk@codeaurora.org>

-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
Manivannan Sadhasivam Feb. 5, 2021, 12:26 p.m. UTC | #2
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@linaro.org>


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


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

>
Manivannan Sadhasivam Feb. 5, 2021, 12:33 p.m. UTC | #3
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@linaro.org>


Applied to mhi-next!

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

>
patchwork-bot+linux-arm-msm@kernel.org March 1, 2021, 7:59 p.m. UTC | #4
Hello:

This patch was applied to qcom/linux.git (refs/heads/for-next):

On Wed,  3 Feb 2021 17:39:42 +0100 you wrote:
> Print warning when MHI detects sys error.

> 

> Signed-off-by: Loic Poulain <loic.poulain@linaro.org>

> ---

>  v2: remove useless fallthough & unused mhi_pdev variable

> 

>  drivers/bus/mhi/pci_generic.c | 10 ++++++++++

>  1 file changed, 10 insertions(+)


Here is the summary with links:
  - [v2] mhi: pci_generic: Print warning in case of firmware crash
    https://git.kernel.org/qcom/c/1e2f29ba83c5

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
diff mbox series

Patch

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)