diff options
Diffstat (limited to 'queue-6.6/net-phy-dp83869-fix-mii-mode-failure.patch')
-rw-r--r-- | queue-6.6/net-phy-dp83869-fix-mii-mode-failure.patch | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/queue-6.6/net-phy-dp83869-fix-mii-mode-failure.patch b/queue-6.6/net-phy-dp83869-fix-mii-mode-failure.patch new file mode 100644 index 0000000000..8e648faf34 --- /dev/null +++ b/queue-6.6/net-phy-dp83869-fix-mii-mode-failure.patch @@ -0,0 +1,50 @@ +From b631ab019b997d84fa187be157dc81b62457e9c5 Mon Sep 17 00:00:00 2001 +From: Sasha Levin <sashal@kernel.org> +Date: Tue, 23 Apr 2024 14:18:28 +0530 +Subject: net: phy: dp83869: Fix MII mode failure + +From: MD Danish Anwar <danishanwar@ti.com> + +[ Upstream commit 6c9cd59dbcb09a2122b5ce0dfc07c74e6fc00dc0 ] + +The DP83869 driver sets the MII bit (needed for PHY to work in MII mode) +only if the op-mode is either DP83869_100M_MEDIA_CONVERT or +DP83869_RGMII_100_BASE. + +Some drivers i.e. ICSSG support MII mode with op-mode as +DP83869_RGMII_COPPER_ETHERNET for which the MII bit is not set in dp83869 +driver. As a result MII mode on ICSSG doesn't work and below log is seen. + +TI DP83869 300b2400.mdio:0f: selected op-mode is not valid with MII mode +icssg-prueth icssg1-eth: couldn't connect to phy ethernet-phy@0 +icssg-prueth icssg1-eth: can't phy connect port MII0 + +Fix this by setting MII bit for DP83869_RGMII_COPPER_ETHERNET op-mode as +well. + +Fixes: 94e86ef1b801 ("net: phy: dp83869: support mii mode when rgmii strap cfg is used") +Signed-off-by: MD Danish Anwar <danishanwar@ti.com> +Reviewed-by: Ravi Gunasekaran <r-gunasekaran@ti.com> +Signed-off-by: David S. Miller <davem@davemloft.net> +Signed-off-by: Sasha Levin <sashal@kernel.org> +--- + drivers/net/phy/dp83869.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/drivers/net/phy/dp83869.c b/drivers/net/phy/dp83869.c +index fa8c6fdcf3018..d7aaefb5226b6 100644 +--- a/drivers/net/phy/dp83869.c ++++ b/drivers/net/phy/dp83869.c +@@ -695,7 +695,8 @@ static int dp83869_configure_mode(struct phy_device *phydev, + phy_ctrl_val = dp83869->mode; + if (phydev->interface == PHY_INTERFACE_MODE_MII) { + if (dp83869->mode == DP83869_100M_MEDIA_CONVERT || +- dp83869->mode == DP83869_RGMII_100_BASE) { ++ dp83869->mode == DP83869_RGMII_100_BASE || ++ dp83869->mode == DP83869_RGMII_COPPER_ETHERNET) { + phy_ctrl_val |= DP83869_OP_MODE_MII; + } else { + phydev_err(phydev, "selected op-mode is not valid with MII mode\n"); +-- +2.43.0 + |