Commit 6c9cd59d authored by MD Danish Anwar's avatar MD Danish Anwar Committed by David S. Miller

net: phy: dp83869: Fix MII mode failure

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: 94e86ef1 ("net: phy: dp83869: support mii mode when rgmii strap cfg is used")
Signed-off-by: default avatarMD Danish Anwar <danishanwar@ti.com>
Reviewed-by: default avatarRavi Gunasekaran <r-gunasekaran@ti.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e6b21901
...@@ -695,7 +695,8 @@ static int dp83869_configure_mode(struct phy_device *phydev, ...@@ -695,7 +695,8 @@ static int dp83869_configure_mode(struct phy_device *phydev,
phy_ctrl_val = dp83869->mode; phy_ctrl_val = dp83869->mode;
if (phydev->interface == PHY_INTERFACE_MODE_MII) { if (phydev->interface == PHY_INTERFACE_MODE_MII) {
if (dp83869->mode == DP83869_100M_MEDIA_CONVERT || 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; phy_ctrl_val |= DP83869_OP_MODE_MII;
} else { } else {
phydev_err(phydev, "selected op-mode is not valid with MII mode\n"); phydev_err(phydev, "selected op-mode is not valid with MII mode\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment