1. 02 3月, 2016 1 次提交
  2. 09 2月, 2016 1 次提交
  3. 29 1月, 2016 2 次提交
  4. 13 1月, 2016 1 次提交
  5. 08 1月, 2016 5 次提交
  6. 25 9月, 2015 1 次提交
    • R
      of_mdio: fix MDIO phy device refcounting · f018ae7a
      Russell King 提交于
      bus_find_device() is defined as:
      
       * This is similar to the bus_for_each_dev() function above, but it
       * returns a reference to a device that is 'found' for later use, as
       * determined by the @match callback.
      
      and it does indeed return a reference-counted pointer to the device:
      
              while ((dev = next_device(&i)))
                      if (match(dev, data) && get_device(dev))
                                              ^^^^^^^^^^^^^^^
                              break;
              klist_iter_exit(&i);
              return dev;
      
      What that means is that when we're done with the struct device, we must
      drop that reference.  Neither of_phy_connect() nor of_phy_attach() did
      this when phy_connect_direct() or phy_attach_direct() failed.
      
      With our previous patch, phy_connect_direct() and phy_attach_direct()
      take a new refcount on the phy device when successful, so we can drop
      our local reference immediatley after these functions, whether or not
      they succeeded.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Acked-by: NRob Herring <robh@kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f018ae7a
  7. 01 9月, 2015 1 次提交
  8. 22 7月, 2015 1 次提交
    • S
      of_mdio: add new DT property 'managed' to specify the PHY management type · 4cba5c21
      Stas Sergeev 提交于
      Currently the PHY management type is selected by the MAC driver arbitrary.
      The decision is based on the presence of the "fixed-link" node and on a
      will of the driver's authors.
      This caused a regression recently, when mvneta driver suddenly started
      to use the in-band status for auto-negotiation on fixed links.
      It appears the auto-negotiation may not work when expected by the MAC driver.
      Sebastien Rannou explains:
      << Yes, I confirm that my HW does not generate an in-band status. AFAIK, it's
      a PHY that aggregates 4xSGMIIs to 1xQSGMII ; the MAC side of the PHY (with
      inband status) is connected to the switch through QSGMII, and in this context
      we are on the media side of the PHY. >>
      https://lkml.org/lkml/2015/7/10/206
      
      This patch introduces the new string property 'managed' that allows
      the user to set the management type explicitly.
      The supported values are:
      "auto" - default. Uses either MDIO or nothing, depending on the presence
      of the fixed-link node
      "in-band-status" - use in-band status
      Signed-off-by: NStas Sergeev <stsp@users.sourceforge.net>
      
      CC: Rob Herring <robh+dt@kernel.org>
      CC: Pawel Moll <pawel.moll@arm.com>
      CC: Mark Rutland <mark.rutland@arm.com>
      CC: Ian Campbell <ijc+devicetree@hellion.org.uk>
      CC: Kumar Gala <galak@codeaurora.org>
      CC: Florian Fainelli <f.fainelli@gmail.com>
      CC: Grant Likely <grant.likely@linaro.org>
      CC: devicetree@vger.kernel.org
      CC: linux-kernel@vger.kernel.org
      CC: netdev@vger.kernel.org
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4cba5c21
  9. 15 5月, 2015 1 次提交
    • F
      of: mdio: Add a "broken-turn-around" property · ab6016e0
      Florian Fainelli 提交于
      Some Ethernet PHY devices/switches may not properly release the MDIO bus
      during turn-around time, and fail to drive it low, which can be seen by
      some controllers as a read failure, while the data clocked in is still
      correct.
      
      Add a boolean property "broken-turn-around" which is parsed by the
      generic MDIO bus probing code and will set the corresponding bit in the
      MDIO bus phy_ignore_ta_mask bitmask for MDIO bus drivers to utilize that
      information.
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ab6016e0
  10. 12 3月, 2015 1 次提交
  11. 08 10月, 2014 1 次提交
    • P
      net: phy: adjust fixed_phy_register() return value · fd2ef0ba
      Petri Gynther 提交于
      Adjust fixed_phy_register() to return struct phy_device *, so that
      it becomes easy to use fixed PHYs without device tree support:
      
        phydev = fixed_phy_register(PHY_POLL, &fixed_phy_status, NULL);
        fixed_phy_set_link_update(phydev, fixed_phy_link_update);
        phy_connect_direct(netdev, phydev, handler_fn, phy_interface);
      
      This change is a prerequisite for modifying bcmgenet driver to work
      without a device tree on Broadcom's MIPS-based 7xxx platforms.
      Signed-off-by: NPetri Gynther <pgynther@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fd2ef0ba
  12. 20 9月, 2014 1 次提交
    • F
      of: mdio: honor flags passed to of_phy_connect · 2f637151
      Florian Fainelli 提交于
      Commit f9a8f83b ("net: phy: remove flags argument from phy_{attach,
      connect, connect_direct}") removed the flags argument to the PHY library
      calls to: phy_{attach,connect,connect_direct}.
      
      Most Device Tree aware drivers call of_phy_connect() with the flag
      argument set to 0, but some of them might want to set a different value
      there in order for the PHY driver to key a specific behavior based on
      the phy_device::phy_flags value.
      
      Allow such drivers to set custom phy_flags as part of the
      of_phy_connect() call since of_phy_connect() does start the PHY state
      machine, it will call into the PHY driver config_init() callback which
      is usually where a specific phy_flags value is important.
      
      Fixes: f9a8f83b ("net: phy: remove flags argument from phy_{attach, connect, connect_direct}")
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2f637151
  13. 02 7月, 2014 1 次提交
  14. 23 6月, 2014 1 次提交
  15. 03 6月, 2014 2 次提交
  16. 30 5月, 2014 3 次提交
  17. 26 5月, 2014 1 次提交
  18. 23 5月, 2014 2 次提交
  19. 17 5月, 2014 1 次提交
    • T
      of: provide a binding for fixed link PHYs · 3be2a49e
      Thomas Petazzoni 提交于
      Some Ethernet MACs have a "fixed link", and are not connected to a
      normal MDIO-managed PHY device. For those situations, a Device Tree
      binding allows to describe a "fixed link" using a special PHY node.
      
      This patch adds:
      
       * A documentation for the fixed PHY Device Tree binding.
      
       * An of_phy_is_fixed_link() function that an Ethernet driver can call
         on its PHY phandle to find out whether it's a fixed link PHY or
         not. It should typically be used to know if
         of_phy_register_fixed_link() should be called.
      
       * An of_phy_register_fixed_link() function that instantiates the
         fixed PHY into the PHY subsystem, so that when the driver calls
         of_phy_connect(), the PHY device associated to the OF node will be
         found.
      
      These two additional functions also support the old fixed-link Device
      Tree binding used on PowerPC platforms, so that ultimately, the
      network device drivers for those platforms could be converted to use
      of_phy_is_fixed_link() and of_phy_register_fixed_link() instead of
      of_phy_connect_fixed_link(), while keeping compatibility with their
      respective Device Tree bindings.
      Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Tested-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3be2a49e
  20. 21 3月, 2014 1 次提交
  21. 19 2月, 2014 1 次提交
    • B
      of_mdio: fix phy interrupt passing · f15c586d
      Ben Dooks 提交于
      The of_mdiobus_register_phy() is not setting phy->irq thus causing
      some drivers to incorrectly assume that the PHY does not have an
      IRQ associated with it. Not only do some drivers report no IRQ
      they do not install an interrupt handler for the PHY.
      
      Simplify the code setting irq and set the phy->irq at the same
      time so that we cover the following issues, which should cover
      all the cases the code will find:
      
      - Set phy->irq if node has irq property and mdio->irq is NULL
      - Set phy->irq if node has no irq and mdio->irq is not NULL
      - Leave phy->irq as PHY_POLL default if none of the above
      
      This fixes the issue:
       net eth0: attached PHY 1 (IRQ -1) to driver Micrel KSZ8041RNLI
      
      to the correct:
       net eth0: attached PHY 1 (IRQ 416) to driver Micrel KSZ8041RNLI
      Signed-off-by: NBen Dooks <ben.dooks@codethink.co.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f15c586d
  22. 15 2月, 2014 1 次提交
  23. 14 1月, 2014 1 次提交
  24. 07 12月, 2013 4 次提交
  25. 09 5月, 2013 1 次提交
  26. 09 4月, 2013 1 次提交
  27. 15 1月, 2013 1 次提交
  28. 30 11月, 2012 1 次提交