[PATCH for-4.12] nvme/pci: Fix stuck nvme reset
From: axboe@kernel.dk (Jens Axboe)
Date: 2017-06-27 23:42:38
On 06/27/2017 05:40 PM, Christoph Hellwig wrote:
On Tue, Jun 27, 2017@07:43:38PM -0400, Keith Busch wrote:quoted
The controller state is set to resetting prior to disabling the controller, so this patch accounts for that state when deciding if it needs to freeze the queues. Without this, an 'nvme reset /dev/nvme0' blocks forever because the queues were never frozen.Ouch.quoted
- if (dev->ctrl.state == NVME_CTRL_LIVE) + if (dev->ctrl.state == NVME_CTRL_LIVE || + dev->ctrl.state == NVME_CTRL_RESETTING)Can you align this a little nicer: if (dev->ctrl.state == NVME_CTRL_LIVE || dev->ctrl.state == NVME_CTRL_RESETTING) Otherwise this looks fine: Reviewed-by: Christoph Hellwig <hch at lst.de> Maybe Jens should pick this up directly for the block tree? No point in a nvme pull request just for this.
Looks good to me too. As it so happens, I just hit this today, but didn't have time to look into why. I'll add it for this series. -- Jens Axboe