{
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;
}
struct rte_pci_id id; /**< PCI ID. */
struct rte_pci_resource mem_resource; /**< PCI Memory Resource */
struct rte_intr_handle intr_handle; /**< Interrupt handle */
+ const struct rte_pci_driver *driver; /**< Associated driver */
+ unsigned int blacklisted:1; /**< Device is blacklisted */
};
/** Any PCI device identifier (vendor, device, ...) */
dev->id.vendor_id, dev->id.device_id, dr->name);
/* Unbind PCI devices if needed */
- if (module_name != NULL) {
+ if ((!dev->blacklisted) &&
+ (module_name != NULL)) {
if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
/* unbind current driver, bind ours */
if (pci_unbind_kernel_driver(dev) < 0)
if (pci_uio_map_resource(dev) < 0)
return -1;
}
+
+ /* reference driver structure */
+ dev->driver = dr;
+
+ /* no initialization when blacklisted */
+ if (dev->blacklisted)
+ return -1;
+
/* call the driver devinit() function */
return dr->devinit(dr, dev);