[v2,24/25] net/axgbe: extend 10Mbps support to MAC version 21H

Message ID 20240507124305.2318-24-venkatkumar.ande@amd.com (mailing list archive)
State Changes Requested
Delegated to: Ferruh Yigit
Headers
Series [v2,01/25] net/axgbe: fix mdio access for non-zero ports and CL45 PHYs |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Venkat Kumar Ande May 7, 2024, 12:43 p.m. UTC
  MAC version 21H supports the 10Mbps speed. So, extend support to
platforms that support it.

Signed-off-by: Venkat Kumar Ande <venkatkumar.ande@amd.com>
---
 drivers/net/axgbe/axgbe_phy_impl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Sebastian, Selwin May 20, 2024, 10:43 a.m. UTC | #1
[AMD Official Use Only - AMD Internal Distribution Only]

Acked-by: Selwin Sebastian<selwin.sebastian@amd.com>

-----Original Message-----
From: Ande, Venkat Kumar <VenkatKumar.Ande@amd.com>
Sent: Tuesday, May 7, 2024 6:13 PM
To: dev@dpdk.org
Cc: Sebastian, Selwin <Selwin.Sebastian@amd.com>; Ande, Venkat Kumar <VenkatKumar.Ande@amd.com>
Subject: [PATCH v2 24/25] net/axgbe: extend 10Mbps support to MAC version 21H

MAC version 21H supports the 10Mbps speed. So, extend support to platforms that support it.

Signed-off-by: Venkat Kumar Ande <venkatkumar.ande@amd.com>
---
 drivers/net/axgbe/axgbe_phy_impl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_phy_impl.c
index a1c42b7dd4..d41c6e9bc7 100644
--- a/drivers/net/axgbe/axgbe_phy_impl.c
+++ b/drivers/net/axgbe/axgbe_phy_impl.c
@@ -2012,9 +2012,9 @@ static bool axgbe_phy_port_mode_mismatch(struct axgbe_port *pdata)
        struct axgbe_phy_data *phy_data = pdata->phy_data;
        unsigned int ver;

-       /* 10 Mbps speed is not supported in ver < 30H */
+       /* 10 Mbps speed is supported in ver 21H and ver >= 30H */
        ver = AXGMAC_GET_BITS(pdata->hw_feat.version, MAC_VR, SNPSVER);
-       if (ver < 0x30 && phy_data->port_speeds & AXGBE_PHY_PORT_SPEED_10)
+       if ((ver < 0x30 && ver != 0x21) && phy_data->port_speeds &
+AXGBE_PHY_PORT_SPEED_10)
                return true;

        switch (phy_data->port_mode) {
--
2.34.1
  

Patch

diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_phy_impl.c
index a1c42b7dd4..d41c6e9bc7 100644
--- a/drivers/net/axgbe/axgbe_phy_impl.c
+++ b/drivers/net/axgbe/axgbe_phy_impl.c
@@ -2012,9 +2012,9 @@  static bool axgbe_phy_port_mode_mismatch(struct axgbe_port *pdata)
 	struct axgbe_phy_data *phy_data = pdata->phy_data;
 	unsigned int ver;
 
-	/* 10 Mbps speed is not supported in ver < 30H */
+	/* 10 Mbps speed is supported in ver 21H and ver >= 30H */
 	ver = AXGMAC_GET_BITS(pdata->hw_feat.version, MAC_VR, SNPSVER);
-	if (ver < 0x30 && phy_data->port_speeds & AXGBE_PHY_PORT_SPEED_10)
+	if ((ver < 0x30 && ver != 0x21) && phy_data->port_speeds & AXGBE_PHY_PORT_SPEED_10)
 		return true;
 
 	switch (phy_data->port_mode) {