Skip to content

Commit 0cd41f4

Browse files
danish-tiMa Wupeng
authored andcommitted
net: phy: dp83869: Fix MII mode failure
stable inclusion from stable-v6.6.30 commit 9dfe29373391455f914d995dc9d901a10ea94247 bugzilla: https://gitee.com/openeuler/kernel/issues/I9MPZ8 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=9dfe29373391455f914d995dc9d901a10ea94247 -------------------------------- [ 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: 94e86ef ("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> Signed-off-by: ZhangPeng <zhangpeng362@huawei.com>
1 parent fdd5028 commit 0cd41f4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/net/phy/dp83869.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,8 @@ static int dp83869_configure_mode(struct phy_device *phydev,
695695
phy_ctrl_val = dp83869->mode;
696696
if (phydev->interface == PHY_INTERFACE_MODE_MII) {
697697
if (dp83869->mode == DP83869_100M_MEDIA_CONVERT ||
698-
dp83869->mode == DP83869_RGMII_100_BASE) {
698+
dp83869->mode == DP83869_RGMII_100_BASE ||
699+
dp83869->mode == DP83869_RGMII_COPPER_ETHERNET) {
699700
phy_ctrl_val |= DP83869_OP_MODE_MII;
700701
} else {
701702
phydev_err(phydev, "selected op-mode is not valid with MII mode\n");

0 commit comments

Comments
 (0)