Signed-off-by: Jan Blunck <jblu...@infradead.org> --- drivers/net/virtio/virtio_pci.c | 3 +-- lib/librte_eal/common/eal_common_pci.c | 9 +++++---- 2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/net/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c index e6eda75b6..dfc6edac2 100644 --- a/drivers/net/virtio/virtio_pci.c +++ b/drivers/net/virtio/virtio_pci.c @@ -685,8 +685,7 @@ vtpci_init(struct rte_pci_device *dev, struct virtio_hw *hw) if (rte_pci_ioport_map(dev, 0, VTPCI_IO(hw)) < 0) { if (dev->kdrv == RTE_KDRV_UNKNOWN && (!dev->device.devargs || - dev->device.devargs->bus != - rte_bus_find_by_name("pci"))) { + strcmp("pci", dev->device.devargs->busname) != 0)) { PMD_INIT_LOG(INFO, "skip kernel managed virtio device."); return 1; diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c index fb0e29ac4..834db50de 100644 --- a/lib/librte_eal/common/eal_common_pci.c +++ b/lib/librte_eal/common/eal_common_pci.c @@ -71,17 +71,18 @@ const char *pci_get_sysfs_path(void) return path; } +static int pci_parse(const char *name, void *addr); + static struct rte_devargs *pci_devargs_lookup(struct rte_pci_device *dev) { struct rte_devargs *devargs; struct rte_pci_addr addr; - struct rte_bus *pbus; - pbus = rte_bus_find_by_name("pci"); TAILQ_FOREACH(devargs, &devargs_list, next) { - if (devargs->bus != pbus) + if (strcmp(devargs->busname, rte_pci_bus.bus.name) != 0) + continue; + if (pci_parse(devargs->name, &addr) != 0) continue; - devargs->bus->parse(devargs->name, &addr); if (!rte_eal_compare_pci_addr(&dev->addr, &addr)) return devargs; } -- 2.13.2