Link stability issues are noticed on Yellow carp platforms when Receiver
Reset Cycle is issued. Since the CDR workaround is disabled on these
platforms, the Receiver Reset Cycle is not needed.

So, avoid issuing rrc on Yellow carp platforms.

Signed-off-by: Venkat Kumar Ande <venkatkumar.a...@amd.com>
---
 drivers/net/axgbe/axgbe_ethdev.c   | 5 +++++
 drivers/net/axgbe/axgbe_ethdev.h   | 1 +
 drivers/net/axgbe/axgbe_phy_impl.c | 2 +-
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c
index e5d8f7db02..86c2ec64e0 100644
--- a/drivers/net/axgbe/axgbe_ethdev.c
+++ b/drivers/net/axgbe/axgbe_ethdev.c
@@ -208,6 +208,7 @@ static struct axgbe_version_data axgbe_v2a = {
        .ecc_support                    = 1,
        .i2c_support                    = 1,
        .an_cdr_workaround              = 1,
+       .enable_rrc                     = 1,
 };
 
 static struct axgbe_version_data axgbe_v2b = {
@@ -220,6 +221,7 @@ static struct axgbe_version_data axgbe_v2b = {
        .ecc_support                    = 1,
        .i2c_support                    = 1,
        .an_cdr_workaround              = 1,
+       .enable_rrc                     = 1,
 };
 
 static const struct rte_eth_desc_lim rx_desc_lim = {
@@ -2269,6 +2271,9 @@ eth_axgbe_dev_init(struct rte_eth_dev *eth_dev)
 
                        /* Yellow Carp devices do not need cdr workaround */
                        pdata->vdata->an_cdr_workaround = 0;
+
+                       /* Yellow Carp devices do not need rrc */
+                       pdata->vdata->enable_rrc = 0;
                } else {
                        unknown_cpu = 1;
                }
diff --git a/drivers/net/axgbe/axgbe_ethdev.h b/drivers/net/axgbe/axgbe_ethdev.h
index 924a26ebe3..469b3876c0 100644
--- a/drivers/net/axgbe/axgbe_ethdev.h
+++ b/drivers/net/axgbe/axgbe_ethdev.h
@@ -463,6 +463,7 @@ struct axgbe_version_data {
        unsigned int ecc_support;
        unsigned int i2c_support;
        unsigned int an_cdr_workaround;
+       unsigned int enable_rrc;
 };
 
 struct axgbe_mmc_stats {
diff --git a/drivers/net/axgbe/axgbe_phy_impl.c 
b/drivers/net/axgbe/axgbe_phy_impl.c
index 1ccb95334e..a58d51d606 100644
--- a/drivers/net/axgbe/axgbe_phy_impl.c
+++ b/drivers/net/axgbe/axgbe_phy_impl.c
@@ -1687,7 +1687,7 @@ static int axgbe_phy_link_status(struct axgbe_port 
*pdata, int *an_restart)
        }
 
        /* No link, attempt a receiver reset cycle */
-       if (phy_data->rrc_count++) {
+       if (pdata->vdata->enable_rrc && phy_data->rrc_count++) {
                phy_data->rrc_count = 0;
                axgbe_phy_rrc(pdata);
        }
-- 
2.34.1

Reply via email to