diff options
author | Heiner Kallweit <hkallweit1@gmail.com> | 2019-03-22 20:00:20 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-04-03 06:27:26 +0200 |
commit | fc8f36de77111bf925d19f347c21134542941a3c (patch) | |
tree | ce91731edf66ae3a6d13705c35774c2acee00b88 /drivers/net | |
parent | aa3f1b029e4b664330a7f00ff80d8713f26921dc (diff) | |
download | blackbird-obmc-linux-fc8f36de77111bf925d19f347c21134542941a3c.tar.gz blackbird-obmc-linux-fc8f36de77111bf925d19f347c21134542941a3c.zip |
net: phy: don't clear BMCR in genphy_soft_reset
[ Upstream commit d29f5aa0bc0c321e1b9e4658a2a7e08e885da52a ]
So far we effectively clear the BMCR register. Some PHY's can deal
with this (e.g. because they reset BMCR to a default as part of a
soft-reset) whilst on others this causes issues because e.g. the
autoneg bit is cleared. Marvell is an example, see also thread [0].
So let's be a little bit more gentle and leave all bits we're not
interested in as-is. This change is needed for PHY drivers to
properly deal with the original patch.
[0] https://marc.info/?t=155264050700001&r=1&w=2
Fixes: 6e2d85ec0559 ("net: phy: Stop with excessive soft reset")
Tested-by: Phil Reid <preid@electromag.com.au>
Tested-by: liweihang <liweihang@hisilicon.com>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/phy/phy_device.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index 46c86725a693..739434fe04fa 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c @@ -1827,7 +1827,7 @@ int genphy_soft_reset(struct phy_device *phydev) { int ret; - ret = phy_write(phydev, MII_BMCR, BMCR_RESET); + ret = phy_set_bits(phydev, MII_BMCR, BMCR_RESET); if (ret < 0) return ret; |