diff mbox series

[U-Boot,1/2] net: macb: Fixed reading MII_LPA register

Message ID 20190607111836.17629-1-radu_nicolae.pirea@upb.ro
State Accepted
Commit 1b0c9914cc75d1570359181ebd493cd5746cb0ed
Delegated to: Joe Hershberger
Headers show
Series [U-Boot,1/2] net: macb: Fixed reading MII_LPA register | expand

Commit Message

Radu Pirea June 7, 2019, 11:18 a.m. UTC
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 <radu_nicolae.pirea@upb.ro>
---
 drivers/net/macb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Joe Hershberger July 8, 2019, 10:53 p.m. UTC | #1
On Fri, Jun 7, 2019 at 8:48 AM Radu Pirea <radu_nicolae.pirea@upb.ro> wrote:
>
> 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 <radu_nicolae.pirea@upb.ro>

Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Joe Hershberger July 15, 2019, 10:51 p.m. UTC | #2
Hi Radu,

https://patchwork.ozlabs.org/patch/1111831/ was applied to http://git.denx.de/?p=u-boot/u-boot-net.git

Thanks!
-Joe
diff mbox series

Patch

diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index 72614164e9..3632650983 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -570,7 +570,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);