mirror of
https://github.com/openwrt/openwrt.git
synced 2025-02-20 17:32:57 +00:00
ramips: fix gigabit switch PHY access on MDIO
When PHY's are defined on the MDIO bus in the DTS, gigabit support was being masked out for no apparent reason, pegging all such ports to 10/100. If gigabit support must be disabled for some reason, there should be a "max-speed" property in the DTS. Reported-by: James McKenzie <openwrt@madingley.org> Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us> (cherry picked from commit 379fe506729a20c5fdb072840cb662b032e90c36)
This commit is contained in:
parent
9ce7aa325e
commit
f63463591b
@ -110,7 +110,8 @@ static void phy_init(struct fe_priv *priv, struct phy_device *phy)
|
||||
phy->autoneg = AUTONEG_ENABLE;
|
||||
phy->speed = 0;
|
||||
phy->duplex = 0;
|
||||
phy->supported &= PHY_BASIC_FEATURES;
|
||||
phy->supported &= IS_ENABLED(CONFIG_NET_MEDIATEK_MDIO_MT7620) ?
|
||||
PHY_GBIT_FEATURES : PHY_BASIC_FEATURES;
|
||||
phy->advertising = phy->supported | ADVERTISED_Autoneg;
|
||||
|
||||
phy_start_aneg(phy);
|
||||
|
Loading…
x
Reference in New Issue
Block a user