patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Jiawen Wu <jiawenwu@trustnetic.com>
To: dev@dpdk.org
Cc: Jiawen Wu <jiawenwu@trustnetic.com>, stable@dpdk.org
Subject: [dpdk-stable] [PATCH v2] net/txgbe: fix link process in KR mode
Date: Fri,  5 Nov 2021 10:01:17 +0800	[thread overview]
Message-ID: <20211105020117.23000-1-jiawenwu@trustnetic.com> (raw)

Set the 'present' parameter to 0 by default. It is configured by hardware,
users can set it to 1 for manual configuration.

Fixes: f611dada1af8 ("net/txgbe: update link setup process of backplane NICs")
Cc: stable@dpdk.org

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 doc/guides/nics/txgbe.rst          | 2 +-
 drivers/net/txgbe/base/txgbe_phy.c | 2 +-
 drivers/net/txgbe/txgbe_ethdev.c   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/guides/nics/txgbe.rst b/doc/guides/nics/txgbe.rst
index 47501796f2..5b29f1de0c 100644
--- a/doc/guides/nics/txgbe.rst
+++ b/doc/guides/nics/txgbe.rst
@@ -110,7 +110,7 @@ Please note that following ``devargs`` are only set for backplane NICs.
 
   Toggle behavior to enable/disable polling mode to receive AN interrupt.
 
-- ``present`` (default **1**)
+- ``present`` (default **0**)
 
   Toggle behavior to use present mode or init mode.
 
diff --git a/drivers/net/txgbe/base/txgbe_phy.c b/drivers/net/txgbe/base/txgbe_phy.c
index 2db87ae0c5..3f5229ecc2 100644
--- a/drivers/net/txgbe/base/txgbe_phy.c
+++ b/drivers/net/txgbe/base/txgbe_phy.c
@@ -1456,7 +1456,7 @@ txgbe_set_link_to_kr(struct txgbe_hw *hw, bool autoneg)
 			wr32_epcs(hw, SR_AN_CTRL, 0);
 			wr32_epcs(hw, VR_AN_KR_MODE_CL, 0);
 		}
-		if (hw->devarg.present  == 1) {
+		if (hw->devarg.present == 1) {
 			value = rd32_epcs(hw, TXGBE_PHY_TX_EQ_CTL1);
 			value |= TXGBE_PHY_TX_EQ_CTL1_DEF;
 			wr32_epcs(hw, TXGBE_PHY_TX_EQ_CTL1, value);
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index 169272ded5..8628ce455f 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -495,7 +495,7 @@ txgbe_parse_devargs(struct txgbe_hw *hw, struct rte_devargs *devargs)
 	struct rte_kvargs *kvlist;
 	u16 auto_neg = 1;
 	u16 poll = 0;
-	u16 present = 1;
+	u16 present = 0;
 	u16 sgmii = 0;
 	u16 ffe_set = 0;
 	u16 ffe_main = 27;
-- 
2.21.0.windows.1




             reply	other threads:[~2021-11-05  2:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-05  2:01 Jiawen Wu [this message]
2021-11-05 14:13 ` 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=20211105020117.23000-1-jiawenwu@trustnetic.com \
    --to=jiawenwu@trustnetic.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    /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).