From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bin Meng Date: Fri, 16 Aug 2019 22:19:02 +0800 Subject: [U-Boot] [PATCH] Revert "net: macb: Fixed reading MII_LPA register" In-Reply-To: References: <1565778582-16750-1-git-send-email-bmeng.cn@gmail.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Fri, Aug 16, 2019 at 10:46 AM Anup Patel wrote: > > On Wed, Aug 14, 2019 at 4:01 PM Bin Meng wrote: > > > > This reverts commit 1b0c9914cc75d1570359181ebd493cd5746cb0ed. > > > > Commit 1b0c9914cc75 ("net: macb: Fixed reading MII_LPA register") > > causes 100Mbps does not work any more with SiFive FU540 GEM on the > > HiFive Unleashed board. Revert it. > > > > Signed-off-by: Bin Meng > > --- > > > > drivers/net/macb.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/net/macb.c b/drivers/net/macb.c > > index c99cf66..25f7913 100644 > > --- a/drivers/net/macb.c > > +++ b/drivers/net/macb.c > > @@ -643,7 +643,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_LPA); > > + lpa = macb_mdio_read(macb, MII_STAT1000); > > You can do this selectively by having boolean flag in macb_config which is > only set for SiFive Unleashed. That does not look clean to me. I actually don't understand what the issue the previous patch was trying to fix. Maybe until we know that better we need revert to original codes... Regards, Bin