RE: [EXT] [PATCH v1 2/3] scsi: ufs: add error handling of auto-hibern8

Bean Huo (beanhuo)
2019-05-14T11:14:40Z

Hi, Stanley
Thanks for reply.

>
>On Mon, 2019-05-13 at 18:21 +0000, Bean Huo (beanhuo) wrote:
>> Hi, Stanley
>>
>> >+
>> >+static inline bool ufshcd_is_auto_hibern8_error(struct ufs_hba *hba,
>> >+ u32 intr_mask)
>> >+{
>> >+ return (ufshcd_is_auto_hibern8_supported(hba) &&
>> >+ !hba->uic_async_done &&
>>
>> Here check if uic_async_done is NULL, no big problem so far, but not safe
>enough.
>> How about setting a flag in ufshcd_auto_hibern8_enable(),
>
>>
>> I concern about how to compatible with auto_hibern8 disabled condition.
>
>Currently auto-hibern8 disabling method is not implemented in mainstream,
>so an "enabling" flag may looks redundant unless disabling path is really
>existed.
>
Did you try to update Auto-Hibernate Idle Timer with 0 through '/sys' (scsi: ufs: Add support for Auto-Hibernate Idle Timer)?
I don't know if this will disable your UFS controller Auto-Hibernate.
If having a look at UFS host Spec, software writes “0” to disable Auto-Hibernate Idle Timer.
Sorry I cannot verify this on my platform since it doesn't support auto-hibernate.

>I agree that checking hba->uic_async_done here does not look so intuitive.
>However even if auto-hibern8 is disabled, these checks could be safe enough
>because both "UIC_HIBERNATE_ENTER" and "UIC_HIBERNATE_EXIT" are
>raised only if "manual-hibernate" is performed, and in this case hba-
>>uic_async_done shall be true.
>
Yes, most of cases ,this is no problem.

>Anything else or corner case I missed?
>
The others are fine. I only concern checking hba->uic_async_done.

//Bean
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org