aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2014-11-11 11:46:09 +0000
committerJohn Crispin <blogic@openwrt.org>2014-11-11 11:46:09 +0000
commitbec227fc64a475c909492751e3d838ed74c7bc46 (patch)
tree6232f1c8ee1eec6fe417d74e241557c9e23c7e8f
parentdbac7e60348d6c5523982851ce86b6c4b67f0d74 (diff)
downloadmaster-187ad058-bec227fc64a475c909492751e3d838ed74c7bc46.tar.gz
master-187ad058-bec227fc64a475c909492751e3d838ed74c7bc46.tar.bz2
master-187ad058-bec227fc64a475c909492751e3d838ed74c7bc46.zip
ralink: fix mdio polling of external phys if only 1 phy exists
Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43235 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--target/linux/ramips/files/drivers/net/ethernet/ralink/gsw_mt7620a.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/gsw_mt7620a.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/gsw_mt7620a.c
index e31dd29b42..c0ec939263 100644
--- a/target/linux/ramips/files/drivers/net/ethernet/ralink/gsw_mt7620a.c
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/gsw_mt7620a.c
@@ -299,6 +299,9 @@ static void gsw_auto_poll(struct mt7620_gsw *gsw)
msb = phy;
}
+ if (lsb)
+ lsb--;
+
gsw_w32(gsw, PHY_AN_EN | PHY_PRE_EN | PMY_MDC_CONF(5) | (msb << 8) | lsb, ESW_PHY_POLLING);
}