opnsense-src/sys/dev/nvme
Warner Losh 25df691800 nvme: Fix hotplug on one of the amazon platforms
Amazon EC2 m7i cloud instances use PCI hotplug rather than ACPI
hotplug. The card is removed and detach is called to remove the drive
from the system. The hardware is no longer present at this point, but
the bridge doesn't translate the now-missing hardware reads to all ff's
leading us to conclude the hardware is there and we need to do a proper
shutdown of it. Fix this oversight by asking the bridge if the device is
still present as well. We need both tests since some systems one cane
remove the card w/o a hotplug event and we want to fail-safe in those
cases.

Convert gone to a bool while I'm here and update a comment about
shutting down the controller and why that's important.

Tested by: cperciva
Sponsored by: Netflix

(cherry picked from commit dc95228d98474aba940e3885164912b419c5579d)
2025-03-30 16:44:57 -07:00
..
nvme.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
nvme.h nvme: Eliminate intel_log_temp_stats_swapbytes 2024-08-26 14:31:03 -04:00
nvme_ahci.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
nvme_ctrlr.c nvme: Fix hotplug on one of the amazon platforms 2025-03-30 16:44:57 -07:00
nvme_ctrlr_cmd.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
nvme_ns.c nvme: Use the NVMEF macro to construct fields 2024-08-26 13:27:08 -04:00
nvme_ns_cmd.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
nvme_pci.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
nvme_private.h nvme: Export constants for min and max queue sizes 2024-08-26 14:27:21 -04:00
nvme_qpair.c nvme: Use the NVMEF macro to construct fields 2024-08-26 13:27:08 -04:00
nvme_sim.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
nvme_sysctl.c nvme: Introduce longer timeouts for admin queue 2023-11-14 07:54:18 -05:00
nvme_test.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
nvme_util.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00