1. 25 4月, 2020 1 次提交
  2. 27 3月, 2020 2 次提交
  3. 24 3月, 2020 1 次提交
  4. 13 3月, 2020 1 次提交
  5. 27 2月, 2020 1 次提交
  6. 24 2月, 2020 1 次提交
    • F
      net: phy: Avoid multiple suspends · 503ba7c6
      Florian Fainelli 提交于
      It is currently possible for a PHY device to be suspended as part of a
      network device driver's suspend call while it is still being attached to
      that net_device, either via phy_suspend() or implicitly via phy_stop().
      
      Later on, when the MDIO bus controller get suspended, we would attempt
      to suspend again the PHY because it is still attached to a network
      device.
      
      This is both a waste of time and creates an opportunity for improper
      clock/power management bugs to creep in.
      
      Fixes: 803dd9c7 ("net: phy: avoid suspending twice a PHY")
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      503ba7c6
  7. 20 2月, 2020 1 次提交
    • P
      phy: avoid unnecessary link-up delay in polling mode · e96bd2d3
      Petr Oros 提交于
      commit 93c09704 ("net: phy: consider latched link-down status in
      polling mode") removed double-read of latched link-state register for
      polling mode from genphy_update_link(). This added extra ~1s delay into
      sequence link down->up.
      Following scenario:
       - After boot link goes up
       - phy_start() is called triggering an aneg restart, hence link goes
         down and link-down info is latched.
       - After aneg has finished link goes up. In phy_state_machine is checked
         link state but it is latched "link is down". The state machine is
         scheduled after one second and there is detected "link is up". This
         extra delay can be avoided when we keep link-state register double read
         in case when link was down previously.
      
      With this solution we don't miss a link-down event in polling mode and
      link-up is faster.
      
      Details about this quirky behavior on Realtek phy:
      Without patch:
      T0:    aneg is started, link goes down, link-down status is latched
      T0+3s: state machine runs, up-to-date link-down is read
      T0+4s: state machine runs, aneg is finished (BMSR_ANEGCOMPLETE==1),
             here i read link-down (BMSR_LSTATUS==0),
      T0+5s: state machine runs, aneg is finished (BMSR_ANEGCOMPLETE==1),
             up-to-date link-up is read (BMSR_LSTATUS==1),
             phydev->link goes up, state change PHY_NOLINK to PHY_RUNNING
      
      With patch:
      T0:    aneg is started, link goes down, link-down status is latched
      T0+3s: state machine runs, up-to-date link-down is read
      T0+4s: state machine runs, aneg is finished (BMSR_ANEGCOMPLETE==1),
             first BMSR read: BMSR_ANEGCOMPLETE==1 and BMSR_LSTATUS==0,
             second BMSR read: BMSR_ANEGCOMPLETE==1 and BMSR_LSTATUS==1,
             phydev->link goes up, state change PHY_NOLINK to PHY_RUNNING
      Signed-off-by: NPetr Oros <poros@redhat.com>
      Reviewed-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e96bd2d3
  8. 17 2月, 2020 2 次提交
  9. 15 1月, 2020 1 次提交
  10. 26 12月, 2019 2 次提交
  11. 21 12月, 2019 1 次提交
  12. 20 12月, 2019 3 次提交
  13. 24 11月, 2019 1 次提交
  14. 19 11月, 2019 2 次提交
    • R
      net: phy: avoid matching all-ones clause 45 PHY IDs · b95e86d8
      Russell King 提交于
      We currently match clause 45 PHYs using any ID read from a MMD marked
      as present in the "Devices in package" registers 5 and 6.  However,
      this is incorrect.  45.2 says:
      
        "The definition of the term package is vendor specific and could be
         a chip, module, or other similar entity."
      
      so a package could be more or less than the whole PHY - a PHY could be
      made up of several modules instantiated onto a single chip such as the
      Marvell 88x3310, or some of the MMDs could be disabled according to
      chip configuration, such as the Broadcom 84881.
      
      In the case of Broadcom 84881, the "Devices in package" registers
      contain 0xc000009b, meaning that there is a PHYXS present in the
      package, but all registers in MMD 4 return 0xffff.  This leads to our
      matching code incorrectly binding this PHY to one of our generic PHY
      drivers.
      
      This patch changes the way we determine whether to attempt to match a
      MMD identifier, or use it to request a module - if the identifier is
      all-ones, then we skip over it. When reading the identifiers, we
      initialise phydev->c45_ids.device_ids to all-ones, only reading the
      device ID if the "Devices in package" registers indicates we should.
      
      This avoids the generic drivers incorrectly matching on a PHY ID of
      0xffffffff.
      Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b95e86d8
    • R
      net: phy: add core phylib sfp support · 298e54fa
      Russell King 提交于
      Add core phylib help for supporting SFP sockets on PHYs.  This provides
      a mechanism to inform the SFP layer about PHY up/down events, and also
      unregister the SFP bus when the PHY is going away.
      Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      298e54fa
  15. 24 10月, 2019 2 次提交
  16. 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
  17. 05 10月, 2019 1 次提交
  18. 18 8月, 2019 1 次提交
  19. 16 8月, 2019 1 次提交
  20. 14 8月, 2019 1 次提交
  21. 12 8月, 2019 2 次提交
  22. 03 8月, 2019 1 次提交
  23. 13 7月, 2019 1 次提交
  24. 15 6月, 2019 1 次提交
  25. 07 6月, 2019 1 次提交
  26. 31 5月, 2019 1 次提交
  27. 30 5月, 2019 4 次提交
  28. 23 5月, 2019 1 次提交
  29. 05 5月, 2019 1 次提交
    • H
      net: phy: fix phy_validate_pause · b4010af9
      Heiner Kallweit 提交于
      We have valid scenarios where ETHTOOL_LINK_MODE_Pause_BIT doesn't
      need to be supported. Therefore extend the first check to check
      for rx_pause being set.
      
      See also phy_set_asym_pause:
      rx=0 and tx=1: advertise asym pause only
      rx=0 and tx=0: stop advertising both pause modes
      
      The fixed commit isn't wrong, it's just the one that introduced the
      linkmode bitmaps.
      
      Fixes: 3c1bcc86 ("net: ethernet: Convert phydev advertize and supported from u32 to link mode")
      Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b4010af9