diff mbox series

[v2,11/14] net/i40e/base: 10GBASE-ER Optical modules recognition

Message ID 20210621063708.4014937-12-robinx.zhang@intel.com (mailing list archive)
State Superseded
Headers show
Series i40e base code update | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Robin Zhang June 21, 2021, 6:37 a.m. UTC
This change adds a new PHY type for 10GBASE-ER modules.

Signed-off-by: Stanislaw Grzeszczak <stanislaw.a.grzeszczak@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_adminq_cmd.h | 2 ++
 drivers/net/i40e/base/i40e_common.c     | 1 +
 drivers/net/i40e/base/i40e_type.h       | 1 +
 3 files changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h
index 646cfd0398..c41dc71cdf 100644
--- a/drivers/net/i40e/base/i40e_adminq_cmd.h
+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
@@ -1945,6 +1945,7 @@  enum i40e_aq_phy_type {
 	I40E_PHY_TYPE_40GBASE_AOC		= 0xD,
 	I40E_PHY_TYPE_UNRECOGNIZED		= 0xE,
 	I40E_PHY_TYPE_UNSUPPORTED		= 0xF,
+	I40E_PHY_TYPE_10GBASE_ER		= 0x10,
 	I40E_PHY_TYPE_100BASE_TX		= 0x11,
 	I40E_PHY_TYPE_1000BASE_T		= 0x12,
 	I40E_PHY_TYPE_10GBASE_T			= 0x13,
@@ -1991,6 +1992,7 @@  enum i40e_aq_phy_type {
 				BIT_ULL(I40E_PHY_TYPE_40GBASE_AOC) | \
 				BIT_ULL(I40E_PHY_TYPE_UNRECOGNIZED) | \
 				BIT_ULL(I40E_PHY_TYPE_UNSUPPORTED) | \
+				BIT_ULL(I40E_PHY_TYPE_10GBASE_ER) | \
 				BIT_ULL(I40E_PHY_TYPE_100BASE_TX) | \
 				BIT_ULL(I40E_PHY_TYPE_1000BASE_T) | \
 				BIT_ULL(I40E_PHY_TYPE_10GBASE_T) | \
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 2ca6a13e79..e077bf8fd3 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1268,6 +1268,7 @@  STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw)
 	enum i40e_media_type media;
 
 	switch (hw->phy.link_info.phy_type) {
+	case I40E_PHY_TYPE_10GBASE_ER:
 	case I40E_PHY_TYPE_10GBASE_SR:
 	case I40E_PHY_TYPE_10GBASE_LR:
 	case I40E_PHY_TYPE_1000BASE_SX:
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index 0323887550..86b9eeeb43 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -294,6 +294,7 @@  struct i40e_phy_info {
 #define I40E_CAP_PHY_TYPE_10GBASE_CR1_CU BIT_ULL(I40E_PHY_TYPE_10GBASE_CR1_CU)
 #define I40E_CAP_PHY_TYPE_10GBASE_AOC BIT_ULL(I40E_PHY_TYPE_10GBASE_AOC)
 #define I40E_CAP_PHY_TYPE_40GBASE_AOC BIT_ULL(I40E_PHY_TYPE_40GBASE_AOC)
+#define I40E_CAP_PHY_TYPE_10GBASE_ER BIT_ULL(I40E_PHY_TYPE_10GBASE_ER)
 #define I40E_CAP_PHY_TYPE_100BASE_TX BIT_ULL(I40E_PHY_TYPE_100BASE_TX)
 #define I40E_CAP_PHY_TYPE_1000BASE_T BIT_ULL(I40E_PHY_TYPE_1000BASE_T)
 #define I40E_CAP_PHY_TYPE_10GBASE_T BIT_ULL(I40E_PHY_TYPE_10GBASE_T)