Re: [PATCH RESEND 2/2] scsi: ufs: Update L4 attributes on manual hibern8 exit in Cadence UFS.

From: Vignesh Raghavendra
Date: Tue Nov 26 2019 - 23:16:13 EST


Hi Alim,

On 27/11/19 9:12 AM, Alim Akhtar wrote:
>
[...]
>>>> Backup L4 attributes duirng manual hibern8 entry and restore the L4
>>>> attributes on manual hibern8 exit as per JESD220C.
>>>>
>>> Can you point me to the relevant section on the spec?
>>>
>>
>> Per JESD 220C 9.4 UniPro/UFS Control Interface (Control Plane):
>>
>> "NOTE After exit from Hibernate all UniPro Transport Layer attributes (including
>> L4 T_PeerDeviceID,
>>
>> L4 T_PeerCPortID, L4 T_ConnectionState, etc.) will be reset to their reset values.
>> All required attributes
>>
>> must be restored properly on both ends before communication can resume."
>>
>> But its not clear whether SW needs to restore these attributes or hardware
>>
> Thanks Vignesh for pointing out the spec section, yes it is not clear, one way to confirm this is just by read L4 attributes before
> And after hinern8 entry/exit.

I know that on Cadence UFS controller L4 attributes are definitely lost
on hibernation entry/exit and therefore needs to be restored. But not
sure of other controllers. If this issue is seen on other controllers as
well, then we should probably consider moving this code to core driver
so that there is code reuse.

> (at least in the current platform it is not being done)
> AFA this patch is concerns, this looks ok to me.
> @ Avri , any thought on this?
>
>> Regards
>> Vignesh
>>

[...]
--
Regards
Vignesh