]> www.infradead.org Git - nvme.git/commit
nvme-pci: do not directly handle subsys reset fallout
authorKeith Busch <kbusch@kernel.org>
Mon, 24 Jun 2024 15:56:17 +0000 (08:56 -0700)
committerKeith Busch <kbusch@kernel.org>
Wed, 26 Jun 2024 14:02:22 +0000 (07:02 -0700)
commit210b1f6576e8b367907e7ff51ef425062e1468e4
tree50b17feca8ed01d697121a0a89fb552635a10786
parentbf86e7d97b448eadf7959f025ce9e39c42eef92d
nvme-pci: do not directly handle subsys reset fallout

Scheduling reset_work after a nvme subsystem reset is expected to fail
on pcie, but this also prevents potential handling the platform's pcie
services may provide that might successfully recovering the link without
re-enumeration. Such examples include AER, DPC, and power's EEH.

Provide a pci specific operation that safely initiates a subsystem
reset, and instead of scheduling reset work, read back the status
register to trigger a pcie read error.

Since this only affects pci, the other fabrics drivers subscribe to a
generic nvmf subsystem reset that is exactly the same as before. The
loop fabric doesn't use it because nvmet doesn't support setting that
property anyway.

And since we're using the magic NSSR value in two places now, provide a
symbolic define for it.

Reported-by: Nilay Shroff <nilay@linux.ibm.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/host/fabrics.c
drivers/nvme/host/fabrics.h
drivers/nvme/host/fc.c
drivers/nvme/host/nvme.h
drivers/nvme/host/pci.c
drivers/nvme/host/rdma.c
drivers/nvme/host/tcp.c
include/linux/nvme.h