Skip to content
Snippets Groups Projects
  1. Mar 24, 2020
    • Heiner Kallweit's avatar
      net: phy: add and use phy_check_downshift · 5eee3bb7
      Heiner Kallweit authored
      
      So far PHY drivers have to check whether a downshift occurred to be
      able to notify the user. To make life of drivers authors a little bit
      easier move the downshift notification to phylib. phy_check_downshift()
      compares the highest mutually advertised speed with the actual value
      of phydev->speed (typically read by the PHY driver from a
      vendor-specific register) to detect a downshift.
      
      v2:
      - Add downshift hint to phy_print_status
      
      Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5eee3bb7
  2. Mar 18, 2020
    • Heiner Kallweit's avatar
      net: phy: improve phy_driver callback handle_interrupt · 9010f9de
      Heiner Kallweit authored
      
      did_interrupt() clears the interrupt, therefore handle_interrupt() can
      not check which event triggered the interrupt. To overcome this
      constraint and allow more flexibility for customer interrupt handlers,
      let's decouple handle_interrupt() from parts of the phylib interrupt
      handling. Custom interrupt handlers now have to implement the
      did_interrupt() functionality in handle_interrupt() if needed.
      
      Fortunately we have just one custom interrupt handler so far (in the
      mscc PHY driver), convert it to the changed API.
      
      Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9010f9de
  3. Mar 02, 2020
  4. Jan 21, 2020
  5. Jan 20, 2020
  6. Dec 26, 2019
  7. Nov 23, 2019
  8. Nov 19, 2019
  9. Oct 16, 2019
    • Yonglong Liu's avatar
      net: phy: Fix "link partner" information disappear issue · 3de5ae54
      Yonglong Liu authored
      
      Some drivers just call phy_ethtool_ksettings_set() to set the
      links, for those phy drivers that use genphy_read_status(), if
      autoneg is on, and the link is up, than execute "ethtool -s
      ethx autoneg on" will cause "link partner" information disappear.
      
      The call trace is phy_ethtool_ksettings_set()->phy_start_aneg()
      ->linkmode_zero(phydev->lp_advertising)->genphy_read_status(),
      the link didn't change, so genphy_read_status() just return, and
      phydev->lp_advertising is zero now.
      
      This patch moves the clear operation of lp_advertising from
      phy_start_aneg() to genphy_read_lpa()/genphy_c45_read_lpa(), and
      if autoneg on and autoneg not complete, just clear what the
      generic functions care about.
      
      Fixes: 88d6272a ("net: phy: avoid unneeded MDIO reads in genphy_read_status")
      Signed-off-by: default avatarYonglong Liu <liuyonglong@huawei.com>
      Reviewed-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3de5ae54
  10. Oct 05, 2019
  11. Sep 06, 2019
  12. Aug 28, 2019
  13. Aug 14, 2019
  14. Jul 09, 2019
  15. Jun 06, 2019
  16. May 31, 2019
  17. May 30, 2019
  18. May 07, 2019
  19. May 04, 2019
  20. Apr 18, 2019
  21. Mar 20, 2019
    • Heiner Kallweit's avatar
      net: phy: improve handling link_change_notify callback · 5c5f626b
      Heiner Kallweit authored
      Currently the Phy driver's link_change_notify callback is called
      whenever the state machine is run (every second if polling), no matter
      whether the state changed or not. This isn't needed and may confuse
      users considering the name of the callback. Actually it contradicts
      its kernel-doc description. Therefore let's change the behavior and
      call this callback only in case of an actual state change.
      
      This requires changes to the at803x and rockchip drivers.
      at803x can be simplified so that it reacts on a state change to
      PHY_NOLINK only.
      The rockchip driver can also be much simplified. We simply re-init
      the AFE/DSP registers whenever we change to PHY_RUNNING and speed
      is 100Mbps. This causes very small overhead because we do this even
      if the speed was 100Mbps already. But this is negligible and
      I think justified by the much simpler code.
      
      Changes are compile-tested only.
      
      A little bit problematic seems to be to find somebody with the
      hardware to test the changes to the two PHY drivers. See also [0].
      David may be able to test the Rockchip driver.
      
      [0] https://marc.info/?t=153782508800006&r=1&w=2
      
      
      
      Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5c5f626b
  22. Mar 04, 2019
  23. Feb 14, 2019
  24. Feb 06, 2019
  25. Jan 25, 2019
  26. Jan 23, 2019
  27. Jan 18, 2019
  28. Jan 17, 2019
Loading