From: David Marchand Date: Tue, 15 Mar 2016 06:29:13 +0000 (+0100) Subject: pci: fix ioport support for uio_pci_generic on x86 X-Git-Tag: spdx-start~7256 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=2b29a7a4c1a440a1b4929e52ed6085512e37eadf;p=dpdk.git pci: fix ioport support for uio_pci_generic on x86 uio_pci_generic does not offer the same sysfs helpers as igb_uio. In this case, ioport number can only be retrieved by parsing /proc/ioports. Fixes: 756ce64b1ecd ("eal: introduce PCI ioport API") Reported-by: Mauricio Vasquez B Signed-off-by: David Marchand --- diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c index 74c6919289..dbf12a8406 100644 --- a/lib/librte_eal/linuxapp/eal/eal_pci.c +++ b/lib/librte_eal/linuxapp/eal/eal_pci.c @@ -620,7 +620,11 @@ rte_eal_pci_ioport_map(struct rte_pci_device *dev, int bar, ret = pci_uio_ioport_map(dev, bar, p); break; case RTE_KDRV_UIO_GENERIC: +#if defined(RTE_ARCH_X86) + ret = pci_ioport_map(dev, bar, p); +#else ret = pci_uio_ioport_map(dev, bar, p); +#endif break; case RTE_KDRV_NONE: #if defined(RTE_ARCH_X86) @@ -705,7 +709,11 @@ rte_eal_pci_ioport_unmap(struct rte_pci_ioport *p) ret = pci_uio_ioport_unmap(p); break; case RTE_KDRV_UIO_GENERIC: +#if defined(RTE_ARCH_X86) + ret = 0; +#else ret = pci_uio_ioport_unmap(p); +#endif break; case RTE_KDRV_NONE: #if defined(RTE_ARCH_X86)