]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
NVMe: Use requested sync command timeout
authorKeith Busch <keith.busch@intel.com>
Sat, 17 Dec 2016 17:39:58 +0000 (09:39 -0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 1 Jun 2017 20:40:27 +0000 (13:40 -0700)
Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
(cherry picked from commit f4ff414aeb472397d3b4fc15c22ca65bab219ec8)

Orabug: 25130845
Signed-off-by: Ashok Vairavan <ashok.vairavan@oracle.com>
drivers/block/nvme-core.c

index fb44925c39a70466ad89d7ebcce9b9f255913ad9..8638039f2c0e02c1076cd8364d8f771c6ba17083 100644 (file)
@@ -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);