]> git.baikalelectronics.ru Git - kernel.git/commit
nvme: Prevent resets during paused controller state
authorKeith Busch <kbusch@kernel.org>
Fri, 6 Sep 2019 17:23:08 +0000 (11:23 -0600)
committerKeith Busch <kbusch@kernel.org>
Mon, 14 Oct 2019 14:21:54 +0000 (23:21 +0900)
commit51614498d82bfb33f1ce0c44b404a14ccf0bc2e8
treedcac648e8a57d4661743094f6ec2c565d36132ee
parent62d7bb942115f23bfe91da7f013715749854e30f
nvme: Prevent resets during paused controller state

A paused controller is doing critical internal activation work in the
background. Prevent subsequent controller resets from occurring during
this period by setting the controller state to RESETTING first. A helper
function, nvme_try_sched_reset_work(), is introduced for these paths so
they may continue with scheduling the reset_work after they've completed
their uninterruptible critical section.

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