From: Bart Van Assche <bvanassche@acm.org>
To: "Martin K . Petersen" <martin.petersen@oracle.com>
Cc: Jaegeuk Kim <jaegeuk@kernel.org>,
Avri Altman <avri.altman@wdc.com>,
Adrian Hunter <adrian.hunter@intel.com>,
linux-scsi@vger.kernel.org, Bart Van Assche <bvanassche@acm.org>,
Stanley Chu <stanley.chu@mediatek.com>,
"James E.J. Bottomley" <jejb@linux.ibm.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
Bean Huo <beanhuo@micron.com>,
Asutosh Das <quic_asutoshd@quicinc.com>
Subject: [PATCH 1/4] scsi: ufs: Increase the START STOP UNIT timeout from one to ten seconds
Date: Tue, 25 Apr 2023 16:29:51 -0700 [thread overview]
Message-ID: <20230425232954.1229916-2-bvanassche@acm.org> (raw)
In-Reply-To: <20230425232954.1229916-1-bvanassche@acm.org>
One UFS vendor asked to increase the UFS timeout from 1 s to 3 s.
Another UFS vendor asked to increase the UFS timeout from 1 s to 10 s.
Hence this patch that increases the UFS timeout to 10 s. This patch can
cause the total timeout to exceed 20 s, the Android shutdown timeout.
This is fine since the loop around ufshcd_execute_start_stop() exists to
deal with unit attentions and because unit attentions are reported
quickly.
Fixes: dcd5b7637c6d ("scsi: ufs: Reduce the START STOP UNIT timeout")
Fixes: 8f2c96420c6e ("scsi: ufs: core: Reduce the power mode change timeout")
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Stanley Chu <stanley.chu@mediatek.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
drivers/ufs/core/ufshcd.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index 9434328ba323..0e2a0656858a 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -9182,7 +9182,8 @@ static int ufshcd_execute_start_stop(struct scsi_device *sdev,
};
return scsi_execute_cmd(sdev, cdb, REQ_OP_DRV_IN, /*buffer=*/NULL,
- /*bufflen=*/0, /*timeout=*/HZ, /*retries=*/0, &args);
+ /*bufflen=*/0, /*timeout=*/10 * HZ, /*retries=*/0,
+ &args);
}
/**
next prev parent reply other threads:[~2023-04-25 23:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-25 23:29 [PATCH 0/4] UFS host controller driver patches Bart Van Assche
2023-04-25 23:29 ` Bart Van Assche [this message]
2023-04-26 11:39 ` [PATCH 1/4] scsi: ufs: Increase the START STOP UNIT timeout from one to ten seconds Bean Huo
2023-04-25 23:29 ` [PATCH 2/4] scsi: ufs: Fix handling of lrbp->cmd Bart Van Assche
2023-04-26 12:48 ` Bean Huo
2023-04-26 22:04 ` Bart Van Assche
2023-04-25 23:29 ` [PATCH 3/4] scsi: ufs: Move ufshcd_wl_shutdown() Bart Van Assche
2023-04-25 23:29 ` [PATCH 4/4] scsi: ufs: Simplify driver shutdown Bart Van Assche
2023-04-26 6:07 ` Adrian Hunter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230425232954.1229916-2-bvanassche@acm.org \
--to=bvanassche@acm.org \
--cc=adrian.hunter@intel.com \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=jaegeuk@kernel.org \
--cc=jejb@linux.ibm.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=matthias.bgg@gmail.com \
--cc=quic_asutoshd@quicinc.com \
--cc=stanley.chu@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox