nvme: ensure disabling pairs with unquiesce
authorKeith Busch <kbusch@kernel.org>
Wed, 12 Jul 2023 15:36:47 +0000 (08:36 -0700)
committerKeith Busch <kbusch@kernel.org>
Wed, 12 Jul 2023 16:32:58 +0000 (09:32 -0700)
commit71a5bb153be104d9175636e95166fd5e37466649
tree43e82166fabb628afe20dd5dbf9cc2209401bfb2
parentee6fdc5055e916b1dd497f11260d4901c4c1e55e
nvme: ensure disabling pairs with unquiesce

If any error handling that disables the controller fails to queue the
reset work, like if the state changed to disconnected inbetween, then
the failed teardown needs to unquiesce the queues since it's no longer
paired with reset_work. Just make sure that the controller can be put
into a resetting state prior to starting the disable so that no other
handling can change the queue states while recovery is happening.

Reported-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/host/pci.c