704-v4.20-net-phy-Stop-with-excessive-soft-reset.patch 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. From 1541649a9dd79e9b941d399de564475e426a2d0b Mon Sep 17 00:00:00 2001
  2. From: Florian Fainelli <[email protected]>
  3. Date: Tue, 25 Sep 2018 11:28:45 -0700
  4. Subject: [PATCH 602/660] net: phy: Stop with excessive soft reset
  5. While consolidating the PHY reset in phy_init_hw() an unconditionaly
  6. BMCR soft-reset I became quite trigger happy with those. This was later
  7. on deactivated for the Generic PHY driver on the premise that a prior
  8. software entity (e.g: bootloader) might have applied workarounds in
  9. commit 0878fff1f42c ("net: phy: Do not perform software reset for
  10. Generic PHY").
  11. Since we have a hook to wire-up a soft_reset callback, just use that and
  12. get rid of the call to genphy_soft_reset() entirely. This speeds up
  13. initialization and link establishment for most PHYs out there that do
  14. not require a reset.
  15. Fixes: 87aa9f9c61ad ("net: phy: consolidate PHY reset in phy_init_hw()")
  16. Tested-by: Wang, Dongsheng <[email protected]>
  17. Tested-by: Chris Healy <[email protected]>
  18. Tested-by: Andrew Lunn <[email protected]>
  19. Tested-by: Clemens Gruber <[email protected]>
  20. Signed-off-by: Florian Fainelli <[email protected]>
  21. Signed-off-by: David S. Miller <[email protected]>
  22. Signed-off-by: Russell King <[email protected]>
  23. ---
  24. drivers/net/phy/phy_device.c | 2 --
  25. 1 file changed, 2 deletions(-)
  26. --- a/drivers/net/phy/phy_device.c
  27. +++ b/drivers/net/phy/phy_device.c
  28. @@ -886,8 +886,6 @@ int phy_init_hw(struct phy_device *phyde
  29. if (phydev->drv->soft_reset)
  30. ret = phydev->drv->soft_reset(phydev);
  31. - else
  32. - ret = genphy_soft_reset(phydev);
  33. if (ret < 0)
  34. return ret;