]> 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)
commita8aad9f01454af55a8c7156e0b67b47f114da73d
tree9989e9c3b934f0737e3c87d3496687747c7140d5
parent302bf45c58c37f435645fc898c4a48e6202bd99e
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: 9de6067a527e5 ("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