From: John Crispin Date: Tue, 11 Nov 2014 11:46:09 +0000 (+0000) Subject: ralink: fix mdio polling of external phys if only 1 phy exists X-Git-Tag: reboot~5378 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e39993137628e2ea53be7822fb106d3a89db69b5;p=oweals%2Fopenwrt.git ralink: fix mdio polling of external phys if only 1 phy exists Signed-off-by: John Crispin SVN-Revision: 43235 --- 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); }