[PATCH 23.11 v1] net/axgbe: fix 100M SGMII mode
Ashok Kumar Natarajan
ashokkumar.natarajan at amd.com
Thu Apr 16 12:27:53 CEST 2026
[ upstream commit 11b918959cd924fc6ad09d8cae1a86411490218a ]
In SGMII 100M mode, set MAC speed to 100M instead of 1G,
and add the PHY implementation for SGMII 100 mode.
Fixes: a5c7273771e8 ("net/axgbe: add phy programming APIs")
Signed-off-by: Ashok Kumar Natarajan <ashokkumar.natarajan at amd.com>
---
drivers/net/axgbe/axgbe_mdio.c | 4 ++--
drivers/net/axgbe/axgbe_phy_impl.c | 15 +++++++++++++++
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/drivers/net/axgbe/axgbe_mdio.c b/drivers/net/axgbe/axgbe_mdio.c
index d95a52659e..fdd0478c00 100644
--- a/drivers/net/axgbe/axgbe_mdio.c
+++ b/drivers/net/axgbe/axgbe_mdio.c
@@ -146,8 +146,8 @@ static void axgbe_sgmii_1000_mode(struct axgbe_port *pdata)
static void axgbe_sgmii_100_mode(struct axgbe_port *pdata)
{
- /* Set MAC to 1G speed */
- pdata->hw_if.set_speed(pdata, SPEED_1000);
+ /* Set MAC to 100M speed */
+ pdata->hw_if.set_speed(pdata, SPEED_100);
/* Call PHY implementation support to complete rate change */
pdata->phy_if.phy_impl.set_mode(pdata, AXGBE_MODE_SGMII_100);
diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_phy_impl.c
index 12908d4e6f..9ab8e319a4 100644
--- a/drivers/net/axgbe/axgbe_phy_impl.c
+++ b/drivers/net/axgbe/axgbe_phy_impl.c
@@ -1362,6 +1362,18 @@ static void axgbe_phy_sgmii_1000_mode(struct axgbe_port *pdata)
phy_data->cur_mode = AXGBE_MODE_SGMII_1000;
}
+static void axgbe_phy_sgmii_100_mode(struct axgbe_port *pdata)
+{
+ struct axgbe_phy_data *phy_data = pdata->phy_data;
+
+ axgbe_phy_set_redrv_mode(pdata);
+
+ /* 100M/SGMII */
+ axgbe_phy_perform_ratechange(pdata, 1, 1);
+
+ phy_data->cur_mode = AXGBE_MODE_SGMII_100;
+}
+
static enum axgbe_mode axgbe_phy_cur_mode(struct axgbe_port *pdata)
{
struct axgbe_phy_data *phy_data = pdata->phy_data;
@@ -1540,6 +1552,9 @@ static void axgbe_phy_set_mode(struct axgbe_port *pdata, enum axgbe_mode mode)
case AXGBE_MODE_SGMII_1000:
axgbe_phy_sgmii_1000_mode(pdata);
break;
+ case AXGBE_MODE_SGMII_100:
+ axgbe_phy_sgmii_100_mode(pdata);
+ break;
default:
break;
}
--
2.43.0
More information about the stable
mailing list