1. 27 6月, 2016 1 次提交
  2. 16 6月, 2016 1 次提交
    • A
      mdio: mux: avoid 'maybe-uninitialized' warning · a78c16e1
      Arnd Bergmann 提交于
      The latest changes to the MDIO code introduced a false-positive
      warning with gcc-6 (possibly others):
      
      drivers/net/phy/mdio-mux.c: In function 'mdio_mux_init':
      drivers/net/phy/mdio-mux.c:188:3: error: 'parent_bus_node' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      
      It's easy to avoid the warning by making sure the parent_bus_node
      is initialized in both cases at the start of the function, since
      the later 'of_node_put()' call is also valid for a NULL pointer
      argument.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Fixes: f20e6657 ("mdio: mux: Enhanced MDIO mux framework for integrated multiplexers")
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a78c16e1
  3. 11 6月, 2016 3 次提交
  4. 21 5月, 2016 2 次提交
  5. 18 5月, 2016 4 次提交
  6. 17 5月, 2016 3 次提交
  7. 13 5月, 2016 1 次提交
  8. 11 5月, 2016 2 次提交
  9. 05 5月, 2016 1 次提交
  10. 02 5月, 2016 1 次提交
    • M
      mdio_bus: Fix MDIO bus scanning in __mdiobus_register() · 70e927b9
      Marek Vasut 提交于
      Since commit b74766a0 ("phylib: don't return NULL
      from get_phy_device()") in linux-next, phy_get_device() will return
      ERR_PTR(-ENODEV) instead of NULL if the PHY device ID is all ones.
      
      This causes problem with stmmac driver and likely some other drivers
      which call mdiobus_register(). I triggered this bug on SoCFPGA MCVEVK
      board with linux-next 20160427 and 20160428. In case of the stmmac, if
      there is no PHY node specified in the DT for the stmmac block, the stmmac
      driver ( drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c function
      stmmac_mdio_register() ) will call mdiobus_register() , which will
      register the MDIO bus and probe for the PHY.
      
      The mdiobus_register() resp. __mdiobus_register() iterates over all of
      the addresses on the MDIO bus and calls mdiobus_scan() for each of them,
      which invokes get_phy_device(). Before the aforementioned patch, the
      mdiobus_scan() would return NULL if no PHY was found on a given address
      and mdiobus_register() would continue and try the next PHY address. Now,
      mdiobus_scan() returns ERR_PTR(-ENODEV), which is caught by the
      'if (IS_ERR(phydev))' condition and the loop exits immediately if the
      PHY address does not contain PHY.
      
      Repair this by explicitly checking for the ERR_PTR(-ENODEV) and if this
      error comes around, continue with the next PHY address.
      Signed-off-by: NMarek Vasut <marex@denx.de>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Acked-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      70e927b9
  11. 29 4月, 2016 1 次提交
  12. 27 4月, 2016 3 次提交
  13. 22 4月, 2016 1 次提交
  14. 19 4月, 2016 1 次提交
  15. 16 4月, 2016 1 次提交
  16. 12 4月, 2016 1 次提交
  17. 25 3月, 2016 1 次提交
  18. 24 3月, 2016 2 次提交
  19. 21 3月, 2016 1 次提交
  20. 19 3月, 2016 1 次提交
  21. 17 3月, 2016 1 次提交
  22. 15 3月, 2016 3 次提交
    • A
      phy: fixed: Fix removal of phys. · 5bcbe0f3
      Andrew Lunn 提交于
      The fixed phys delete function simply removed the fixed phy from the
      internal linked list and freed the memory. It however did not
      unregister the associated phy device. This meant it was still possible
      to find the phy device on the mdio bus.
      
      Make fixed_phy_del() an internal function and add a
      fixed_phy_unregister() to unregisters the phy device and then uses
      fixed_phy_del() to free resources.
      
      Modify DSA to use this new API function, so we don't leak phys.
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5bcbe0f3
    • D
      phy: mdio-thunder: Add driver for Cavium Thunder SoC MDIO buses. · 379d7ac7
      David Daney 提交于
      The Cavium Thunder SoCs have multiple MIDO buses that are part of a
      single PCI device.  To model this in the device tree we call the PCI
      parent device a "cavium,thunder-8890-mdio-nexus", it has several
      children, one for each MDIO bus.
      
      The MDIO bus hardware is identical to that found in the OCTEON SoCs,
      so we use that code for things that are not part of the PCI driver
      probe/remove
      Signed-off-by: NDavid Daney <david.daney@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      379d7ac7
    • D
      phy: mdio-octeon: Refactor into two files/modules · 1eefee90
      David Daney 提交于
      A follow-on patch uses PCI probing to find the Thunder MDIO hardware.
      In preparation for this, split out the common code into a new file
      mdio-cavium.c, which will be used by both the existing OCTEON driver,
      and the new Thunder PCI based driver.
      
      As part of the refactoring simplify the struct cavium_mdiobus by
      removing fields that are only ever used in the probe function and can
      just as well be local variables.
      
      Use readq/writeq in preference to readq_relaxed/writeq_relaxed as the
      relaxed form was an optimization for an early chip revision, and the
      MDIO drivers are not performance bottlenecks that need optimization in
      the first place.
      Signed-off-by: NDavid Daney <david.daney@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1eefee90
  23. 14 3月, 2016 1 次提交
  24. 02 3月, 2016 2 次提交
  25. 26 2月, 2016 1 次提交