aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/dpdk/recipes-extended/dpdk/files/0001-axgbe_ethdev.c-use-RV-AXGBE-as-pci_search_device-doe.patch
blob: 16460072e6becda48c6812e02f314dccfa2c6204 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
From f5def6aa0d45b545f77e47bade5ff79e17a1a4ff Mon Sep 17 00:00:00 2001
From: "Arsalan H. Awan" <Arsalan_Awan@mentor.com>
Date: Wed, 4 Aug 2021 14:29:45 +0500
Subject: [PATCH] axgbe_ethdev.c: use RV AXGBE as pci_search_device doesnt work
 well

As Yocto is a custom OS, and pci_search_device doesnt work well on
custom OS, as a temporary solution, we remove the pci_search_device
and SNOWY AXGBE, and hardcode it with RV AXGBE for V1000.

Signed-off-by: Arsalan H. Awan <Arsalan_Awan@mentor.com>
---
 drivers/net/axgbe/axgbe_ethdev.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c
index 9cd056d04a..081f4fe2d3 100644
--- a/drivers/net/axgbe/axgbe_ethdev.c
+++ b/drivers/net/axgbe/axgbe_ethdev.c
@@ -1984,15 +1984,10 @@ 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
+	 * Patch for RV AXGBE. This does not work for SNOWY AXGBE
 	 */
-	if (pci_search_device(AMD_PCI_RV_ROOT_COMPLEX_ID)) {
-		pdata->xpcs_window_def_reg = PCS_V2_RV_WINDOW_DEF;
-		pdata->xpcs_window_sel_reg = PCS_V2_RV_WINDOW_SELECT;
-	} else {
-		pdata->xpcs_window_def_reg = PCS_V2_WINDOW_DEF;
-		pdata->xpcs_window_sel_reg = PCS_V2_WINDOW_SELECT;
-	}
+	pdata->xpcs_window_def_reg = PCS_V2_RV_WINDOW_DEF;
+	pdata->xpcs_window_sel_reg = PCS_V2_RV_WINDOW_SELECT;
 
 	pdata->xgmac_regs =
 		(void *)pci_dev->mem_resource[AXGBE_AXGMAC_BAR].addr;
-- 
2.25.1