Skip to content

Commit 33d41c8

Browse files
danish-tiSasha Levin
authored andcommitted
net: phy: dp83869: Fix MII mode failure
[ Upstream commit 6c9cd59 ] 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 <[email protected]> Reviewed-by: Ravi Gunasekaran <[email protected]> Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 0f0e9d0 commit 33d41c8

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)