2020-11-17 07:07:42

by Can Guo

[permalink] [raw]
Subject: [PATCH v3 3/3] scsi: ufs: Print host regs in IRQ handler when AH8 error happens

When AH8 error happens, all the regs and states are dumped in err handler.
Sometime we need to look into host regs right after AH8 error happens,
which is before leaving the IRQ handler.

Signed-off-by: Can Guo <[email protected]>
---
drivers/scsi/ufs/ufshcd.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index cd7394e..a7857f6 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -6057,7 +6057,8 @@ static irqreturn_t ufshcd_check_errors(struct ufs_hba *hba)
hba->saved_uic_err |= hba->uic_error;

/* dump controller state before resetting */
- if ((hba->saved_err & (INT_FATAL_ERRORS)) ||
+ if ((hba->saved_err &
+ (INT_FATAL_ERRORS | UFSHCD_UIC_HIBERN8_MASK)) ||
(hba->saved_uic_err &&
(hba->saved_uic_err != UFSHCD_UIC_PA_GENERIC_ERROR))) {
dev_err(hba->dev, "%s: saved_err 0x%x saved_uic_err 0x%x\n",
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.


2020-11-17 17:28:19

by Asutosh Das (asd)

[permalink] [raw]
Subject: Re: [PATCH v3 3/3] scsi: ufs: Print host regs in IRQ handler when AH8 error happens

On 11/16/2020 11:04 PM, Can Guo wrote:
> When AH8 error happens, all the regs and states are dumped in err handler.
> Sometime we need to look into host regs right after AH8 error happens,
> which is before leaving the IRQ handler.
>
> Signed-off-by: Can Guo <[email protected]>
> ---

Reviewed-by: Asutosh Das <[email protected]>

> drivers/scsi/ufs/ufshcd.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index cd7394e..a7857f6 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -6057,7 +6057,8 @@ static irqreturn_t ufshcd_check_errors(struct ufs_hba *hba)
> hba->saved_uic_err |= hba->uic_error;
>
> /* dump controller state before resetting */
> - if ((hba->saved_err & (INT_FATAL_ERRORS)) ||
> + if ((hba->saved_err &
> + (INT_FATAL_ERRORS | UFSHCD_UIC_HIBERN8_MASK)) ||
> (hba->saved_uic_err &&
> (hba->saved_uic_err != UFSHCD_UIC_PA_GENERIC_ERROR))) {
> dev_err(hba->dev, "%s: saved_err 0x%x saved_uic_err 0x%x\n",
>


--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
Linux Foundation Collaborative Project

2020-11-25 02:53:53

by hongwus

[permalink] [raw]
Subject: Re: [PATCH v3 3/3] scsi: ufs: Print host regs in IRQ handler when AH8 error happens

On 2020-11-18 01:23, Asutosh Das (asd) wrote:
> On 11/16/2020 11:04 PM, Can Guo wrote:
>> When AH8 error happens, all the regs and states are dumped in err
>> handler.
>> Sometime we need to look into host regs right after AH8 error happens,
>> which is before leaving the IRQ handler.
>>
>> Signed-off-by: Can Guo <[email protected]>
>> ---
>
> Reviewed-by: Asutosh Das <[email protected]>
>
>> drivers/scsi/ufs/ufshcd.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
>> index cd7394e..a7857f6 100644
>> --- a/drivers/scsi/ufs/ufshcd.c
>> +++ b/drivers/scsi/ufs/ufshcd.c
>> @@ -6057,7 +6057,8 @@ static irqreturn_t ufshcd_check_errors(struct
>> ufs_hba *hba)
>> hba->saved_uic_err |= hba->uic_error;
>> /* dump controller state before resetting */
>> - if ((hba->saved_err & (INT_FATAL_ERRORS)) ||
>> + if ((hba->saved_err &
>> + (INT_FATAL_ERRORS | UFSHCD_UIC_HIBERN8_MASK)) ||
>> (hba->saved_uic_err &&
>> (hba->saved_uic_err != UFSHCD_UIC_PA_GENERIC_ERROR))) {
>> dev_err(hba->dev, "%s: saved_err 0x%x saved_uic_err 0x%x\n",
>>

Reviewed-by: Hongwu Su<[email protected]>

2020-11-25 04:20:11

by Bao D. Nguyen

[permalink] [raw]
Subject: Re: [PATCH v3 3/3] scsi: ufs: Print host regs in IRQ handler when AH8 error happens

On 2020-11-16 23:04, Can Guo wrote:
> When AH8 error happens, all the regs and states are dumped in err
> handler.
> Sometime we need to look into host regs right after AH8 error happens,
> which is before leaving the IRQ handler.
>
> Signed-off-by: Can Guo <[email protected]>
> ---
> drivers/scsi/ufs/ufshcd.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index cd7394e..a7857f6 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -6057,7 +6057,8 @@ static irqreturn_t ufshcd_check_errors(struct
> ufs_hba *hba)
> hba->saved_uic_err |= hba->uic_error;
>
> /* dump controller state before resetting */
> - if ((hba->saved_err & (INT_FATAL_ERRORS)) ||
> + if ((hba->saved_err &
> + (INT_FATAL_ERRORS | UFSHCD_UIC_HIBERN8_MASK)) ||
> (hba->saved_uic_err &&
> (hba->saved_uic_err != UFSHCD_UIC_PA_GENERIC_ERROR))) {
> dev_err(hba->dev, "%s: saved_err 0x%x saved_uic_err 0x%x\n",

Reviewed-by: Bao D. Nguyen <[email protected]>