From e39993137628e2ea53be7822fb106d3a89db69b5 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Tue, 11 Nov 2014 11:46:09 +0000 Subject: ralink: fix mdio polling of external phys if only 1 phy exists Signed-off-by: John Crispin SVN-Revision: 43235 --- target/linux/ramips/files/drivers/net/ethernet/ralink/gsw_mt7620a.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'target') 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); } -- cgit v1.2.3