DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jingjing Wu <jingjing.wu@intel.com>
To: dev@dpdk.org
Cc: jingjing.wu@intel.com, helin.zhang@intel.com, beilei.xing@intel.com
Subject: [dpdk-dev] [PATCH 2/7] net/i40e/base: control register read/write on X722
Date: Wed, 22 Mar 2017 17:24:54 +0800	[thread overview]
Message-ID: <1490174699-147026-3-git-send-email-jingjing.wu@intel.com> (raw)
In-Reply-To: <1490174699-147026-1-git-send-email-jingjing.wu@intel.com>

The X722 doesn't support the AQ command to read/write the control
register so enable it to bypass the check and use the direct read/write
method.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
 drivers/net/i40e/base/i40e_common.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index b8d8165..cabf7d5 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -6634,7 +6634,9 @@ u32 i40e_read_rx_ctl(struct i40e_hw *hw, u32 reg_addr)
 	int retry = 5;
 	u32 val = 0;
 
-	use_register = (hw->aq.api_maj_ver == 1) && (hw->aq.api_min_ver < 5);
+	use_register = (((hw->aq.api_maj_ver == 1) &&
+			(hw->aq.api_min_ver < 5)) ||
+			(hw->mac.type == I40E_MAC_X722));
 	if (!use_register) {
 do_retry:
 		status = i40e_aq_rx_ctl_read_register(hw, reg_addr, &val, NULL);
@@ -6693,7 +6695,9 @@ void i40e_write_rx_ctl(struct i40e_hw *hw, u32 reg_addr, u32 reg_val)
 	bool use_register;
 	int retry = 5;
 
-	use_register = (hw->aq.api_maj_ver == 1) && (hw->aq.api_min_ver < 5);
+	use_register = (((hw->aq.api_maj_ver == 1) &&
+			(hw->aq.api_min_ver < 5)) ||
+			(hw->mac.type == I40E_MAC_X722));
 	if (!use_register) {
 do_retry:
 		status = i40e_aq_rx_ctl_write_register(hw, reg_addr,
-- 
2.4.11

  parent reply	other threads:[~2017-03-22  9:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-22  9:24 [dpdk-dev] [PATCH 0/7] net/i40e: base code update Jingjing Wu
2017-03-22  9:24 ` [dpdk-dev] [PATCH 1/7] net/i40e/base: define bit for HW ATR evict control Jingjing Wu
2017-03-22  9:24 ` Jingjing Wu [this message]
2017-03-22  9:24 ` [dpdk-dev] [PATCH 3/7] net/i40e/base: fix potential out of bound array access Jingjing Wu
2017-03-22  9:24 ` [dpdk-dev] [PATCH 4/7] net/i40e/base: new AQ commands for ppp Jingjing Wu
2017-03-22  9:24 ` [dpdk-dev] [PATCH 5/7] net/i40e/base: reduce wait time for adminq command Jingjing Wu
2017-03-22  9:24 ` [dpdk-dev] [PATCH 6/7] net/i40e/base: add VF offload flags Jingjing Wu
2017-03-22  9:24 ` [dpdk-dev] [PATCH 7/7] net/i40e/base: new AQ commands for cloud filter Jingjing Wu
2017-03-22 14:29 ` [dpdk-dev] [PATCH 0/7] net/i40e: base code update Ferruh Yigit
2017-03-23  1:26   ` Wu, Jingjing
2017-03-23 10:05     ` Ferruh Yigit

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=1490174699-147026-3-git-send-email-jingjing.wu@intel.com \
    --to=jingjing.wu@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=helin.zhang@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).