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