[2/2] net/txgbe: fix link process in KR mode

Message ID 20211102081026.22440-2-jiawenwu@trustnetic.com (mailing list archive)
State Changes Requested, archived
Delegated to: Ferruh Yigit
Headers
Series [1/2] net/txgbe: fix RxTx packet statistics |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/github-robot: build success github build: passed
ci/Intel-compilation fail Compilation issues
ci/intel-Testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS

Commit Message

Jiawen Wu Nov. 2, 2021, 8:10 a.m. UTC
  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>
---
 drivers/net/txgbe/base/txgbe_phy.c | 2 +-
 drivers/net/txgbe/txgbe_ethdev.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
  

Comments

Ferruh Yigit Nov. 4, 2021, 4:17 p.m. UTC | #1
On 11/2/2021 8:10 AM, Jiawen Wu wrote:
> 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>
> ---
>   drivers/net/txgbe/base/txgbe_phy.c | 2 +-
>   drivers/net/txgbe/txgbe_ethdev.c   | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
> 

Documentation also needs to be updated for this change.

> 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;
>
  

Patch

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;