X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fbus%2Fpci%2Fpci_common.c;h=d8151b091169fb7dd2e4a286b9c43550475e5199;hb=ce5e6bf69eb32d5ea1d95e2a623f8f9d284a806d;hp=8127f581662c3da40ac584bd2bcbb15e2495d2e3;hpb=f3bac43b60da6ae78cbef50ecded8be1df62c472;p=dpdk.git diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c index 8127f58166..d8151b0911 100644 --- a/drivers/bus/pci/pci_common.c +++ b/drivers/bus/pci/pci_common.c @@ -257,43 +257,6 @@ pci_probe_all_drivers(struct rte_pci_device *dev) return 1; } -/* - * Detach device specified by its pci address. - */ -int -rte_pci_detach(const struct rte_pci_addr *addr) -{ - struct rte_pci_device *dev = NULL; - int ret = 0; - - if (addr == NULL) - return -1; - - FOREACH_DEVICE_ON_PCIBUS(dev) { - if (rte_pci_addr_cmp(&dev->addr, addr)) - continue; - - ret = rte_pci_detach_dev(dev); - if (ret < 0) - /* negative value is an error */ - goto err_return; - if (ret > 0) - /* positive value means driver doesn't support it */ - continue; - - rte_pci_remove_device(dev); - free(dev); - return 0; - } - return -1; - -err_return: - RTE_LOG(WARNING, EAL, "Requested device " PCI_PRI_FMT - " cannot be used\n", dev->addr.domain, dev->addr.bus, - dev->addr.devid, dev->addr.function); - return -1; -} - /* * Scan the content of the PCI bus, and call the probe() function for * all registered drivers that have a matching entry in its id_table