]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
phy: qcom-sgmii-eth: remove .set_speed() implementation
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Tue, 3 Mar 2026 15:53:45 +0000 (15:53 +0000)
committerJakub Kicinski <kuba@kernel.org>
Fri, 6 Mar 2026 02:43:06 +0000 (18:43 -0800)
Now that the qcom-ethqos driver has migrated to use phy_set_mode_ext()
rather than phy_set_speed() to configure the SerDes, the support for
phy_set_speed() is now obsolete. Remove support for this method.

Using the MAC speed for the SerDes is never correct due to the PCS
encoding. For SGMII and 2500BASE-X, the PCS uses 8B10B encoding, and
so:

  MAC rate * PCS output bits / PCS input bits = SerDes rate
   1000M   *       10        /       8        = 1250M
   2500M   *       10        /       8        = 3125M

Tested-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
Acked-by: Vinod Koul <vkoul@kernel.org>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/E1vxS49-0000000BQXa-3Zcg@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/phy/qualcomm/phy-qcom-sgmii-eth.c

index 4ea3dce7719fe8fe12d83244dd7f303bc4a311c1..dcfdb7d0e8eaaec27a79f46d6b9901217ac6a1b7 100644 (file)
@@ -318,16 +318,6 @@ static int qcom_dwmac_sgmii_phy_set_mode(struct phy *phy, enum phy_mode mode,
        return qcom_dwmac_sgmii_phy_calibrate(phy);
 }
 
-static int qcom_dwmac_sgmii_phy_set_speed(struct phy *phy, int speed)
-{
-       struct qcom_dwmac_sgmii_phy_data *data = phy_get_drvdata(phy);
-
-       if (speed != data->speed)
-               data->speed = speed;
-
-       return qcom_dwmac_sgmii_phy_calibrate(phy);
-}
-
 static int qcom_dwmac_sgmii_phy_validate(struct phy *phy, enum phy_mode mode,
                                         int submode,
                                         union phy_configure_opts *opts)
@@ -341,7 +331,6 @@ static const struct phy_ops qcom_dwmac_sgmii_phy_ops = {
        .power_on       = qcom_dwmac_sgmii_phy_power_on,
        .power_off      = qcom_dwmac_sgmii_phy_power_off,
        .set_mode       = qcom_dwmac_sgmii_phy_set_mode,
-       .set_speed      = qcom_dwmac_sgmii_phy_set_speed,
        .validate       = qcom_dwmac_sgmii_phy_validate,
        .calibrate      = qcom_dwmac_sgmii_phy_calibrate,
        .owner          = THIS_MODULE,