ethernet: bypass wol_reg12 check when 10M
authorZhuo Wang <zhuo.wang@amlogic.com>
Mon, 14 May 2018 04:43:29 +0000 (12:43 +0800)
committerYixun Lan <yixun.lan@amlogic.com>
Mon, 14 May 2018 07:54:37 +0000 (00:54 -0700)
PD#166287: 10M wol_reg12 error

Change-Id: I1b9bd412786509d2a4889c58ef634f6391b54e9e
Signed-off-by: Zhuo Wang <zhuo.wang@amlogic.com>
drivers/amlogic/ethernet/phy/amlogic.c

index b9348ce..8a8290f 100644 (file)
@@ -145,7 +145,7 @@ static int internal_phy_read_status(struct phy_device *phydev)
        val = ((1 << 15) | (1 << 11) | (1 << 10) | (12 << 5));
        phy_write(phydev, 0x14, val);
        wol_reg12 = phy_read(phydev, 0x15);
-       if (phydev->link) {
+       if ((phydev->link) && (phydev->speed != SPEED_10)) {
                if ((wol_reg12 & 0x1000))
                        reg12_error_count = 0;
                if (!(wol_reg12 & 0x1000)) {