[10/19] net/txgbe: fix hotplug remove

Message ID 20240618071150.21564-11-jiawenwu@trustnetic.com (mailing list archive)
State Accepted
Delegated to: Ferruh Yigit
Headers
Series Wangxun fixes and supports |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Jiawen Wu June 18, 2024, 7:11 a.m. UTC
  This bug occurs in OpenvSwitch. After adding a port bound to vfio-pci
to ovs, detach it from ovs and then unbind it from vfio-pci(that is
hotplug) will cause operating system to get stuck.

Fixes: 7dc117068a7c ("net/txgbe: support probe and remove")
Cc: stable@dpdk.org

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/txgbe_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index 699ff1c920..20fa0a5b05 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -964,7 +964,7 @@  static int eth_txgbe_pci_remove(struct rte_pci_device *pci_dev)
 	if (!ethdev)
 		return 0;
 
-	return rte_eth_dev_destroy(ethdev, eth_txgbe_dev_uninit);
+	return rte_eth_dev_pci_generic_remove(pci_dev, eth_txgbe_dev_uninit);
 }
 
 static struct rte_pci_driver rte_txgbe_pmd = {