]> git.baikalelectronics.ru Git - kernel.git/commit
nvme-pci: fix hot removal during error handling
authorKeith Busch <keith.busch@intel.com>
Mon, 15 Oct 2018 16:19:06 +0000 (10:19 -0600)
committerChristoph Hellwig <hch@lst.de>
Wed, 17 Oct 2018 07:07:11 +0000 (09:07 +0200)
commit2e8b86b4dc5cd7c4d3ed1fe9fc8e505cfbcb1c7f
tree2c251cd30f1f497555069d7545d91bbade70d703
parent5627bbed1c50b1c0bf9ad3afe54c30957e771700
nvme-pci: fix hot removal during error handling

A removal waits for the reset_work to complete. If a surprise removal
occurs around the same time as an error triggered controller reset, and
reset work happened to dispatch a command to the removed controller, the
command won't be recovered since the timeout work doesn't do anything
during error recovery. We wouldn't want to wait for timeout handling
anyway, so this patch fixes this by disabling the controller and killing
admin queues prior to syncing with the reset_work.

Signed-off-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/pci.c