nvme/pcie: return 1 when PCI address doesn't match
If the user asked for a specific PCI address in spdk_nvme_probe(), we need to return 1, not 0, for the other PCI addresses that don't match when enumerating. 0 means to attach the PCI driver, whereas 1 means to continue enumerating. With the previous behavior of returning 0, all NVMe devices would be attached to the DPDK PCI driver, even if the user did not request for them to be probed, and further calls to spdk_nvme_probe() would not find any devices. Change-Id: Ifbbcd7d1abe8ab535b6957855172e66a3e69fbe4 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
df33e630aa
commit
d63a30e39d
@ -621,7 +621,7 @@ pcie_nvme_enum_cb(void *ctx, struct spdk_pci_device *pci_dev)
|
||||
/* check whether user passes the pci_addr */
|
||||
if (enum_ctx->has_pci_addr &&
|
||||
(spdk_pci_addr_compare(&pci_addr, &enum_ctx->pci_addr) != 0)) {
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return nvme_ctrlr_probe(&trid, pci_dev,
|
||||
|
Loading…
x
Reference in New Issue
Block a user