pci: rename RTE_PCI_DRV_NEED_IGB_UIO to RTE_PCI_DRV_NEED_MAPPING
[dpdk.git] / lib / librte_eal / linuxapp / eal / eal_pci.c
index a422e5f..c7cd38e 100644 (file)
@@ -99,7 +99,7 @@ error:
 
 /* map a particular resource from a file */
 void *
-pci_map_resource(void * requested_addr, int fd, off_t offset, size_t size)
+pci_map_resource(void *requested_addr, int fd, off_t offset, size_t size)
 {
        void *mapaddr;
 
@@ -401,6 +401,7 @@ int
 rte_eal_pci_probe_one_driver(struct rte_pci_driver *dr, struct rte_pci_device *dev)
 {
        struct rte_pci_id *id_table;
+       int ret = 0;
 
        for (id_table = dr->id_table ; id_table->vendor_id != 0; id_table++) {
 
@@ -431,13 +432,14 @@ rte_eal_pci_probe_one_driver(struct rte_pci_driver *dr, struct rte_pci_device *d
                if (dev->devargs != NULL &&
                        dev->devargs->type == RTE_DEVTYPE_BLACKLISTED_PCI) {
                        RTE_LOG(DEBUG, EAL, "  Device is blacklisted, not initializing\n");
-                       return 0;
+                       return 1;
                }
 
-               if (dr->drv_flags & RTE_PCI_DRV_NEED_IGB_UIO) {
+               if (dr->drv_flags & RTE_PCI_DRV_NEED_MAPPING) {
                        /* map resources for devices that use igb_uio */
-                       if (pci_uio_map_resource(dev) < 0)
-                               return -1;
+                       ret = pci_uio_map_resource(dev);
+                       if (ret != 0)
+                               return ret;
                } else if (dr->drv_flags & RTE_PCI_DRV_FORCE_UNBIND &&
                           rte_eal_process_type() == RTE_PROC_PRIMARY) {
                        /* unbind current driver */