nvme: Wait for reset state when required
authorKeith Busch <kbusch@kernel.org>
Wed, 4 Sep 2019 16:06:11 +0000 (10:06 -0600)
committerKeith Busch <kbusch@kernel.org>
Mon, 14 Oct 2019 14:22:00 +0000 (23:22 +0900)
commitc1ac9a4b0797ca8bb4470f863a5f78ef1ab13bed
treeef6e639ca906f07528d43d629441c84d0f947b97
parent4c75f877853cfa81b12374a07208e07b077f39b8
nvme: Wait for reset state when required

Prevent simultaneous controller disabling/enabling tasks from interfering
with each other through a function to wait until the task successfully
transitioned the controller to the RESETTING state. This ensures disabling
the controller will not be interrupted by another reset path, otherwise
a concurrent reset may leave the controller in the wrong state.

Tested-by: Edmund Nadolski <edmund.nadolski@intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/host/core.c
drivers/nvme/host/nvme.h
drivers/nvme/host/pci.c