Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1214542
| From | Yaniv Gardi <ygardi@codeaurora.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 05/15] scsi: ufs: increase fDeviceInit query response timeout |
| Date | 2015-08-27 14:50 +0200 |
| Message-ID | <q24MY-4IH-51@gated-at.bofh.it> (permalink) |
| References | <q24MW-4IH-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
fDeviceInit query response time for some devices is too long that default
query request timeout of 100ms may not be enough. Experiments show that
fDeviceInit response sometimes takes 500ms so to be on safer side this
change sets the timeout to 600ms. Without this change, we might
unnecessarily have to retry fDeviceInit query requests multiple times and
each query request timeout prints one error message.
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
---
drivers/scsi/ufs/ufshcd.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index e0b8755..573a8cb 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -58,6 +58,12 @@
#define QUERY_REQ_RETRIES 10
/* Query request timeout */
#define QUERY_REQ_TIMEOUT 30 /* msec */
+/*
+ * Query request timeout for fDeviceInit flag
+ * fDeviceInit query response time for some devices is too large that default
+ * QUERY_REQ_TIMEOUT may not be enough for such devices.
+ */
+#define QUERY_FDEVICEINIT_REQ_TIMEOUT 600 /* msec */
/* Task management command timeout */
#define TM_CMD_TIMEOUT 100 /* msecs */
@@ -1651,6 +1657,7 @@ static int ufshcd_query_flag(struct ufs_hba *hba, enum query_opcode opcode,
struct ufs_query_req *request = NULL;
struct ufs_query_res *response = NULL;
int err, index = 0, selector = 0;
+ int timeout = QUERY_REQ_TIMEOUT;
BUG_ON(!hba);
@@ -1683,7 +1690,10 @@ static int ufshcd_query_flag(struct ufs_hba *hba, enum query_opcode opcode,
goto out_unlock;
}
- err = ufshcd_exec_dev_cmd(hba, DEV_CMD_TYPE_QUERY, QUERY_REQ_TIMEOUT);
+ if (idn == QUERY_FLAG_IDN_FDEVICEINIT)
+ timeout = QUERY_FDEVICEINIT_REQ_TIMEOUT;
+
+ err = ufshcd_exec_dev_cmd(hba, DEV_CMD_TYPE_QUERY, timeout);
if (err) {
dev_err(hba->dev,
--
1.8.5.2
--
QUALCOMM ISRAEL, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 00/15] Big fixes, retries, handle a race condition Yaniv Gardi <ygardi@codeaurora.org> - 2015-08-27 14:50 +0200 [PATCH v2 12/15] scsi: ufs: reduce the interrupts for power mode change requests Yaniv Gardi <ygardi@codeaurora.org> - 2015-08-27 14:50 +0200 [PATCH v2 14/15] scsi: ufs: commit descriptors before setting the doorbell Yaniv Gardi <ygardi@codeaurora.org> - 2015-08-27 14:50 +0200 [PATCH v2 11/15] scsi: ufs: retry failed query flag requests Yaniv Gardi <ygardi@codeaurora.org> - 2015-08-27 14:50 +0200 [PATCH v2 01/15] scsi: ufs: clear UTRD, UPIU req and rsp before new transfers Yaniv Gardi <ygardi@codeaurora.org> - 2015-08-27 14:50 +0200 [PATCH v2 06/15] scsi: ufs: avoid exception event handler racing with PM callbacks Yaniv Gardi <ygardi@codeaurora.org> - 2015-08-27 14:50 +0200 [PATCH v2 08/15] scsi: ufs: add retries to dme_peer get and set attribute Yaniv Gardi <ygardi@codeaurora.org> - 2015-08-27 14:50 +0200 [PATCH v2 05/15] scsi: ufs: increase fDeviceInit query response timeout Yaniv Gardi <ygardi@codeaurora.org> - 2015-08-27 14:50 +0200 [PATCH v2 13/15] scsi: ufs: add missing memory barriers Yaniv Gardi <ygardi@codeaurora.org> - 2015-08-27 14:50 +0200 [PATCH v2 03/15] scsi: ufs: verify command tag validity Yaniv Gardi <ygardi@codeaurora.org> - 2015-08-27 14:50 +0200 [PATCH v2 10/15] scsi: ufs: fix error recovery after the hibern8 exit failure Yaniv Gardi <ygardi@codeaurora.org> - 2015-08-27 14:50 +0200
csiph-web