summaryrefslogtreecommitdiffstats
path: root/drivers/net/phy
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2019-02-21 12:57:25 -0800
committerDavid S. Miller <davem@davemloft.net>2019-02-21 12:57:25 -0800
commita41070aa9296b01fcee29bf22e184eb3e98bd376 (patch)
tree07416998503f1924f4d50e3343d43f70ae4e903b /drivers/net/phy
parent0ebcebbef1cc50fb94ae17917208b04868de9c38 (diff)
parent51f9f234dac5284333a047b7906f3095d410e6c3 (diff)
downloadlinux-a41070aa9296b01fcee29bf22e184eb3e98bd376.tar.bz2
Merge branch 'net-phy-improve-genphy_read_status'
Heiner Kallweit says: ==================== net: phy: improve genphy_read_status Series includes two smaller improvements to genphy_read_status. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy')
-rw-r--r--drivers/net/phy/phy_device.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index 7e71124bb20e..4bb3b6c2894e 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -1785,12 +1785,8 @@ int genphy_read_status(struct phy_device *phydev)
mii_lpa_mod_linkmode_lpa_t(phydev->lp_advertising, lpa);
- adv = phy_read(phydev, MII_ADVERTISE);
- if (adv < 0)
- return adv;
-
- phydev->speed = SPEED_10;
- phydev->duplex = DUPLEX_HALF;
+ phydev->speed = SPEED_UNKNOWN;
+ phydev->duplex = DUPLEX_UNKNOWN;
phydev->pause = 0;
phydev->asym_pause = 0;