net: phy: improve genphy_read_status
Subsystems (3)
Heiner Kallweit
maintainercover net: phy: improve genphy_read_status
Series includes two smaller improvements to genphy_read_status.
Heiner Kallweit (2):
net: phy: remove orphaned register read in genphy_read_status
net: phy: don't use 10BaseT/half as default in genphy_read_status
drivers/net/phy/phy_device.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
Signature · 1 line
2.20.1
Heiner Kallweit
maintainerPATCH 1/2 net: phy: remove orphaned register read in genphy_read_status
After recent changes to genphy_read_status() this orphaned register read remained as leftover. So remove it.
--- drivers/net/phy/phy_device.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/net/phy/phy_device.c +0 -4
@@ -1785,10 +1785,6 @@ 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->pause =0 ;
Signature · 1 line
2.20.1
Heiner Kallweit
maintainerPATCH 2/2 net: phy: don't use 10BaseT/half as default in genphy_read_status
In reply to Heiner KallweitIf 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.
--- drivers/net/phy/phy_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/phy/phy_device.c +2 -2
@@ -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 ;
Signature · 1 line
2.20.1
Re: [PATCH net-next 2/2] net: phy: don't use 10BaseT/half as default in genphy_read_status
Quoted 5 lines · Heiner Kallweit
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 <[email protected]>
Signature · 1 line
Florian
David Miller
maintainerFrom: Heiner Kallweit <[email protected]>
Date: Mon, 18 Feb 2019 20:28:04 +0100
Quoted 1 line
Series includes two smaller improvements to
genphy_read_status.
Series applied.