diff --git a/lib/env_dpdk/pci.c b/lib/env_dpdk/pci.c index 8fcfdfcc0..45e350583 100644 --- a/lib/env_dpdk/pci.c +++ b/lib/env_dpdk/pci.c @@ -127,13 +127,6 @@ spdk_pci_enumerate(struct spdk_pci_enum_ctx *ctx, ctx->cb_fn = enum_cb; ctx->cb_arg = enum_ctx; - if (rte_eal_pci_scan() != 0) { - ctx->cb_arg = NULL; - ctx->cb_fn = NULL; - pthread_mutex_unlock(&ctx->mtx); - return -1; - } - if (rte_eal_pci_probe() != 0) { ctx->cb_arg = NULL; ctx->cb_fn = NULL; diff --git a/lib/nvme/nvme.c b/lib/nvme/nvme.c index 3f4d93f4a..09c28cb8c 100644 --- a/lib/nvme/nvme.c +++ b/lib/nvme/nvme.c @@ -429,15 +429,13 @@ _spdk_nvme_probe(const struct spdk_nvme_transport_id *trid, void *cb_ctx, if (hotplug_fd < 0) { SPDK_ERRLOG("Failed to open uevent netlink socket\n"); } - - nvme_transport_ctrlr_scan(trid, cb_ctx, probe_cb, remove_cb); } else { nvme_hotplug_monitor(cb_ctx, probe_cb, attach_cb, remove_cb); } - } else { - nvme_transport_ctrlr_scan(trid, cb_ctx, probe_cb, remove_cb); } + nvme_transport_ctrlr_scan(trid, cb_ctx, probe_cb, remove_cb); + if (!spdk_process_is_primary()) { TAILQ_FOREACH(ctrlr, &g_spdk_nvme_driver->attached_ctrlrs, tailq) { nvme_ctrlr_proc_get_ref(ctrlr);