1. 18 3月, 2020 1 次提交
    • H
      net: phy: improve phy_driver callback handle_interrupt · 9010f9de
      Heiner Kallweit 提交于
      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: NHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9010f9de
  2. 02 3月, 2020 1 次提交
  3. 21 1月, 2020 2 次提交
  4. 20 1月, 2020 1 次提交
  5. 26 12月, 2019 1 次提交
  6. 24 11月, 2019 1 次提交
  7. 19 11月, 2019 1 次提交
  8. 17 10月, 2019 1 次提交
    • Y
      net: phy: Fix "link partner" information disappear issue · 3de5ae54
      Yonglong Liu 提交于
      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: NYonglong Liu <liuyonglong@huawei.com>
      Reviewed-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3de5ae54
  9. 05 10月, 2019 1 次提交
  10. 06 9月, 2019 1 次提交
  11. 29 8月, 2019 1 次提交
  12. 28 8月, 2019 1 次提交
    • M
      Add genphy_c45_config_aneg() function to phy-c45.c · 94acaeb5
      Marco Hartmann 提交于
      Commit 34786005 ("net: phy: prevent PHYs w/o Clause 22 regs from calling
      genphy_config_aneg") introduced a check that aborts phy_config_aneg()
      if the phy is a C45 phy.
      This causes phy_state_machine() to call phy_error() so that the phy
      ends up in PHY_HALTED state.
      
      Instead of returning -EOPNOTSUPP, call genphy_c45_config_aneg()
      (analogous to the C22 case) so that the state machine can run
      correctly.
      
      genphy_c45_config_aneg() closely resembles mv3310_config_aneg()
      in drivers/net/phy/marvell10g.c, excluding vendor specific
      configurations for 1000BaseT.
      
      Fixes: 22b56e82 ("net: phy: replace genphy_10g_driver with genphy_c45_driver")
      Signed-off-by: NMarco Hartmann <marco.hartmann@nxp.com>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      94acaeb5
  13. 14 8月, 2019 1 次提交
  14. 09 7月, 2019 1 次提交
  15. 06 6月, 2019 1 次提交
  16. 01 6月, 2019 1 次提交
  17. 31 5月, 2019 3 次提交
  18. 08 5月, 2019 1 次提交
  19. 04 5月, 2019 1 次提交
  20. 19 4月, 2019 1 次提交
  21. 21 3月, 2019 1 次提交
    • H
      net: phy: improve handling link_change_notify callback · 5c5f626b
      Heiner Kallweit 提交于
      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=2Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5c5f626b
  22. 04 3月, 2019 1 次提交
  23. 15 2月, 2019 2 次提交
  24. 14 2月, 2019 1 次提交
  25. 07 2月, 2019 1 次提交
  26. 25 1月, 2019 4 次提交
  27. 23 1月, 2019 1 次提交
  28. 19 1月, 2019 3 次提交
  29. 17 1月, 2019 2 次提交
  30. 16 1月, 2019 1 次提交