linux/drivers/nvme/host
Stefan Roese b98235d3a4 nvme-pci: harden drive presence detect in nvme_dev_disable()
On our ZynqMP system we observe, that a NVMe drive that resets itself
while doing a firmware update causes a Kernel crash like this:

[ 67.720772] pcieport 0000:02:02.0: pciehp: Slot(2): Link Down
[ 67.720783] pcieport 0000:02:02.0: pciehp: Slot(2): Card not present
[ 67.720795] nvme 0000:04:00.0: PME# disabled
[ 67.720849] Internal error: synchronous external abort: 96000010 [#1] PREEMPT SMP
[ 67.720853] nwl-pcie fd0e0000.pcie: Slave error

Analysis: When nvme_dev_disable() is called because of this PCIe hotplug
event, pci_is_enabled() is still true. And accessing the NVMe drive
which is currently not available as it's in reboot process causes this
"synchronous external abort" on this ARM64 platform.

This patch adds the pci_device_is_present() check as well, which returns
false in this "Card not present" hot-plug case. With this change, the
NVMe driver does not try to access the NVMe registers any more and the
FW update finishes without any problems.

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2022-05-16 08:07:19 +02:00
..
constants.c nvme: remove unneeded include from constants file 2022-05-16 08:06:59 +02:00
core.c nvme: mark internal passthru request RQF_QUIET 2022-05-16 08:06:59 +02:00
fabrics.c nvme-fabrics: remove unnecessary braces for case 2022-02-28 13:45:04 +02:00
fabrics.h nvme-fabrics: fix state check in nvmf_ctlr_matches_baseopts() 2022-02-03 07:30:57 +01:00
fault_inject.c block: remove the ->rq_disk field in struct request 2021-11-29 06:41:29 -07:00
fc.c nvme: add a helper to initialize connect_q 2022-02-28 13:45:06 +02:00
fc.h nvme-fc: Update header and host for common definitions for LS handling 2020-05-09 16:18:33 -06:00
hwmon.c nvme-hwmon: Return error code when registration fails 2021-03-05 13:41:03 +01:00
ioctl.c nvme: remove nvme_alloc_request and nvme_alloc_request_qid 2022-03-16 09:47:05 +01:00
Kconfig nvme: add verbose error logging 2022-02-28 13:45:06 +02:00
Makefile nvme: add verbose error logging 2022-02-28 13:45:06 +02:00
multipath.c for-5.18/drivers-2022-04-01 2022-04-01 16:26:57 -07:00
nvme.h nvme: fix interpretation of DMRSL 2022-05-16 08:06:54 +02:00
pci.c nvme-pci: harden drive presence detect in nvme_dev_disable() 2022-05-16 08:07:19 +02:00
rdma.c for-5.18/drivers-2022-03-18 2022-03-21 17:16:01 -07:00
tcp.c for-5.18/drivers-2022-03-18 2022-03-21 17:16:01 -07:00
trace.c nvme: add set feature tracing support 2021-08-16 14:42:23 +02:00
trace.h block: remove the ->rq_disk field in struct request 2021-11-29 06:41:29 -07:00
zns.c nvme: report write pointer for a full zone as zone start + zone len 2021-12-06 08:52:08 +01:00