1. 12 8月, 2019 1 次提交
    • H
      net: phy: prepare phylib to deal with PHY's extending Clause 22 · f4069cd7
      Heiner Kallweit 提交于
      The integrated PHY in 2.5Gbps chip RTL8125 is the first (known to me)
      PHY that uses standard Clause 22 for all modes up to 1Gbps and adds
      2.5Gbps control using vendor-specific registers. To use phylib for
      the standard part little extensions are needed:
      - Move most of genphy_config_aneg to a new function
        __genphy_config_aneg that takes a parameter whether restarting
        auto-negotiation is needed (depending on whether content of
        vendor-specific advertisement register changed).
      - Don't clear phydev->lp_advertising in genphy_read_status so that
        we can set non-C22 mode flags before.
      
      Basically both changes mimic the behavior of the equivalent Clause 45
      functions.
      Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f4069cd7
  2. 13 7月, 2019 1 次提交
  3. 09 7月, 2019 1 次提交
  4. 06 6月, 2019 1 次提交
  5. 31 5月, 2019 4 次提交
  6. 25 5月, 2019 1 次提交
  7. 04 5月, 2019 2 次提交
    • H
      net: phy: improve resuming from hibernation · f24098f8
      Heiner Kallweit 提交于
      I got an interesting report [0] that after resuming from hibernation
      the link has 100Mbps instead of 1Gbps. Reason is that another OS has
      been used whilst Linux was hibernated. And this OS speeds down the link
      due to WoL. Therefore, when resuming, we shouldn't expect that what
      the PHY advertises is what it did when hibernating.
      Easiest way to do this is removing state PHY_RESUMING. Instead always
      go via PHY_UP that configures PHY advertisement.
      
      [0] https://bugzilla.kernel.org/show_bug.cgi?id=202851Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f24098f8
    • H
      net: phy: improve pause handling · 22c0ef6b
      Heiner Kallweit 提交于
      When probing the phy device we set sym and asym pause in the "supported"
      bitmap (unless the PHY tells us otherwise). However we don't know yet
      whether the MAC supports pause. Simply copying phy->supported to
      phy->advertising will trigger advertising pause, and that's not
      what we want. Therefore add phy_advertise_supported() that copies all
      modes but doesn't touch the pause bits.
      
      In phy_support_(a)sym_pause we shouldn't set any bits in the supported
      bitmap because we may set a bit the PHY intentionally disabled.
      Effective pause support should be the AND-combined PHY and MAC pause
      capabilities. If the MAC supports everything, then it's only relevant
      what the PHY supports. If MAC supports sym pause only, then we have to
      clear the asym bit in phydev->supported.
      Copy the pause flags only and don't touch the modes, because a driver
      may have intentionally removed a mode from phydev->advertising.
      Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      22c0ef6b
  8. 09 4月, 2019 1 次提交
  9. 04 4月, 2019 1 次提交
  10. 03 4月, 2019 1 次提交
  11. 04 3月, 2019 4 次提交
  12. 24 2月, 2019 2 次提交
  13. 22 2月, 2019 2 次提交
  14. 18 2月, 2019 1 次提交
  15. 15 2月, 2019 1 次提交
  16. 14 2月, 2019 3 次提交
  17. 11 2月, 2019 1 次提交
  18. 10 2月, 2019 1 次提交
    • A
      net: phy: Add support for asking the PHY its abilities · efbdfdc2
      Andrew Lunn 提交于
      Add support for runtime determination of what the PHY supports, by
      adding a new function to the phy driver. The get_features call should
      set the phydev->supported member with the features the PHY supports.
      It is only called if phydrv->features is NULL.
      
      This requires minor changes to pause. The PHY driver should not set
      pause abilities, except for when it has odd cause capabilities, e.g.
      pause cannot be disabled. With this change, phydev->supported already
      contains the drivers abilities, including pause. So rather than
      considering phydrv->features, look at the phydev->supported, and
      enable pause if neither of the pause bits are already set.
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      [hkallweit1@gmail.com: fixed small checkpatch complaint in one comment]
      Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      efbdfdc2
  19. 08 2月, 2019 1 次提交
    • H
      net: phy: let genphy_c45_read_link manage the devices to check · 998a8a83
      Heiner Kallweit 提交于
      Let genphy_c45_read_link manage the devices to check, this removes
      overhead from callers. Add C22EXT to the list of excluded devices
      because it doesn't implement the status register. According to the
      802.3 clause 45 spec registers 29.0 - 29.4 are reserved.
      
      At the moment we have very few clause 45 PHY drivers, so we are
      lacking experience whether other drivers will have to exclude further
      devices, or may need to check PHY XS. If we should figure out that
      list of devices to check needs to be configurable, I think best will
      be to add a device list member to struct phy_driver.
      
      v2:
      - adjusted commit message
      - exclude also device C22EXT from link checking
      Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      998a8a83
  20. 07 2月, 2019 1 次提交
  21. 25 1月, 2019 1 次提交
  22. 20 1月, 2019 1 次提交
  23. 19 1月, 2019 2 次提交
  24. 18 1月, 2019 1 次提交
  25. 17 1月, 2019 1 次提交
  26. 28 12月, 2018 1 次提交
  27. 19 12月, 2018 1 次提交
    • H
      net: phy: improve phy state checking · 2b3e88ea
      Heiner Kallweit 提交于
      Add helpers phy_is_started() and __phy_is_started() to avoid open-coded
      checks whether PHY has been started. To make the check easier move
      PHY_HALTED before PHY_UP in enum phy_state. Further improvements:
      
      phy_start_aneg():
      Return -EBUSY and print warning if function is called from a non-started
      state (DOWN, READY, HALTED). Better check because function is exported
      and drivers may use it incorrectly.
      
      phy_interrupt():
      Return IRQ_NONE also if state is DOWN or READY. We should never receive
      an interrupt in one of these states, but better play safe.
      
      phy_stop():
      Just return and print a warning if PHY is in a non-started state.
      This warning should help to identify drivers with unbalanced calls to
      phy_start() / phy_stop().
      
      phy_state_machine():
      Schedule state machine run only if PHY is in a started state.
      E.g. if state is READY we don't need the state machine, it will be
      started by phy_start().
      
      v2:
      - don't use __func__ within phy_warn_state
      v3:
      - use WARN() instead of printing error message to facilitate debugging
      Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2b3e88ea
  28. 12 11月, 2018 1 次提交