summaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/marvell.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2020-03-06 12:49:56 +0100
committerIngo Molnar <mingo@kernel.org>2020-03-06 12:49:56 +0100
commit1b10d388d094bb32129060236add6f50b204a69d (patch)
tree08272a4d89833d139e615b07675f95e403cdddbd /drivers/net/phy/marvell.c
parentsched/numa: Stop an exhastive search if a reasonable swap candidate or idle C... (diff)
parentMerge tag '5.6-rc4-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 (diff)
downloadlinux-1b10d388d094bb32129060236add6f50b204a69d.tar.xz
linux-1b10d388d094bb32129060236add6f50b204a69d.zip
Merge branch 'linus' into sched/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/net/phy/marvell.c')
-rw-r--r--drivers/net/phy/marvell.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index 28e33ece4ce1..9a8badafea8a 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -1306,6 +1306,9 @@ static int marvell_read_status_page_an(struct phy_device *phydev,
}
}
+ if (!(status & MII_M1011_PHY_STATUS_RESOLVED))
+ return 0;
+
if (status & MII_M1011_PHY_STATUS_FULLDUPLEX)
phydev->duplex = DUPLEX_FULL;
else
@@ -1365,6 +1368,8 @@ static int marvell_read_status_page(struct phy_device *phydev, int page)
linkmode_zero(phydev->lp_advertising);
phydev->pause = 0;
phydev->asym_pause = 0;
+ phydev->speed = SPEED_UNKNOWN;
+ phydev->duplex = DUPLEX_UNKNOWN;
if (phydev->autoneg == AUTONEG_ENABLE)
err = marvell_read_status_page_an(phydev, fiber, status);