scsi: ufs: add quirk to increase host PA_SaveConfigTime
authorSubhash Jadavani <subhashj@codeaurora.org>
Tue, 4 Apr 2017 19:32:13 +0000 (19:32 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 12 Apr 2017 10:41:17 +0000 (12:41 +0200)
commitbedc629494cdd55d1ef7d6d8bff294f8b07b919b
tree139b2b4bf6255621b1966fe9ad4c7eb5928b5047
parent5c6b8ad1ab251d14545853b9bb4b3282d182aa67
scsi: ufs: add quirk to increase host PA_SaveConfigTime

[ Upstream commit 56d4a1866d748732fd8d690b2c2156bbc9c9eb02 ]

The maximum value PA_SaveConfigTime is 250 (10us) but this is not enough
for some vendors. Gear switch from PWM to HS may fail even with this
max.  PA_SaveConfigTime. Gear switch can be issued by host controller as
an error recovery and any software delay will not help on this case so
we need to increase PA_SaveConfigTime to >32us as per vendor
recommendation.  This change adds a quirk to increase the
PA_SaveConfigTime parameter.

Reviewed-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/ufs/ufs-qcom.c
drivers/scsi/ufs/ufs-qcom.h
drivers/scsi/ufs/ufs_quirks.h
drivers/scsi/ufs/ufshcd.c
drivers/scsi/ufs/ufshcd.h