]> www.infradead.org Git - users/jedix/linux-maple.git/commit
NVMe: Unbind driver on failure
authorKeith Busch <keith.busch@intel.com>
Mon, 28 Mar 2016 22:03:21 +0000 (16:03 -0600)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 1 Jun 2017 20:41:24 +0000 (13:41 -0700)
commiteb52daa65a5f64134eeef4ee06c682e7d7596092
treede056bc07c17d53867d5dd55575dad45a7837888
parent5d7b2b4a305355ed9badf05cedc4eb518c285862
NVMe: Unbind driver on failure

Instead of removing the PCI device from the kernel's topology on
controller failure, this patch simply requests unbinding the device
from the driver. This avoids concurrently running pci removal with the
hot plug event, which has been reported to be problematic when multiple
surprise events occur near simultaneously.

The other benefit is that we will have PCI config and memory space
available to poke around for debugging a failed controller, assuming
the device was not physically removed.

The down side occurs if the platform and/or kernel do not support any
type of surprise hot removal. The device will remain visible through
sysfs (and therefore lspci), and some manual work is necessary to get
the logical topology corrected. But if your platform and/or kernel don't
support surprise removal, you probably shouldn't be doing that anyway.

Signed-off-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
(cherry picked from commit 921920ab32f290dafdb0359024d4587897712728)

Orabug: 25130845

Signed-off-by: Ashok Vairavan <ashok.vairavan@oracle.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/nvme/host/pci.c