nvme: do not restart the request timeout if we're resetting the controller
authorKeith Busch <keith.busch@intel.com>
Thu, 26 Nov 2015 11:11:07 +0000 (12:11 +0100)
committerJens Axboe <axboe@fb.com>
Tue, 22 Dec 2015 16:38:33 +0000 (09:38 -0700)
commite1569a16180aef4311ff5fc54f54b23ae9e8a03e
tree0f2dfa80b824d26feef104e4deb63352f3587eb9
parent846cc05f95d599801f296d8599e82686ebd395f0
nvme: do not restart the request timeout if we're resetting the controller

Otherwise we're never going to complete a command when it is restarted just
after we completed all other outstanding commands in nvme_clear_queue.

The controller must be disabled prior to completing a presumed lost
command, do this by directly shutting down the controller before
queueing the reset work, and return EH_HANDLED from the timeout handler
after we shut the controller down.

Signed-off-by: Keith Busch <keith.busch@intel.com>
[hch: split and rebase]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/nvme/host/pci.c