From: Robin Zhang <robinx.zhang@intel.com>
To: dev@dpdk.org
Cc: beilei.xing@intel.com, qi.z.zhang@intel.com,
helin.zhang@intel.com, jingjing.wu@intel.com,
remy.horton@intel.com, jijiang.liu@intel.com,
jing.d.chen@intel.com, cunming.liang@intel.com,
wenzhuo.lu@intel.com, junfeng.guo@intel.com,
stevex.yang@intel.com, Robin Zhang <robinx.zhang@intel.com>,
stable@dpdk.org, Dawid Lukwinski <dawid.lukwinski@intel.com>
Subject: [dpdk-stable] [PATCH v6 05/17] net/i40e/base: fix PHY identifiers for 2.5G and 5G adapters
Date: Sat, 9 Oct 2021 01:39:44 +0000 [thread overview]
Message-ID: <20211009013956.70937-6-robinx.zhang@intel.com> (raw)
In-Reply-To: <20211009013956.70937-1-robinx.zhang@intel.com>
Unlike other supported adapters, 2.5G and 5G use different PHY type
identifiers for reading/writing PHY settings and for reading link status.
This commit introduces separate PHY identifiers for these two operation
types.
Fixes: 988ed63c7441 ("net/i40e/base: add support for Carlsville device")
Cc: stable@dpdk.org
Signed-off-by: Dawid Lukwinski <dawid.lukwinski@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
drivers/net/i40e/base/i40e_adminq_cmd.h | 6 ++++--
drivers/net/i40e/base/i40e_common.c | 4 ++--
drivers/net/i40e/base/i40e_type.h | 8 ++------
3 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h
index a96527f31c..af9dec1d7f 100644
--- a/drivers/net/i40e/base/i40e_adminq_cmd.h
+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
@@ -1947,8 +1947,10 @@ enum i40e_aq_phy_type {
I40E_PHY_TYPE_25GBASE_LR = 0x22,
I40E_PHY_TYPE_25GBASE_AOC = 0x23,
I40E_PHY_TYPE_25GBASE_ACC = 0x24,
- I40E_PHY_TYPE_2_5GBASE_T = 0x30,
- I40E_PHY_TYPE_5GBASE_T = 0x31,
+ I40E_PHY_TYPE_2_5GBASE_T = 0x26,
+ I40E_PHY_TYPE_5GBASE_T = 0x27,
+ I40E_PHY_TYPE_2_5GBASE_T_LINK_STATUS = 0x30,
+ I40E_PHY_TYPE_5GBASE_T_LINK_STATUS = 0x31,
I40E_PHY_TYPE_MAX,
I40E_PHY_TYPE_NOT_SUPPORTED_HIGH_TEMP = 0xFD,
I40E_PHY_TYPE_EMPTY = 0xFE,
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 32642f3e2b..ceedec68bf 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1280,8 +1280,8 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw)
break;
case I40E_PHY_TYPE_100BASE_TX:
case I40E_PHY_TYPE_1000BASE_T:
- case I40E_PHY_TYPE_2_5GBASE_T:
- case I40E_PHY_TYPE_5GBASE_T:
+ case I40E_PHY_TYPE_2_5GBASE_T_LINK_STATUS:
+ case I40E_PHY_TYPE_5GBASE_T_LINK_STATUS:
case I40E_PHY_TYPE_10GBASE_T:
media = I40E_MEDIA_TYPE_BASET;
break;
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index e5a3729183..0323887550 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -329,12 +329,8 @@ struct i40e_phy_info {
I40E_PHY_TYPE_OFFSET)
#define I40E_CAP_PHY_TYPE_25GBASE_ACC BIT_ULL(I40E_PHY_TYPE_25GBASE_ACC + \
I40E_PHY_TYPE_OFFSET)
-/* Offset for 2.5G/5G PHY Types value to bit number conversion */
-#define I40E_PHY_TYPE_OFFSET2 (-10)
-#define I40E_CAP_PHY_TYPE_2_5GBASE_T BIT_ULL(I40E_PHY_TYPE_2_5GBASE_T + \
- I40E_PHY_TYPE_OFFSET2)
-#define I40E_CAP_PHY_TYPE_5GBASE_T BIT_ULL(I40E_PHY_TYPE_5GBASE_T + \
- I40E_PHY_TYPE_OFFSET2)
+#define I40E_CAP_PHY_TYPE_2_5GBASE_T BIT_ULL(I40E_PHY_TYPE_2_5GBASE_T)
+#define I40E_CAP_PHY_TYPE_5GBASE_T BIT_ULL(I40E_PHY_TYPE_5GBASE_T)
#define I40E_HW_CAP_MAX_GPIO 30
#define I40E_HW_CAP_MDIO_PORT_MODE_MDIO 0
#define I40E_HW_CAP_MDIO_PORT_MODE_I2C 1
--
2.25.1
next prev parent reply other threads:[~2021-10-09 1:54 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20210618063851.3694702-1-robinx.zhang@intel.com>
2021-06-18 6:38 ` [dpdk-stable] [PATCH 06/14] net/i40e/base: fix PHY type " Robin Zhang
2021-06-18 6:38 ` [dpdk-stable] [PATCH 07/14] net/i40e/base: fix PF reset failed Robin Zhang
2021-06-18 6:38 ` [dpdk-stable] [PATCH 08/14] net/i40e/base: fix update link data for X722 Robin Zhang
2021-06-18 6:38 ` [dpdk-stable] [PATCH 09/14] net/i40e/base: fix AOC media type reported by ethtool Robin Zhang
2021-06-18 6:38 ` [dpdk-stable] [PATCH 12/14] net/i40e/base: fix headers to match functions Robin Zhang
2021-06-18 6:38 ` [dpdk-stable] [PATCH 13/14] net/i40e/base: fix potentially uninitialized variables in NVM code Robin Zhang
2021-06-21 6:52 ` Xing, Beilei
[not found] ` <20210621063708.4014937-1-robinx.zhang@intel.com>
2021-06-21 6:37 ` [dpdk-stable] [PATCH v2 06/14] net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters Robin Zhang
2021-06-21 6:37 ` [dpdk-stable] [PATCH v2 07/14] net/i40e/base: fix PF reset failed Robin Zhang
2021-06-21 6:37 ` [dpdk-stable] [PATCH v2 08/14] net/i40e/base: fix update link data for X722 Robin Zhang
2021-06-21 6:37 ` [dpdk-stable] [PATCH v2 09/14] net/i40e/base: fix AOC media type reported by ethtool Robin Zhang
2021-06-21 6:37 ` [dpdk-stable] [PATCH v2 12/14] net/i40e/base: fix headers to match functions Robin Zhang
2021-06-21 6:37 ` [dpdk-stable] [PATCH v2 13/14] net/i40e/base: fix potentially uninitialized variables in NVM code Robin Zhang
[not found] ` <20210621075206.4020456-1-robinx.zhang@intel.com>
2021-06-21 7:51 ` [dpdk-stable] [PATCH v3 06/15] net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters Robin Zhang
2021-06-21 7:51 ` [dpdk-stable] [PATCH v3 07/15] net/i40e/base: fix PF reset failed Robin Zhang
2021-06-21 7:51 ` [dpdk-stable] [PATCH v3 08/15] net/i40e/base: fix update link data for X722 Robin Zhang
2021-06-21 7:52 ` [dpdk-stable] [PATCH v3 09/15] net/i40e/base: fix AOC media type reported by ethtool Robin Zhang
2021-06-21 7:52 ` [dpdk-stable] [PATCH v3 12/15] net/i40e/base: fix headers to match functions Robin Zhang
2021-06-21 7:52 ` [dpdk-stable] [PATCH v3 13/15] net/i40e/base: fix potentially uninitialized variables in NVM code Robin Zhang
2021-06-21 7:52 ` [dpdk-stable] [PATCH v3 14/15] net/i40e/base: fix checksum is used before return value is checked Robin Zhang
[not found] ` <20210906020258.1291688-1-robinx.zhang@intel.com>
2021-09-06 2:02 ` [dpdk-stable] [PATCH v4 05/18] net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters Robin Zhang
2021-09-29 16:21 ` Ferruh Yigit
2021-09-06 2:02 ` [dpdk-stable] [PATCH v4 06/18] net/i40e/base: fix PF reset failed Robin Zhang
2021-09-29 16:21 ` Ferruh Yigit
2021-09-06 2:02 ` [dpdk-stable] [PATCH v4 07/18] net/i40e/base: fix update link data for X722 Robin Zhang
2021-09-06 2:02 ` [dpdk-stable] [PATCH v4 08/18] net/i40e/base: fix AOC media type reported by ethtool Robin Zhang
2021-09-29 16:21 ` [dpdk-stable] [dpdk-dev] " Ferruh Yigit
2021-09-06 2:02 ` [dpdk-stable] [PATCH v4 10/18] net/i40e/base: fix headers to match functions Robin Zhang
2021-09-29 15:59 ` [dpdk-stable] [dpdk-dev] " Ferruh Yigit
2021-09-06 2:02 ` [dpdk-stable] [PATCH v4 11/18] net/i40e/base: fix potentially uninitialized variables in NVM code Robin Zhang
2021-09-06 2:02 ` [dpdk-stable] [PATCH v4 12/18] net/i40e/base: fix checksum is used before return value is checked Robin Zhang
[not found] ` <20211009012648.64838-1-robinx.zhang@intel.com>
2021-10-09 1:26 ` [dpdk-stable] [PATCH v5 05/17] net/i40e/base: fix PHY identifiers for 2.5G and 5G adapters Robin Zhang
2021-10-09 1:26 ` [dpdk-stable] [PATCH v5 06/17] net/i40e/base: fix PF reset Robin Zhang
2021-10-09 1:26 ` [dpdk-stable] [PATCH v5 07/17] net/i40e/base: fix update link data for X722 Robin Zhang
2021-10-09 1:26 ` [dpdk-stable] [PATCH v5 08/17] net/i40e/base: fix AOC media type Robin Zhang
2021-10-09 1:26 ` [dpdk-stable] [PATCH v5 10/17] net/i40e/base: fix headers to match functions Robin Zhang
2021-10-09 1:26 ` [dpdk-stable] [PATCH v5 11/17] net/i40e/base: fix potentially uninitialized variables Robin Zhang
2021-10-09 1:26 ` [dpdk-stable] [PATCH v5 12/17] net/i40e/base: fix checksum is used incorrectly Robin Zhang
[not found] ` <20211009013956.70937-1-robinx.zhang@intel.com>
2021-10-09 1:39 ` Robin Zhang [this message]
2021-10-09 1:39 ` [dpdk-stable] [PATCH v6 06/17] net/i40e/base: fix PF reset Robin Zhang
2021-10-09 1:39 ` [dpdk-stable] [PATCH v6 07/17] net/i40e/base: fix update link data for X722 Robin Zhang
2021-10-09 1:39 ` [dpdk-stable] [PATCH v6 08/17] net/i40e/base: fix AOC media type Robin Zhang
2021-10-09 1:39 ` [dpdk-stable] [PATCH v6 10/17] net/i40e/base: fix headers to match functions Robin Zhang
2021-10-09 1:39 ` [dpdk-stable] [PATCH v6 11/17] net/i40e/base: fix potentially uninitialized variables Robin Zhang
2021-10-09 1:39 ` [dpdk-stable] [PATCH v6 12/17] net/i40e/base: fix checksum is used incorrectly Robin Zhang
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=20211009013956.70937-6-robinx.zhang@intel.com \
--to=robinx.zhang@intel.com \
--cc=beilei.xing@intel.com \
--cc=cunming.liang@intel.com \
--cc=dawid.lukwinski@intel.com \
--cc=dev@dpdk.org \
--cc=helin.zhang@intel.com \
--cc=jijiang.liu@intel.com \
--cc=jing.d.chen@intel.com \
--cc=jingjing.wu@intel.com \
--cc=junfeng.guo@intel.com \
--cc=qi.z.zhang@intel.com \
--cc=remy.horton@intel.com \
--cc=stable@dpdk.org \
--cc=stevex.yang@intel.com \
--cc=wenzhuo.lu@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).