2019-11-08 08:17:01

by Can Guo

[permalink] [raw]
Subject: [PATCH v1 2/5] scsi: ufs: Add new bit field PA_INIT to UECDL register

Add new bit field (bit-15) PA_INIT to UECDL register, this will correctly
handle any PA_INIT error.

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

diff --git a/drivers/scsi/ufs/ufshci.h b/drivers/scsi/ufs/ufshci.h
index dbb75cd..c2961d3 100644
--- a/drivers/scsi/ufs/ufshci.h
+++ b/drivers/scsi/ufs/ufshci.h
@@ -195,7 +195,7 @@ enum {

/* UECDL - Host UIC Error Code Data Link Layer 3Ch */
#define UIC_DATA_LINK_LAYER_ERROR 0x80000000
-#define UIC_DATA_LINK_LAYER_ERROR_CODE_MASK 0x7FFF
+#define UIC_DATA_LINK_LAYER_ERROR_CODE_MASK 0xFFFF
#define UIC_DATA_LINK_LAYER_ERROR_TCX_REP_TIMER_EXP 0x2
#define UIC_DATA_LINK_LAYER_ERROR_AFCX_REQ_TIMER_EXP 0x4
#define UIC_DATA_LINK_LAYER_ERROR_FCX_PRO_TIMER_EXP 0x8
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


2019-11-12 07:55:43

by Avri Altman

[permalink] [raw]
Subject: RE: [PATCH v1 2/5] scsi: ufs: Add new bit field PA_INIT to UECDL register


>
> Add new bit field (bit-15) PA_INIT to UECDL register, this will correctly handle
> any PA_INIT error.
>
> Signed-off-by: Can Guo <[email protected]>
Acked-by Avri Altman <[email protected]>

This is a HCI3.0 change, so maybe make note of that?
But UIC_DATA_LINK_LAYER_ERROR_CODE_MASK isn't being used anywhere, better just remove it, don't you think?
Instead, while at it, fix ufshcd_update_uic_error to check UIC_DATA_LINK_LAYER_ERROR when checking for data link layer errors?

2019-11-13 00:43:12

by Can Guo

[permalink] [raw]
Subject: Re: [PATCH v1 2/5] scsi: ufs: Add new bit field PA_INIT to UECDL register

On 2019-11-12 15:53, Avri Altman wrote:
>>
>> Add new bit field (bit-15) PA_INIT to UECDL register, this will
>> correctly handle
>> any PA_INIT error.
>>
>> Signed-off-by: Can Guo <[email protected]>
> Acked-by Avri Altman <[email protected]>
>
> This is a HCI3.0 change, so maybe make note of that?
> But UIC_DATA_LINK_LAYER_ERROR_CODE_MASK isn't being used anywhere,
> better just remove it, don't you think?
> Instead, while at it, fix ufshcd_update_uic_error to check
> UIC_DATA_LINK_LAYER_ERROR when checking for data link layer errors?

Hi Avri,

I will squash this change to my patch, it is used there.
[PATCH v3 5/7] scsi: ufs: Fix irq return code
url - https://lore.kernel.org/patchwork/patch/1148656/

Thanks,
Can Guo.