1. 04 1月, 2018 3 次提交
  2. 03 1月, 2018 2 次提交
  3. 14 12月, 2017 1 次提交
    • R
      phylib: add reset after clk enable support · a9668491
      Richard Leitner 提交于
      Some PHYs need the refclk to be a continuous clock. Therefore they don't
      allow turning it off and on again during operation. Nonetheless such a
      clock switching is performed by some ETH drivers (namely FEC [1]) for
      power saving reasons. An example for an affected PHY is the
      SMSC/Microchip LAN8720 in "REF_CLK In Mode".
      
      In order to provide a uniform method to overcome this problem this patch
      adds a new phy_driver flag (PHY_RST_AFTER_CLK_EN) and corresponding
      function phy_reset_after_clk_enable() to the phylib. These should be
      used to trigger reset of the PHY after the refclk is switched on again.
      
      [1] commit e8fcfcd5 ("net: fec: optimize the clock management to save power")
      Signed-off-by: NRichard Leitner <richard.leitner@skidata.com>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a9668491
  4. 06 12月, 2017 2 次提交
  5. 04 12月, 2017 1 次提交
  6. 02 12月, 2017 1 次提交
  7. 30 11月, 2017 1 次提交
  8. 08 11月, 2017 1 次提交
  9. 07 8月, 2017 4 次提交
    • R
      phylink: add phylink infrastructure · 9525ae83
      Russell King 提交于
      The link between the ethernet MAC and its PHY has become more complex
      as the interface evolves.  This is especially true with serdes links,
      where the part of the PHY is effectively integrated into the MAC.
      
      Serdes links can be connected to a variety of devices, including SFF
      modules soldered down onto the board with the MAC, a SFP cage with
      a hotpluggable SFP module which may contain a PHY or directly modulate
      the serdes signals onto optical media with or without a PHY, or even
      a classical PHY connection.
      
      Moreover, the negotiation information on serdes links comes in two
      varieties - SGMII mode, where the PHY provides its speed/duplex/flow
      control information to the MAC, and 1000base-X mode where both ends
      exchange their abilities and each resolve the link capabilities.
      
      This means we need a more flexible means to support these arrangements,
      particularly with the hotpluggable nature of SFP, where the PHY can
      be attached or detached after the network device has been brought up.
      
      Ethtool information can come from multiple sources:
      - we may have a PHY operating in either SGMII or 1000base-X mode, in
        which case we take ethtool/mii data directly from the PHY.
      - we may have a optical SFP module without a PHY, with the MAC
        operating in 1000base-X mode - the ethtool/mii data needs to come
        from the MAC.
      - we may have a copper SFP module with a PHY whic can't be accessed,
        which means we need to take ethtool/mii data from the MAC.
      
      Phylink aims to solve this by providing an intermediary between the
      MAC and PHY, providing a safe way for PHYs to be hotplugged, and
      allowing a SFP driver to reconfigure the serdes connection.
      
      Phylink also takes over support of fixed link connections, where the
      speed/duplex/flow control are fixed, but link status may be controlled
      by a GPIO signal.  By avoiding the fixed-phy implementation, phylink
      can provide a faster response to link events: fixed-phy has to wait for
      phylib to operate its state machine, which can take several seconds.
      In comparison, phylink takes milliseconds.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      
      - remove sync status
      - rework supported and advertisment handling
      - add 1000base-x speed for fixed links
      - use functionality exported from phy-core, reworking
        __phylink_ethtool_ksettings_set for it
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9525ae83
    • R
      net: phy: provide a hook for link up/link down events · a81497be
      Russell King 提交于
      Sometimes, we need to do additional work between the PHY coming up and
      marking the carrier present - for example, we may need to wait for the
      PHY to MAC link to finish negotiation.  This changes phylib to provide
      a notification function pointer which avoids the built-in
      netif_carrier_on() and netif_carrier_off() functions.
      
      Standard ->adjust_link functionality is provided by hooking a helper
      into the new ->phy_link_change method.
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a81497be
    • R
      net: phy: move phy_lookup_setting() and guts of phy_supported_speeds() to phy-core · 0ccb4fc6
      Russell King 提交于
      phy_lookup_setting() provides useful functionality in ethtool code
      outside phylib.  Move it to phy-core and allow it to be re-used (eg,
      in phylink) rather than duplicated elsewhere.  Note that this supports
      the larger linkmode space.
      
      As we move the phy settings table, we also need to move the guts of
      phy_supported_speeds() as well.
      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>
      0ccb4fc6
    • R
      net: phy: split out PHY speed and duplex string generation · da4625ac
      Russell King 提交于
      Other code would like to make use of this, so make the speed and duplex
      string generation visible, and place it in a separate file.
      Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      da4625ac
  10. 26 7月, 2017 1 次提交
  11. 03 7月, 2017 1 次提交
  12. 24 6月, 2017 1 次提交
  13. 14 6月, 2017 2 次提交
  14. 07 6月, 2017 4 次提交
  15. 28 5月, 2017 1 次提交
  16. 20 5月, 2017 1 次提交
  17. 17 5月, 2017 1 次提交
  18. 27 4月, 2017 1 次提交
    • A
      net: phy: fix auto-negotiation stall due to unavailable interrupt · f555f34f
      Alexander Kochetkov 提交于
      The Ethernet link on an interrupt driven PHY was not coming up if the Ethernet
      cable was plugged before the Ethernet interface was brought up.
      
      The patch trigger PHY state machine to update link state if PHY was requested to
      do auto-negotiation and auto-negotiation complete flag already set.
      
      During power-up cycle the PHY do auto-negotiation, generate interrupt and set
      auto-negotiation complete flag. Interrupt is handled by PHY state machine but
      doesn't update link state because PHY is in PHY_READY state. After some time
      MAC bring up, start and request PHY to do auto-negotiation. If there are no new
      settings to advertise genphy_config_aneg() doesn't start PHY auto-negotiation.
      PHY continue to stay in auto-negotiation complete state and doesn't fire
      interrupt. At the same time PHY state machine expect that PHY started
      auto-negotiation and is waiting for interrupt from PHY and it won't get it.
      
      Fixes: 321beec5 ("net: phy: Use interrupts when available in NOLINK state")
      Signed-off-by: NAlexander Kochetkov <al.kochet@gmail.com>
      Cc: stable <stable@vger.kernel.org> # v4.9+
      Tested-by: NRoger Quadros <rogerq@ti.com>
      Tested-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f555f34f
  19. 25 4月, 2017 1 次提交
    • R
      mdio_bus: Issue GPIO RESET to PHYs. · 69226896
      Roger Quadros 提交于
      Some boards [1] leave the PHYs at an invalid state
      during system power-up or reset thus causing unreliability
      issues with the PHY which manifests as PHY not being detected
      or link not functional. To fix this, these PHYs need to be RESET
      via a GPIO connected to the PHY's RESET pin.
      
      Some boards have a single GPIO controlling the PHY RESET pin of all
      PHYs on the bus whereas some others have separate GPIOs controlling
      individual PHY RESETs.
      
      In both cases, the RESET de-assertion cannot be done in the PHY driver
      as the PHY will not probe till its reset is de-asserted.
      So do the RESET de-assertion in the MDIO bus driver.
      
      [1] - am572x-idk, am571x-idk, a437x-idk
      Signed-off-by: NRoger Quadros <rogerq@ti.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      69226896
  20. 25 3月, 2017 1 次提交
    • F
      net: phy: Allow splitting MDIO bus/device support from PHYs · 90eff909
      Florian Fainelli 提交于
      Introduce a new configuration symbol: MDIO_DEVICE which allows building
      the MDIO devices and bus code, without pulling in the entire Ethernet
      PHY library and devices code.
      
      PHYLIB nows select MDIO_DEVICE and the relevant Makefile files are
      updated to reflect that.
      
      When MDIO_DEVICE (MDIO bus/device only) is selected, but not PHYLIB, we
      have mdio-bus.ko as a loadable module, and it does not have a
      module_exit() function because the safety of removing a bus class is
      unclear.
      
      When both MDIO_DEVICE and PHYLIB are enabled, we need to assemble
      everything into a common loadable module: libphy.ko because of nasty
      circular dependencies between phy.c, phy_device.c and mdio_bus.c which
      are really tough to untangle.
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      90eff909
  21. 23 3月, 2017 3 次提交
  22. 06 3月, 2017 1 次提交
  23. 20 2月, 2017 1 次提交
  24. 07 2月, 2017 2 次提交
  25. 26 1月, 2017 1 次提交
  26. 20 1月, 2017 1 次提交