Commit 1b0c9914cc75d1570359181ebd493cd5746cb0ed

Authored by Radu Pirea
Committed by Joe Hershberger
1 parent c558c50dbb

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 <radu_nicolae.pirea@upb.ro>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -613,7 +613,7 @@
613 613  
614 614 /* First check for GMAC and that it is GiB capable */
615 615 if (gem_is_gigabit_capable(macb)) {
616   - lpa = macb_mdio_read(macb, MII_STAT1000);
  616 + lpa = macb_mdio_read(macb, MII_LPA);
617 617  
618 618 if (lpa & (LPA_1000FULL | LPA_1000HALF)) {
619 619 duplex = ((lpa & LPA_1000FULL) ? 1 : 0);