Commit 00eb2243 authored by Andrew Lunn's avatar Andrew Lunn Committed by David S. Miller

net: bcmgenet: Fix speed selection for reverse MII

The phy supported speed is being used to determine if the MAC should
be configured to 100 or 1G. The masking logic is broken. Instead, look
at 1G supported speeds to enable 1G MAC support.
Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 58056c1e
...@@ -226,11 +226,10 @@ int bcmgenet_mii_config(struct net_device *dev, bool init) ...@@ -226,11 +226,10 @@ int bcmgenet_mii_config(struct net_device *dev, bool init)
* capabilities, use that knowledge to also configure the * capabilities, use that knowledge to also configure the
* Reverse MII interface correctly. * Reverse MII interface correctly.
*/ */
if ((dev->phydev->supported & PHY_BASIC_FEATURES) == if (dev->phydev->supported & PHY_1000BT_FEATURES)
PHY_BASIC_FEATURES)
port_ctrl = PORT_MODE_EXT_RVMII_25;
else
port_ctrl = PORT_MODE_EXT_RVMII_50; port_ctrl = PORT_MODE_EXT_RVMII_50;
else
port_ctrl = PORT_MODE_EXT_RVMII_25;
bcmgenet_sys_writel(priv, port_ctrl, SYS_PORT_CTRL); bcmgenet_sys_writel(priv, port_ctrl, SYS_PORT_CTRL);
break; break;
......
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