From: Guinan Sun <guinanx.sun@intel.com>
To: dev@dpdk.org
Cc: Beilei Xing <beilei.xing@intel.com>, Jeff Guo <jia.guo@intel.com>,
Guinan Sun <guinanx.sun@intel.com>,
Dawid Lukwinski <dawid.lukwinski@intel.com>
Subject: [dpdk-dev] [PATCH 1/8] net/i40e/base: enable FEC on/off flag setting for X722
Date: Tue, 21 Jul 2020 06:31:44 +0000 [thread overview]
Message-ID: <20200721063151.30183-2-guinanx.sun@intel.com> (raw)
In-Reply-To: <20200721063151.30183-1-guinanx.sun@intel.com>
Starting with API version 1.10 firmware for X722 devices has ability
to change FEC settings in PHY. Code added in this patch
checks API version and sets appropriate capability flag.
Signed-off-by: Dawid Lukwinski <dawid.lukwinski@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
---
drivers/net/i40e/base/i40e_adminq.c | 6 ++++++
drivers/net/i40e/base/i40e_adminq_cmd.h | 2 ++
drivers/net/i40e/base/i40e_type.h | 1 +
3 files changed, 9 insertions(+)
diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c
index c89e1fb3f..0da45f03e 100644
--- a/drivers/net/i40e/base/i40e_adminq.c
+++ b/drivers/net/i40e/base/i40e_adminq.c
@@ -603,6 +603,12 @@ STATIC void i40e_set_hw_flags(struct i40e_hw *hw)
(aq->api_maj_ver == 1 &&
aq->api_min_ver >= I40E_MINOR_VER_GET_LINK_INFO_X722))
hw->flags |= I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE;
+
+ if (aq->api_maj_ver > 1 ||
+ (aq->api_maj_ver == 1 &&
+ aq->api_min_ver >= I40E_MINOR_VER_FW_REQUEST_FEC_X722))
+ hw->flags |= I40E_HW_FLAG_X722_FEC_REQUEST_CAPABLE;
+
/* fall through */
default:
break;
diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h
index 1905167f5..f790183be 100644
--- a/drivers/net/i40e/base/i40e_adminq_cmd.h
+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
@@ -25,6 +25,8 @@
#define I40E_MINOR_VER_GET_LINK_INFO_X722 0x0009
/* API version 1.6 for X722 devices adds ability to stop FW LLDP agent */
#define I40E_MINOR_VER_FW_LLDP_STOPPABLE_X722 0x0006
+/* API version 1.10 for X722 devices adds ability to request FEC encoding */
+#define I40E_MINOR_VER_FW_REQUEST_FEC_X722 0x000A
struct i40e_aq_desc {
__le16 flags;
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index 014a4c132..b5b5b928d 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -745,6 +745,7 @@ struct i40e_hw {
#define I40E_HW_FLAG_FW_LLDP_PERSISTENT BIT_ULL(5)
#define I40E_HW_FLAG_AQ_PHY_ACCESS_EXTENDED BIT_ULL(6)
#define I40E_HW_FLAG_DROP_MODE BIT_ULL(7)
+#define I40E_HW_FLAG_X722_FEC_REQUEST_CAPABLE BIT_ULL(8)
u64 flags;
/* Used in set switch config AQ command */
--
2.17.1
next prev parent reply other threads:[~2020-07-21 6:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-21 6:31 [dpdk-dev] [PATCH 0/8] update i40e base code Guinan Sun
2020-07-21 6:31 ` Guinan Sun [this message]
2020-07-21 7:39 Guinan Sun
2020-07-21 7:39 ` [dpdk-dev] [PATCH 1/8] net/i40e/base: enable FEC on/off flag setting for X722 Guinan Sun
2020-07-27 3:38 ` Jeff Guo
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=20200721063151.30183-2-guinanx.sun@intel.com \
--to=guinanx.sun@intel.com \
--cc=beilei.xing@intel.com \
--cc=dawid.lukwinski@intel.com \
--cc=dev@dpdk.org \
--cc=jia.guo@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).