nvme: After detach, force the device back into DPDK's internal list
Change-Id: I0d745034d8319bc864d91e891b7c9bd0f7c25b6d Signed-off-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
34f052d298
commit
5502004d67
@ -76,10 +76,22 @@ spdk_pci_device_fini(struct rte_pci_device *device)
|
||||
void
|
||||
spdk_pci_device_detach(struct spdk_pci_device *device)
|
||||
{
|
||||
struct rte_pci_addr addr;
|
||||
|
||||
addr.domain = device->addr.domain;
|
||||
addr.bus = device->addr.bus;
|
||||
addr.devid = device->addr.devid;
|
||||
addr.function = device->addr.function;
|
||||
|
||||
#if RTE_VERSION >= RTE_VERSION_NUM(16, 11, 0, 0)
|
||||
rte_eal_device_remove(&device->device);
|
||||
#endif
|
||||
rte_eal_pci_detach(&device->addr);
|
||||
rte_eal_pci_detach(&addr);
|
||||
/* This will not actually load any drivers because our
|
||||
* callback isn't set, but it will re-add the device
|
||||
* to DPDK's internal list.
|
||||
*/
|
||||
rte_eal_pci_probe_one(&addr);
|
||||
}
|
||||
|
||||
int
|
||||
|
Loading…
Reference in New Issue
Block a user