ethdev: minor changes
[dpdk.git] / lib / librte_eal / common / eal_common_pci.c
index 02ea211..a368799 100644 (file)
 
 #include <inttypes.h>
 #include <stdint.h>
+#include <stdlib.h>
 #include <stdio.h>
 #include <sys/queue.h>
 
 #include <rte_interrupts.h>
+#include <rte_log.h>
 #include <rte_pci.h>
 #include <rte_per_lcore.h>
 #include <rte_memory.h>
@@ -80,9 +82,8 @@ pci_probe_all_drivers(struct rte_pci_device *dev)
 {
        struct rte_pci_driver *dr = NULL;
 
+       dev->blacklisted = !!is_blacklisted(dev);
        TAILQ_FOREACH(dr, &driver_list, next) {
-               if (is_blacklisted(dev))
-                       return -1;
                if (rte_eal_pci_probe_one_driver(dr, dev) == 0)
                        return 0;
        }
@@ -101,7 +102,10 @@ rte_eal_pci_probe(void)
 
        TAILQ_FOREACH(dev, &device_list, next)
                pci_probe_all_drivers(dev);
-
+       #ifdef RTE_EAL_UNBIND_PORTS
+               if (atexit(rte_eal_pci_exit) != 0)
+                       RTE_LOG(ERR, EAL, "atexit failure\n");
+       #endif
        return 0;
 }