[dpdk-dev] [PATCH] net/axgbe: fix PCI ID to distinguish v1000 vs e3000
Arsalan H. Awan
Arsalan_Awan at mentor.com
Wed Nov 10 12:45:19 CET 2021
The RV PCI Root Complex Device is not visible to DPDK on the PCI bus
via pci_search_device on some OSs including Ubuntu and Yocto. This
makes it impossible to determine which machine DPDK/axgbe is running
on. As a result, DPDK/axgbe does not work on v1000.
Let's use the Raven Internal PCIe GPP Bridge ID that DPDK can see on
the PCI bus that exists on the v1000 to differentiate between RV AXGBE
and SNOWY AXGBE, and set the registers accordingly. This fixes DPDK
not working on v1000 platform.
Signed-off-by: Arsalan H. Awan <Arsalan_Awan at mentor.com>
---
drivers/net/axgbe/axgbe_ethdev.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c
index 7d40c18a86..7b1b46990f 100644
--- a/drivers/net/axgbe/axgbe_ethdev.c
+++ b/drivers/net/axgbe/axgbe_ethdev.c
@@ -170,7 +170,7 @@ static const struct axgbe_xstats axgbe_xstats_strings[] = {
/* The set of PCI devices this driver supports */
#define AMD_PCI_VENDOR_ID 0x1022
-#define AMD_PCI_RV_ROOT_COMPLEX_ID 0x15d0
+#define AMD_PCI_RV_INTERNAL_PCIE_GPP_BRIDGE_ID 0x15db
#define AMD_PCI_AXGBE_DEVICE_V2A 0x1458
#define AMD_PCI_AXGBE_DEVICE_V2B 0x1459
@@ -2178,9 +2178,9 @@ eth_axgbe_dev_init(struct rte_eth_dev *eth_dev)
pdata->pci_dev = pci_dev;
/*
- * Use root complex device ID to differentiate RV AXGBE vs SNOWY AXGBE
+ * Use Raven Internal PCIe GPP Bridge device ID to differentiate RV AXGBE vs SNOWY AXGBE
*/
- if (pci_search_device(AMD_PCI_RV_ROOT_COMPLEX_ID)) {
+ if (pci_search_device(AMD_PCI_RV_INTERNAL_PCIE_GPP_BRIDGE_ID)) {
pdata->xpcs_window_def_reg = PCS_V2_RV_WINDOW_DEF;
pdata->xpcs_window_sel_reg = PCS_V2_RV_WINDOW_SELECT;
} else {
--
2.17.1
More information about the dev
mailing list