]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: Stop with excessive soft reset
authorFlorian Fainelli <f.fainelli@gmail.com>
Tue, 25 Sep 2018 18:28:45 +0000 (11:28 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Sep 2018 03:26:45 +0000 (20:26 -0700)
commit86a764a5adf70b5cb723d7c539cb89a063c0ed9f
treeda667d2b9cabd10c61b44e219730cf21696e755b
parent2037c999d0dae1a375cc0fd3c6b58c341c4596ec
net: phy: Stop with excessive soft reset

While consolidating the PHY reset in phy_init_hw() an unconditionaly
BMCR soft-reset I became quite trigger happy with those. This was later
on deactivated for the Generic PHY driver on the premise that a prior
software entity (e.g: bootloader) might have applied workarounds in
commit cce28639d89c ("net: phy: Do not perform software reset for
Generic PHY").

Since we have a hook to wire-up a soft_reset callback, just use that and
get rid of the call to genphy_soft_reset() entirely. This speeds up
initialization and link establishment for most PHYs out there that do
not require a reset.

Fixes: e71dbe8eed35 ("net: phy: consolidate PHY reset in phy_init_hw()")
Tested-by: Wang, Dongsheng <dongsheng.wang@hxt-semitech.com>
Tested-by: Chris Healy <cphealy@gmail.com>
Tested-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Clemens Gruber <clemens.gruber@pqgruber.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy_device.c