diff --git a/lib/env_dpdk/pci.c b/lib/env_dpdk/pci.c index c99a5be2a..b7db73ba5 100644 --- a/lib/env_dpdk/pci.c +++ b/lib/env_dpdk/pci.c @@ -87,11 +87,6 @@ spdk_pci_device_detach(struct spdk_pci_device *device) rte_eal_device_remove(&device->device); #endif rte_eal_pci_detach(&addr); - /* This will not actually load any drivers because our - * callback isn't set, but it will re-add the device - * to DPDK's internal list. - */ - rte_eal_pci_probe_one(&addr); } int diff --git a/lib/nvme/nvme_pcie.c b/lib/nvme/nvme_pcie.c index 1230d4d9d..80bb027a2 100644 --- a/lib/nvme/nvme_pcie.c +++ b/lib/nvme/nvme_pcie.c @@ -644,7 +644,11 @@ nvme_pcie_ctrlr_scan(const struct spdk_nvme_transport_id *trid, _nvme_pcie_hotplug_monitor(cb_ctx, probe_cb, remove_cb); } - return spdk_pci_nvme_enumerate(pcie_nvme_enum_cb, &enum_ctx); + if (enum_ctx.has_pci_addr == false) { + return spdk_pci_nvme_enumerate(pcie_nvme_enum_cb, &enum_ctx); + } else { + return spdk_pci_nvme_device_attach(pcie_nvme_enum_cb, &enum_ctx, &enum_ctx.pci_addr); + } } static int