From: Radu Pirea Date: Fri, 7 Jun 2019 11:18:35 +0000 (+0300) Subject: net: macb: Fixed reading MII_LPA register X-Git-Tag: v2019.10-rc1~28^2~1 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1b0c9914cc75d1570359181ebd493cd5746cb0ed;p=oweals%2Fu-boot.git net: macb: Fixed reading MII_LPA register If macb is gem and is gigabit capable, lpa value is not read from the right register(MII_LPA) and is read from MII_STAT1000. This patch fixes reading of the lpa value. Signed-off-by: Radu Pirea Acked-by: Joe Hershberger --- diff --git a/drivers/net/macb.c b/drivers/net/macb.c index c5560a7111..ab831f40ee 100644 --- a/drivers/net/macb.c +++ b/drivers/net/macb.c @@ -613,7 +613,7 @@ static int macb_phy_init(struct macb_device *macb, const char *name) /* First check for GMAC and that it is GiB capable */ if (gem_is_gigabit_capable(macb)) { - lpa = macb_mdio_read(macb, MII_STAT1000); + lpa = macb_mdio_read(macb, MII_LPA); if (lpa & (LPA_1000FULL | LPA_1000HALF)) { duplex = ((lpa & LPA_1000FULL) ? 1 : 0);