]> git.baikalelectronics.ru Git - kernel.git/commit
nvme-pci: fix freeze accounting for error handling
authorKeith Busch <kbusch@kernel.org>
Tue, 12 Jul 2022 15:16:32 +0000 (08:16 -0700)
committerChristoph Hellwig <hch@lst.de>
Thu, 14 Jul 2022 14:35:25 +0000 (16:35 +0200)
commit84b32971b4ab8b6cbb0d6e0d862300ec816fabb3
tree9989e9c3b934f0737e3c87d3496687747c7140d5
parentf47ae1059662252d9a8b331991efc2836545993f
nvme-pci: fix freeze accounting for error handling

A reset on a live device experiencing a link error still needs to have
the queue freeze state started for the subsequent reinitialization. Skip
only the register read if the device is not present instead of bypassing
the freeze checks.

Fixes: ae97f76910d1b ("nvme-pci: harden drive presence detect in nvme_dev_disable()")
Reported-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Tested-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/pci.c