]> www.infradead.org Git - users/dwmw2/linux.git/commit
nvme: centralize setting the timeout in nvme_alloc_request
authorChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Tue, 10 Nov 2020 00:33:42 +0000 (16:33 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Jun 2022 06:59:49 +0000 (08:59 +0200)
commitfe06c692cd7e3bf12b2561ba2d5f6490e8082a8f
treecc43254117bf29b2af7fcc51a6c836fc54cd0a1b
parentafbc954e78962028a6806e34f3cc40e236f01770
nvme: centralize setting the timeout in nvme_alloc_request

[ Upstream commit 0d2e7c840b178bf9a47bd0de89d8f9182fa71d86 ]

The function nvme_alloc_request() is called from different context
(I/O and Admin queue) where callers do not consider the I/O timeout when
called from I/O queue context.

Update nvme_alloc_request() to set the default I/O and Admin timeout
value based on whether the queuedata is set or not.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/nvme/host/core.c
drivers/nvme/host/lightnvm.c
drivers/nvme/host/pci.c