1. 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
  2. 06 3月, 2017 1 次提交
  3. 20 2月, 2017 1 次提交
  4. 07 2月, 2017 2 次提交
  5. 26 1月, 2017 1 次提交
  6. 20 1月, 2017 1 次提交
  7. 09 12月, 2016 1 次提交
    • W
      phy: add phy fixup unregister functions · f38e7a32
      Woojung.Huh@microchip.com 提交于
      >From : Woojung Huh <woojung.huh@microchip.com>
      
      Add functions to unregister phy fixup for modules.
      
      int phy_unregister_fixup(const char *bus_id, u32 phy_uid, u32 phy_uid_mask)
      	Unregister phy fixup from phy_fixup_list per bus_id, phy_uid &
      	phy_uid_mask
      
      int phy_unregister_fixup_for_uid(u32 phy_uid, u32 phy_uid_mask)
      	Unregister phy fixup from phy_fixup_list.
      	Use it for fixup registered by phy_register_fixup_for_uid()
      
      int phy_unregister_fixup_for_id(const char *bus_id)
      	Unregister phy fixup from phy_fixup_list.
      	Use it for fixup registered by phy_register_fixup_for_id()
      Signed-off-by: NWoojung Huh <woojung.huh@microchip.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f38e7a32
  8. 02 12月, 2016 1 次提交
  9. 30 11月, 2016 1 次提交
  10. 19 11月, 2016 1 次提交
  11. 16 11月, 2016 1 次提交
  12. 13 11月, 2016 1 次提交
  13. 18 10月, 2016 2 次提交
  14. 17 10月, 2016 1 次提交
  15. 22 9月, 2016 1 次提交
  16. 11 5月, 2016 1 次提交
  17. 19 4月, 2016 1 次提交
  18. 14 3月, 2016 1 次提交
  19. 08 1月, 2016 11 次提交
  20. 31 12月, 2015 1 次提交
  21. 23 10月, 2015 1 次提交
  22. 03 10月, 2015 1 次提交
    • S
      phylib: Add phy_set_max_speed helper · f3a6bd39
      Simon Horman 提交于
      Add a helper to allow ethernet drivers to limit the speed of a phy
      (that they are attached to).
      
      This mainly involves factoring out the business-end of
      of_set_phy_supported() and exporting a new symbol.
      
      This code seems to be open coded in several places, in several different
      variants.
      
      It is is envisaged that this will be used in situations where setting the
      "max-speed" property in DT is not appropriate, e.g. because the maximum
      speed is not a property of the phy hardware.
      Signed-off-by: NSimon Horman <horms+renesas@verge.net.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f3a6bd39
  23. 25 9月, 2015 2 次提交
    • R
      phy: add phy_device_remove() · 38737e49
      Russell King 提交于
      Add a phy_device_remove() function to complement phy_device_register(),
      which undoes the effects of phy_device_register() by removing the phy
      device from visibility, but not freeing it.
      
      This allows these details to be moved out of the mdio bus code into
      the phy code where this action belongs.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      38737e49
    • R
      phy: fix mdiobus module safety · 3e3aaf64
      Russell King 提交于
      Re-implement the mdiobus module refcounting to ensure that we actually
      ensure that the mdiobus module code does not go away while we might call
      into it.
      
      The old scheme using bus->dev.driver was buggy, because bus->dev is a
      class device which never has a struct device_driver associated with it,
      and hence the associated code trying to obtain a refcount did nothing
      useful.
      
      Instead, take the approach that other subsystems do: pass the module
      when calling mdiobus_register(), and record that in the mii_bus struct.
      When we need to increment the module use count in the phy code, use
      this stored pointer.  When the phy is deteched, drop the module
      refcount, remembering that the phy device might go away at that point.
      
      This doesn't stop the mii_bus going away while there are in-use phys -
      it merely stops the underlying code vanishing.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3e3aaf64
  24. 01 9月, 2015 1 次提交
    • F
      net: phy: Allow PHY devices to identify themselves as Ethernet switches, etc. · 5a11dd7d
      Florian Fainelli 提交于
      Some Ethernet MAC drivers using the PHY library require the hardcoding
      of link parameters when interfaced to a switch device, SFP module,
      switch to switch port, etc. This has typically lead to various ad-hoc
      implementations looking like this:
      
      - using a "fixed PHY" emulated device, which will provide link
        indication towards the Ethernet MAC driver and hardware
      
      - pretend there is no PHY and hardcode link parameters, ala mv643x_eth
      
      Based on that, it is desireable to have the PHY drivers advertise the
      correct link parameters, just like regular Ethernet PHYs towards their
      CPU Ethernet MAC drivers, however, Ethernet MAC drivers should be able
      to tell whether this link should be monitored or not. In the context
      of an Ethernet switch, SFP module, switch to switch link, we do not
      need to monitor this link since it should be always up.
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5a11dd7d
  25. 11 7月, 2015 1 次提交
  26. 27 5月, 2015 1 次提交
  27. 15 5月, 2015 1 次提交