1. 15 1月, 2020 1 次提交
  2. 26 12月, 2019 2 次提交
  3. 21 12月, 2019 1 次提交
  4. 20 12月, 2019 3 次提交
  5. 24 11月, 2019 1 次提交
  6. 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
  7. 24 10月, 2019 2 次提交
  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. 18 8月, 2019 1 次提交
  11. 16 8月, 2019 1 次提交
  12. 14 8月, 2019 1 次提交
  13. 12 8月, 2019 2 次提交
  14. 03 8月, 2019 1 次提交
  15. 13 7月, 2019 1 次提交
  16. 15 6月, 2019 1 次提交
  17. 07 6月, 2019 1 次提交
  18. 31 5月, 2019 1 次提交
  19. 30 5月, 2019 4 次提交
  20. 23 5月, 2019 1 次提交
  21. 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
  22. 04 5月, 2019 1 次提交
    • 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
  23. 29 4月, 2019 1 次提交
  24. 26 4月, 2019 1 次提交
    • H
      net: phy: improve genphy_soft_reset · 8c90b795
      Heiner Kallweit 提交于
      PHY's behave differently when being reset. Some reset registers to
      defaults, some don't. Some trigger an autoneg restart, some don't.
      
      So let's also set the autoneg restart bit when resetting. Then PHY
      behavior should be more consistent. Clearing BMCR_ISOLATE serves the
      same purpose and is borrowed from genphy_restart_aneg.
      
      BMCR holds the speed / duplex settings in fixed mode. Therefore
      we may have an issue if a soft reset resets BMCR to its default.
      So better call genphy_setup_forced() afterwards in fixed mode.
      We've seen no related complaint in the last >10 yrs, so let's
      treat it as an improvement.
      Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8c90b795
  25. 19 4月, 2019 1 次提交
  26. 09 4月, 2019 3 次提交
  27. 05 4月, 2019 1 次提交
  28. 04 4月, 2019 1 次提交
  29. 03 4月, 2019 1 次提交