DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Arsalan H. Awan" <Arsalan_Awan@mentor.com>
To: <dev@dpdk.org>
Cc: <chandu@amd.com>, <Amaranath.Somalapuram@amd.com>,
	<Selwin.Sebastian@amd.com>, <Maheshwaramurthy.Giriyapura@amd.com>,
	"Arsalan H. Awan" <Arsalan_Awan@mentor.com>
Subject: [dpdk-dev] [PATCH] net/axgbe: fix PCI ID to distinguish v1000 vs e3000
Date: Wed, 10 Nov 2021 16:45:19 +0500	[thread overview]
Message-ID: <20211110114519.8216-1-Arsalan_Awan@mentor.com> (raw)

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@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


             reply	other threads:[~2021-11-10 11:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-10 11:45 Arsalan H. Awan [this message]
2021-11-12 14:48 ` Namburu, Chandu-babu
2021-11-15 10:15   ` Awan, Arsalan
2021-11-25  8:11     ` Awan, Arsalan
2021-11-25  8:23       ` Namburu, Chandu-babu
2021-11-25  9:06         ` Awan, Arsalan
2021-11-26 10:35           ` Namburu, Chandu-babu
2021-12-01  8:48             ` Awan, Arsalan
2021-12-02  5:52               ` Namburu, Chandu-babu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211110114519.8216-1-Arsalan_Awan@mentor.com \
    --to=arsalan_awan@mentor.com \
    --cc=Amaranath.Somalapuram@amd.com \
    --cc=Maheshwaramurthy.Giriyapura@amd.com \
    --cc=Selwin.Sebastian@amd.com \
    --cc=chandu@amd.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).