From 0735a5c00b81966a86e35ff17871366cc7bc2ac8 Mon Sep 17 00:00:00 2001 From: Keith Busch Date: Sat, 17 Dec 2016 09:39:58 -0800 Subject: [PATCH] NVMe: Use requested sync command timeout Signed-off-by: Keith Busch Signed-off-by: Jens Axboe (cherry picked from commit f4ff414aeb472397d3b4fc15c22ca65bab219ec8) Orabug: 25130845 Signed-off-by: Ashok Vairavan --- drivers/block/nvme-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c index fb44925c39a7..8638039f2c0e 100644 --- a/drivers/block/nvme-core.c +++ b/drivers/block/nvme-core.c @@ -1027,7 +1027,7 @@ int __nvme_submit_sync_cmd(struct request_queue *q, struct nvme_command *cmd, req->__sector = (sector_t) -1; req->bio = req->biotail = NULL; - req->timeout = ADMIN_TIMEOUT; + req->timeout = timeout ? timeout : ADMIN_TIMEOUT; req->cmd = (unsigned char *)cmd; req->cmd_len = sizeof(struct nvme_command); -- 2.50.1