]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: don't clear BMCR in genphy_soft_reset
authorHeiner Kallweit <hkallweit1@gmail.com>
Fri, 22 Mar 2019 19:00:20 +0000 (20:00 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 26 Mar 2019 00:08:21 +0000 (17:08 -0700)
commitef6bad290bae8403ff66d6ed06f16142690b31b0
treef00bbcfc3a9cba7459b1ccaca4350e0aea7850b5
parentf1783decd834a6cd1f460ade6e77d727c5e08e47
net: phy: don't clear BMCR in genphy_soft_reset

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: 0e1533a35669 ("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>
drivers/net/phy/phy_device.c