scsi: ufs: Do not clear the DL layer timers
authorCan Guo <cang@codeaurora.org>
Thu, 5 Dec 2019 02:14:42 +0000 (02:14 +0000)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 20 Dec 2019 03:08:53 +0000 (22:08 -0500)
commit0834253734cbb40c312c06e5beb9b94ac7cf5e80
treef3b72cf87483f5c8cb9b55e748591fdc5c5ffbe6
parent17c7d35f141ef6158076adf3338f115f64fcf760
scsi: ufs: Do not clear the DL layer timers

During power mode change, PACP_PWR_Req frame sends PAPowerModeUserData
parameters (and they are considered valid by device if Flags[4] -
UserDataValid bit is set in the same frame).  Currently we don't set these
PAPowerModeUserData parameters and hardware always sets UserDataValid bit
which would clear all the DL layer timeout values of the peer device after
the power mode change.

This change sets the PAPowerModeUserData[0..5] to UniPro specification
recommended default values, in addition we are also setting the relevant
DME_LOCAL_* timer attributes as required by UFS HCI specification.

Link: https://lore.kernel.org/r/0101016ed3d688a4-cfaeb1c9-238b-46c4-9c89-d48c410ba325-000000@us-west-2.amazonses.com
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Reviewed-by: Bean Huo <beanhuo@micron.com>
Signed-off-by: Can Guo <cang@codeaurora.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ufs/ufshcd.c
drivers/scsi/ufs/unipro.h