From: Matan Azrad Date: Tue, 12 Nov 2019 08:47:38 +0000 (+0000) Subject: bus/pci: clear driver on detach X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=fd03a747b0c77a82b33104cef9d317882734e1ee;p=dpdk.git 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 --- 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 */