1. 28 2月, 2022 1 次提交
  2. 23 2月, 2022 1 次提交
  3. 20 2月, 2022 1 次提交
  4. 05 2月, 2022 1 次提交
  5. 16 12月, 2021 2 次提交
  6. 10 12月, 2021 1 次提交
    • R
      net: phylink: use legacy_pre_march2020 · 001f4261
      Russell King (Oracle) 提交于
      Use the legacy flag to indicate whether we should operate in legacy
      mode. This allows us to stop using the presence of a PCS as an
      indicator to the age of the phylink user, and make PCS presence
      optional.
      
      Legacy mode involves:
      1) calling mac_config() whenever the link comes up
      2) calling mac_config() whenever the inband advertisement changes,
         possibly followed by a call to mac_an_restart()
      3) making use of mac_an_restart()
      4) making use of mac_pcs_get_state()
      
      All the above functionality was moved to a seperate "PCS" block of
      operations in March 2020.
      
      Update the documents to indicate that the differences that this flag
      makes.
      Signed-off-by: NRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      001f4261
  7. 08 12月, 2021 1 次提交
  8. 02 12月, 2021 1 次提交
  9. 25 11月, 2021 2 次提交
    • R
      net: phylink: Force retrigger in case of latched link-fail indicator · dbae3388
      Russell King (Oracle) 提交于
      On mv88e6xxx 1G/2.5G PCS, the SerDes register 4.2001.2 has the following
      description:
        This register bit indicates when link was lost since the last
        read. For the current link status, read this register
        back-to-back.
      
      Thus to get current link state, we need to read the register twice.
      
      But doing that in the link change interrupt handler would lead to
      potentially ignoring link down events, which we really want to avoid.
      
      Thus this needs to be solved in phylink's resolve, by retriggering
      another resolve in the event when PCS reports link down and previous
      link was up, and by re-reading PCS state if the previous link was down.
      
      The wrong value is read when phylink requests change from sgmii to
      2500base-x mode, and link won't come up. This fixes the bug.
      
      Fixes: 9525ae83 ("phylink: add phylink infrastructure")
      Signed-off-by: NRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
      Signed-off-by: NMarek Behún <kabel@kernel.org>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      dbae3388
    • R
      net: phylink: Force link down and retrigger resolve on interface change · 80662f4f
      Russell King (Oracle) 提交于
      On PHY state change the phylink_resolve() function can read stale
      information from the MAC and report incorrect link speed and duplex to
      the kernel message log.
      
      Example with a Marvell 88X3310 PHY connected to a SerDes port on Marvell
      88E6393X switch:
      - PHY driver triggers state change due to PHY interface mode being
        changed from 10gbase-r to 2500base-x due to copper change in speed
        from 10Gbps to 2.5Gbps, but the PHY itself either hasn't yet changed
        its interface to the host, or the interrupt about loss of SerDes link
        hadn't arrived yet (there can be a delay of several milliseconds for
        this), so we still think that the 10gbase-r mode is up
      - phylink_resolve()
        - phylink_mac_pcs_get_state()
          - this fills in speed=10g link=up
        - interface mode is updated to 2500base-x but speed is left at 10Gbps
        - phylink_major_config()
          - interface is changed to 2500base-x
        - phylink_link_up()
          - mv88e6xxx_mac_link_up()
            - .port_set_speed_duplex()
              - speed is set to 10Gbps
          - reports "Link is Up - 10Gbps/Full" to dmesg
      
      Afterwards when the interrupt finally arrives for mv88e6xxx, another
      resolve is forced in which we get the correct speed from
      phylink_mac_pcs_get_state(), but since the interface is not being
      changed anymore, we don't call phylink_major_config() but only
      phylink_mac_config(), which does not set speed/duplex anymore.
      
      To fix this, we need to force the link down and trigger another resolve
      on PHY interface change event.
      
      Fixes: 9525ae83 ("phylink: add phylink infrastructure")
      Signed-off-by: NRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
      Signed-off-by: NMarek Behún <kabel@kernel.org>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      80662f4f
  10. 22 11月, 2021 2 次提交
  11. 19 11月, 2021 1 次提交
  12. 17 11月, 2021 1 次提交
  13. 15 11月, 2021 1 次提交
  14. 29 10月, 2021 1 次提交
    • R
      net: phylink: avoid mvneta warning when setting pause parameters · fd8d9731
      Russell King (Oracle) 提交于
      mvneta does not support asymetric pause modes, and it flags this by the
      lack of AsymPause in the supported field. When setting pause modes, we
      check that pause->rx_pause == pause->tx_pause, but only when pause
      autoneg is enabled. When pause autoneg is disabled, we still allow
      pause->rx_pause != pause->tx_pause, which is incorrect when the MAC
      does not support asymetric pause, and causes mvneta to issue a warning.
      
      Fix this by removing the test for pause->autoneg, so we always check
      that pause->rx_pause == pause->tx_pause for network devices that do not
      support AsymPause.
      
      Fixes: 9525ae83 ("phylink: add phylink infrastructure")
      Signed-off-by: NRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fd8d9731
  15. 26 10月, 2021 1 次提交
  16. 24 10月, 2021 1 次提交
  17. 19 10月, 2021 2 次提交
    • R
      net: phylink: Support disabling autonegotiation for PCS · 92817dad
      Robert Hancock 提交于
      The auto-negotiation state in the PCS as set by
      phylink_mii_c22_pcs_config was previously always enabled when the
      driver is configured for in-band autonegotiation, even if
      autonegotiation was disabled on the interface with ethtool. Update the
      code to set the BMCR_ANENABLE bit based on the interface's
      autonegotiation enabled state.
      
      Update phylink_mii_c22_pcs_get_state to not check
      autonegotiation-related fields when autonegotiation is disabled.
      
      Update phylink_mac_pcs_get_state to initialize the state based on the
      interface's configured speed, duplex and pause parameters rather than
      to unknown when autonegotiation is disabled, before calling the
      driver's pcs_get_state functions, as they are not likely to provide
      meaningful data for these fields when autonegotiation is disabled. In
      this case the driver is really just filling in the link state field.
      
      Note that in cases where there is a downstream PHY connected, such as
      with SGMII and a copper PHY, the configuration set by ethtool is
      handled by phy_ethtool_ksettings_set and not propagated to the PCS.
      This is correct since SGMII or 1000Base-X autonegotiation with the PCS
      should normally still be used even if the copper side has disabled it.
      Signed-off-by: NRobert Hancock <robert.hancock@calian.com>
      Signed-off-by: NRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      92817dad
    • R
      net: phylink: rejig SFP interface selection in ksettings_set() · dc90604b
      Russell King (Oracle) 提交于
      Commit ea269a6f ("net: phylink: Update SFP selected interface on
      advertising changes") added a better solution to selecting the
      interface mode for SFPs using the advertisement mask. This method will
      work for mvneta and mvpp2 when selecting between 2500base-X and
      1000base-X without needing to use the basex helper, or indicate that
      we support both 1000base-X and 2500base-X when in either of these two
      interface modes.
      
      Hence, we need to eliminate the validation prior to selecting the
      interface, otherwise when we clean up mvneta's validation function, we
      will end up locking to 2500base-X as we validate with an interface mode
      of PHY_INERFACE_MODE_2500BASEX.
      
      The supported mask will already have been reduced down to the union of
      support for the SFP and MAC already, so we can be confident that the
      advertisement mask is already appropriately restricted. We only need to
      select the appropriate interface, and then revalidate with the new
      interface mode.
      
      We get rid of the check for pl->sfp_port too, this is meaningless here
      as it doesn't get cleared when a module is removed, so it doesn't
      indicate if a module is present. Just rely on pl->sfp_bus.
      Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      dc90604b
  18. 07 10月, 2021 1 次提交
  19. 04 10月, 2021 1 次提交
  20. 19 9月, 2021 1 次提交
  21. 08 9月, 2021 1 次提交
    • N
      net: phylink: Update SFP selected interface on advertising changes · ea269a6f
      Nathan Rossi 提交于
      Currently changes to the advertising state via ethtool do not cause any
      reselection of the configured interface mode after the SFP is already
      inserted and initially configured.
      
      While it is not typical to change the advertised link modes for an
      interface using an SFP in certain use cases it is desirable. In the case
      of a SFP port that is capable of handling both SFP and SFP+ modules it
      will automatically select between 1G and 10G modes depending on the
      supported mode of the SFP. However if the SFP module is capable of
      working in multiple modes (e.g. a SFP+ DAC that can operate at 1G or
      10G), one end of the cable may be attached to a SFP 1000base-x port thus
      the SFP+ end must be manually configured to the 1000base-x mode in order
      for the link to be established.
      
      This change causes the ethtool setting of advertised mode changes to
      reselect the interface mode so that the link can be established.
      Additionally when a module is inserted the advertising mode is reset to
      match the supported modes of the module.
      Signed-off-by: NNathan Rossi <nathan.rossi@digi.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ea269a6f
  22. 07 9月, 2021 1 次提交
  23. 21 7月, 2021 1 次提交
  24. 20 7月, 2021 1 次提交
  25. 17 6月, 2021 2 次提交
  26. 13 6月, 2021 1 次提交
  27. 12 6月, 2021 2 次提交
  28. 16 3月, 2021 2 次提交
  29. 17 2月, 2021 1 次提交
  30. 18 11月, 2020 1 次提交
  31. 28 10月, 2020 1 次提交
  32. 01 9月, 2020 2 次提交