From: Heiner Kallweit Date: Mon, 18 Feb 2019 19:29:36 +0000 (+0100) Subject: net: phy: don't use 10BaseT/half as default in genphy_read_status X-Git-Tag: v5.15~6918^2~149^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=51f9f234dac5284333a047b7906f3095d410e6c3;p=platform%2Fkernel%2Flinux-starfive.git net: phy: don't use 10BaseT/half as default in genphy_read_status If link partner and we can't agree on any mode, then it doesn't make sense to pretend we would have agreed on 10/half. Therefore set a proper default. Signed-off-by: Heiner Kallweit Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller --- diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index 803197fdd87d..4bb3b6c2894e 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c @@ -1785,8 +1785,8 @@ int genphy_read_status(struct phy_device *phydev) mii_lpa_mod_linkmode_lpa_t(phydev->lp_advertising, lpa); - phydev->speed = SPEED_10; - phydev->duplex = DUPLEX_HALF; + phydev->speed = SPEED_UNKNOWN; + phydev->duplex = DUPLEX_UNKNOWN; phydev->pause = 0; phydev->asym_pause = 0;