From fd03a747b0c77a82b33104cef9d317882734e1ee Mon Sep 17 00:00:00 2001 From: Matan Azrad Date: Tue, 12 Nov 2019 08:47:38 +0000 Subject: [PATCH] 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 --- drivers/bus/pci/pci_common.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c index 6b46b4f070..3f55420769 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 */ -- 2.20.1