diff mbox series

[v3,3/3] scsi: ufs: Print host regs in IRQ handler when AH8 error happens

Message ID 1605596660-2987-4-git-send-email-cang@codeaurora.org (mailing list archive)
State Superseded
Headers show
Series Fix some racing problems btw err_handler and paths like system PM ops and the task abort callback | expand

Commit Message

Can Guo Nov. 17, 2020, 7:04 a.m. UTC
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 <cang@codeaurora.org>
---
 drivers/scsi/ufs/ufshcd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Asutosh Das (asd) Nov. 17, 2020, 5:23 p.m. UTC | #1
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 <cang@codeaurora.org>
> ---

Reviewed-by: Asutosh Das <asutoshd@codeaurora.org>

>   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",
>
hongwus@codeaurora.org Nov. 25, 2020, 2:51 a.m. UTC | #2
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 <cang@codeaurora.org>
>> ---
> 
> Reviewed-by: Asutosh Das <asutoshd@codeaurora.org>
> 
>>   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<hongwus@codeaurora.org>
Bao D. Nguyen Nov. 25, 2020, 4:17 a.m. UTC | #3
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 <cang@codeaurora.org>
> ---
>  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 <nguyenb@codeaurora.org>
diff mbox series

Patch

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",