[dpdk-dev] [PATCH 6/9] pci: fix generic driver pointer on probe error
Gaetan Rivet
gaetan.rivet at 6wind.com
Sun Jul 9 03:45:42 CEST 2017
The field is set but never resetted on error.
This marks the device as being attached while it is not, and forbid
further attempts to hotplug it.
Fixes: 7917d5f5ea46 ("pci: initialize generic driver pointer")
Cc: stable at dpdk.org
Signed-off-by: Gaetan Rivet <gaetan.rivet at 6wind.com>
---
lib/librte_eal/common/eal_common_pci.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c
index b100525..9cc4148 100644
--- a/lib/librte_eal/common/eal_common_pci.c
+++ b/lib/librte_eal/common/eal_common_pci.c
@@ -237,6 +237,7 @@ rte_pci_probe_one_driver(struct rte_pci_driver *dr,
ret = dr->probe(dr, dev);
if (ret) {
dev->driver = NULL;
+ dev->device.driver = NULL;
if ((dr->drv_flags & RTE_PCI_DRV_NEED_MAPPING) &&
/* Don't unmap if device is unsupported and
* driver needs mapped resources.
--
2.1.4
More information about the dev
mailing list