net: phy: dp83867: Set up RGMII TX delay [Linux 4.14.129]

net: phy: dp83867: Set up RGMII TX delay [Linux 4.14.129]

This Linux kernel change "net: phy: dp83867: Set up RGMII TX delay" is included in the Linux 4.14.129 release. This change is authored by Max Uvarov <muvarov [at] gmail.com> on Tue May 28 13:00:52 2019 +0300. The commit for this change in Linux stable tree is 90abd7a (patch) which is from upstream commit 2b89264. The same Linux upstream change may have been applied to various maintained Linux releases and you can find all Linux releases containing changes from upstream 2b89264.

net: phy: dp83867: Set up RGMII TX delay

[ Upstream commit 2b892649254fec01678c64f16427622b41fa27f4 ]

PHY_INTERFACE_MODE_RGMII_RXID is less then TXID
so code to set tx delay is never called.

Fixes: 2a10154abcb75 ("net: phy: dp83867: Add TI dp83867 phy")
Signed-off-by: Max Uvarov <[email protected]>
Cc: Florian Fainelli <[email protected]>
Reviewed-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>

There are 4 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/net/phy/dp83867.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c
index c1ab976..12b09e6 100644
--- a/drivers/net/phy/dp83867.c
+++ b/drivers/net/phy/dp83867.c
@@ -249,10 +249,8 @@ static int dp83867_config_init(struct phy_device *phydev)
        ret = phy_write(phydev, MII_DP83867_PHYCTRL, val);
        if (ret)
            return ret;
-   }

-   if ((phydev->interface >= PHY_INTERFACE_MODE_RGMII_ID) &&
-       (phydev->interface <= PHY_INTERFACE_MODE_RGMII_RXID)) {
+       /* Set up RGMII delays */
        val = phy_read_mmd(phydev, DP83867_DEVADDR, DP83867_RGMIICTL);

        if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID)

Leave a Reply

Your email address will not be published. Required fields are marked *