DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jiaqi Min <jiaqix.min@intel.com>
To: dev@dpdk.org
Cc: Jiaqi Min <jiaqix.min@intel.com>,
	Zalfresso-Jundzillo <marekx.zalfresso-jundzillo@intel.com>
Subject: [dpdk-dev] [PATCH v2 2/4] net/i40e/base: new device ID introduced for V710-TL 5G
Date: Wed,  8 Apr 2020 10:05:21 +0000	[thread overview]
Message-ID: <20200408100523.67792-3-jiaqix.min@intel.com> (raw)
In-Reply-To: <20200408100523.67792-1-jiaqix.min@intel.com>

This change is adding new device ID and handling it in the same
way as X710-T*L head of family. A new device ID is for new V710-T*L adapter
supporting speeds up to 5G.

Signed-off-by: Zalfresso-Jundzillo <marekx.zalfresso-jundzillo@intel.com>
Signed-off-by: Jiaqi Min <jiaqix.min@intel.com>
---
 drivers/net/i40e/base/i40e_common.c | 12 +++++++++---
 drivers/net/i40e/base/i40e_devids.h |  4 +++-
 drivers/net/i40e/i40e_ethdev.c      |  1 +
 3 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 84e67f285..4e06f2d23 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -34,6 +34,7 @@ enum i40e_status_code i40e_set_mac_type(struct i40e_hw *hw)
 		case I40E_DEV_ID_10G_BASE_T_BC:
 		case I40E_DEV_ID_10G_B:
 		case I40E_DEV_ID_10G_SFP:
+		case I40E_DEV_ID_5G_BASE_T_BC:
 		case I40E_DEV_ID_20G_KR2:
 		case I40E_DEV_ID_20G_KR2_A:
 		case I40E_DEV_ID_25G_B:
@@ -6728,6 +6729,7 @@ enum i40e_status_code i40e_write_phy_register(struct i40e_hw *hw,
 	case I40E_DEV_ID_10G_BASE_T:
 	case I40E_DEV_ID_10G_BASE_T4:
 	case I40E_DEV_ID_10G_BASE_T_BC:
+	case I40E_DEV_ID_5G_BASE_T_BC:
 	case I40E_DEV_ID_10G_BASE_T_X722:
 	case I40E_DEV_ID_25G_B:
 	case I40E_DEV_ID_25G_SFP28:
@@ -6764,6 +6766,7 @@ enum i40e_status_code i40e_read_phy_register(struct i40e_hw *hw,
 		break;
 	case I40E_DEV_ID_10G_BASE_T:
 	case I40E_DEV_ID_10G_BASE_T4:
+	case I40E_DEV_ID_5G_BASE_T_BC:
 	case I40E_DEV_ID_10G_BASE_T_X722:
 	case I40E_DEV_ID_25G_B:
 	case I40E_DEV_ID_25G_SFP28:
@@ -7036,7 +7039,8 @@ enum i40e_status_code i40e_get_phy_lpi_status(struct i40e_hw *hw,
 	stat->rx_lpi_status = 0;
 	stat->tx_lpi_status = 0;
 
-	if (hw->device_id == I40E_DEV_ID_10G_BASE_T_BC &&
+	if ((hw->device_id == I40E_DEV_ID_10G_BASE_T_BC ||
+	     hw->device_id == I40E_DEV_ID_5G_BASE_T_BC) &&
 	    (hw->phy.link_info.link_speed == I40E_LINK_SPEED_2_5GB ||
 	     hw->phy.link_info.link_speed == I40E_LINK_SPEED_5GB)) {
 		ret = i40e_aq_get_phy_register(hw,
@@ -7081,7 +7085,8 @@ enum i40e_status_code i40e_get_lpi_counters(struct i40e_hw *hw,
 	/* only X710-T*L requires special handling of counters
 	 * for other devices we just read the MAC registers
 	 */
-	if (hw->device_id == I40E_DEV_ID_10G_BASE_T_BC &&
+	if ((hw->device_id == I40E_DEV_ID_10G_BASE_T_BC ||
+	     hw->device_id == I40E_DEV_ID_5G_BASE_T_BC) &&
 	    hw->phy.link_info.link_speed != I40E_LINK_SPEED_1GB) {
 		enum i40e_status_code retval;
 		u32 cmd_status = 0;
@@ -7123,7 +7128,8 @@ enum i40e_status_code i40e_get_lpi_duration(struct i40e_hw *hw,
 	enum i40e_status_code retval;
 	u32 cmd_status;
 
-	if (hw->device_id != I40E_DEV_ID_10G_BASE_T_BC)
+	if (hw->device_id != I40E_DEV_ID_10G_BASE_T_BC &&
+	    hw->device_id != I40E_DEV_ID_5G_BASE_T_BC)
 		return I40E_ERR_NOT_IMPLEMENTED;
 
 	retval = i40e_aq_run_phy_activity
diff --git a/drivers/net/i40e/base/i40e_devids.h b/drivers/net/i40e/base/i40e_devids.h
index 5897d38f6..b87e1bcb4 100644
--- a/drivers/net/i40e/base/i40e_devids.h
+++ b/drivers/net/i40e/base/i40e_devids.h
@@ -25,6 +25,7 @@
 #define I40E_DEV_ID_X710_N3000      0x0CF8
 #define I40E_DEV_ID_XXV710_N3000	0x0D58
 #define I40E_DEV_ID_10G_BASE_T_BC	0x15FF
+#define I40E_DEV_ID_5G_BASE_T_BC	0x101F
 #if defined(INTEGRATED_VF) || defined(VF_DRIVER) || defined(I40E_NDIS_SUPPORT)
 #define I40E_DEV_ID_VF			0x154C
 #define I40E_DEV_ID_VF_HV		0x1571
@@ -39,7 +40,8 @@
 #define I40E_DEV_ID_10G_B		0x104F
 #define I40E_DEV_ID_10G_SFP		0x104E
 #define I40E_IS_X710TL_DEVICE(d) \
-	((d) == I40E_DEV_ID_10G_BASE_T_BC)
+	(((d) == I40E_DEV_ID_10G_BASE_T_BC) || \
+	((d) == I40E_DEV_ID_5G_BASE_T_BC))
 #define I40E_DEV_ID_KX_X722		0x37CE
 #define I40E_DEV_ID_QSFP_X722		0x37CF
 #define I40E_DEV_ID_SFP_X722		0x37D0
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 530908b0e..60de68fd8 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -443,6 +443,7 @@ static const struct rte_pci_id pci_id_i40e_map[] = {
 	{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_X710_N3000) },
 	{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_XXV710_N3000) },
 	{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_10G_BASE_T_BC) },
+	{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_5G_BASE_T_BC) },
 	{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_10G_B) },
 	{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_10G_SFP) },
 	{ .vendor_id = 0, /* sentinel */ },
-- 
2.17.1


  parent reply	other threads:[~2020-04-08 10:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-25  3:23 [dpdk-dev] [PATCH 0/3] update i40e base code Jiaqi Min
2020-03-25  3:23 ` [dpdk-dev] [PATCH 1/3] net/i40e/base: update X722/X710 FW API version to 1.10 Jiaqi Min
2020-03-25  3:23 ` [dpdk-dev] [PATCH 2/3] net/i40e/base: new device ID introduced for V710-TL 5G Jiaqi Min
2020-03-25  3:23 ` [dpdk-dev] [PATCH 3/3] net/i40e/base: add constants for PTP pins Jiaqi Min
2020-03-25 10:03   ` Kwapulinski, Piotr
2020-04-08  7:33 ` [dpdk-dev] [PATCH 0/3] update i40e base code Xing, Beilei
2020-04-08 10:05 ` [dpdk-dev] [PATCH v2 0/4] " Jiaqi Min
2020-04-08 10:05   ` [dpdk-dev] [PATCH v2 1/4] net/i40e/base: update X722/X710 FW API version to 1.10 Jiaqi Min
2020-04-08 10:05   ` Jiaqi Min [this message]
2020-04-08 10:05   ` [dpdk-dev] [PATCH v2 3/4] net/i40e/base: add constants for PTP pins Jiaqi Min
2020-04-08 10:22     ` Kwapulinski, Piotr
2020-04-08 10:05   ` [dpdk-dev] [PATCH v2 4/4] net/i40e/base: update version Jiaqi Min
2020-04-09  5:18   ` [dpdk-dev] [PATCH v2 0/4] update i40e base code Xing, Beilei
2020-04-09  5:24   ` Ye Xiaolong

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=20200408100523.67792-3-jiaqix.min@intel.com \
    --to=jiaqix.min@intel.com \
    --cc=dev@dpdk.org \
    --cc=marekx.zalfresso-jundzillo@intel.com \
    /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).