Revert "UPSTREAM: scsi: ufs: core: Reduce the power mode change timeout"

This reverts commit 3d35c6b91d.

Patch "scsi: ufs: core: Reduce the power mode change timeout" caused a
spike in the number of UFS suspend timeouts. Hence revert that change
and also later UFS driver changes.

Bug: b/246990788
Change-Id: I5aae929f0598020dc5e7c440946eb0d2101b07cc
Signed-off-by: Bart Van Assche <bvanassche@google.com>
This commit is contained in:
Bart Van Assche
2022-09-19 15:20:50 -07:00
parent 1d61c5b5a0
commit 0cf7d9ce9f

View File

@@ -8826,8 +8826,6 @@ static int ufshcd_set_dev_pwr_mode(struct ufs_hba *hba,
struct scsi_device *sdp;
unsigned long flags;
int ret, retries;
unsigned long deadline;
int32_t remaining;
spin_lock_irqsave(hba->host->host_lock, flags);
sdp = hba->sdev_ufs_device;
@@ -8860,14 +8858,9 @@ static int ufshcd_set_dev_pwr_mode(struct ufs_hba *hba,
* callbacks hence set the RQF_PM flag so that it doesn't resume the
* already suspended childs.
*/
deadline = jiffies + 10 * HZ;
for (retries = 3; retries > 0; --retries) {
ret = -ETIMEDOUT;
remaining = deadline - jiffies;
if (remaining <= 0)
break;
ret = scsi_execute(sdp, cmd, DMA_NONE, NULL, 0, NULL, &sshdr,
remaining / HZ, 0, 0, RQF_PM, NULL);
START_STOP_TIMEOUT, 0, 0, RQF_PM, NULL);
if (!scsi_status_is_check_condition(ret) ||
!scsi_sense_valid(&sshdr) ||
sshdr.sense_key != UNIT_ATTENTION)