path: root/drivers
diff options
authorMatan Azrad <>2019-11-12 08:47:38 +0000
committerDavid Marchand <>2019-11-21 00:18:02 +0100
commitfd03a747b0c77a82b33104cef9d317882734e1ee (patch)
treefc8f932da7a6276633373358bde39081dc46f2ee /drivers
parentd965af9e8ae164aec5912ebd767132ab56a58adb (diff)
bus/pci: clear driver on detach
When probing, a bus is responsible for filling the driver field to indicate the device is bound. Let's clear this field when detaching to keep a consistent behavior. This is not a fix per se, since the device is freed when detaching. But at least clearing the field has been added to remind that the driver field has a meaning for the EAL. Signed-off-by: Matan Azrad <> Acked-by: Thomas Monjalon <>
Diffstat (limited to 'drivers')
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c
index 6b46b4f..3f55420 100644
--- a/drivers/bus/pci/pci_common.c
+++ b/drivers/bus/pci/pci_common.c
@@ -247,6 +247,7 @@ rte_pci_detach_dev(struct rte_pci_device *dev)
/* clear driver structure */
dev->driver = NULL;
+ dev->device.driver = NULL;
if (dr->drv_flags & RTE_PCI_DRV_NEED_MAPPING)
/* unmap resources for devices that use igb_uio */