ustream-ssl: update to Git HEAD (2024-04-18)
[openwrt/openwrt.git] / target / linux / generic / backport-4.19 / 704-v4.20-net-phy-Stop-with-excessive-soft-reset.patch
1 From 1541649a9dd79e9b941d399de564475e426a2d0b Mon Sep 17 00:00:00 2001
2 From: Florian Fainelli <f.fainelli@gmail.com>
3 Date: Tue, 25 Sep 2018 11:28:45 -0700
4 Subject: [PATCH 602/660] net: phy: Stop with excessive soft reset
5
6 While consolidating the PHY reset in phy_init_hw() an unconditionaly
7 BMCR soft-reset I became quite trigger happy with those. This was later
8 on deactivated for the Generic PHY driver on the premise that a prior
9 software entity (e.g: bootloader) might have applied workarounds in
10 commit 0878fff1f42c ("net: phy: Do not perform software reset for
11 Generic PHY").
12
13 Since we have a hook to wire-up a soft_reset callback, just use that and
14 get rid of the call to genphy_soft_reset() entirely. This speeds up
15 initialization and link establishment for most PHYs out there that do
16 not require a reset.
17
18 Fixes: 87aa9f9c61ad ("net: phy: consolidate PHY reset in phy_init_hw()")
19 Tested-by: Wang, Dongsheng <dongsheng.wang@hxt-semitech.com>
20 Tested-by: Chris Healy <cphealy@gmail.com>
21 Tested-by: Andrew Lunn <andrew@lunn.ch>
22 Tested-by: Clemens Gruber <clemens.gruber@pqgruber.com>
23 Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
24 Signed-off-by: David S. Miller <davem@davemloft.net>
25 Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
26 ---
27 drivers/net/phy/phy_device.c | 2 --
28 1 file changed, 2 deletions(-)
29
30 --- a/drivers/net/phy/phy_device.c
31 +++ b/drivers/net/phy/phy_device.c
32 @@ -892,8 +892,6 @@ int phy_init_hw(struct phy_device *phyde
33
34 if (phydev->drv->soft_reset)
35 ret = phydev->drv->soft_reset(phydev);
36 - else
37 - ret = genphy_soft_reset(phydev);
38
39 if (ret < 0)
40 return ret;