1. 19 3月, 2016 1 次提交
  2. 17 3月, 2016 1 次提交
  3. 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
  4. 14 3月, 2016 1 次提交
  5. 02 3月, 2016 2 次提交
  6. 26 2月, 2016 1 次提交
  7. 20 2月, 2016 1 次提交
    • A
      phy: marvell/micrel: Fix Unpossible condition · 321b4d4b
      Andrew Lunn 提交于
      commit 2b2427d0 ("phy: micrel: Add ethtool statistics counters")
      from Dec 30, 2015, leads to the following static checker
      warning:
      
              drivers/net/phy/micrel.c:609 kszphy_get_stat()
              warn: unsigned 'val' is never less than zero.
      
      drivers/net/phy/micrel.c
         602  static u64 kszphy_get_stat(struct phy_device *phydev, int i)
         603  {
         604          struct kszphy_hw_stat stat = kszphy_hw_stats[i];
         605          struct kszphy_priv *priv = phydev->priv;
         606          u64 val;
         607
         608          val = phy_read(phydev, stat.reg);
         609          if (val < 0) {
                          ^^^^^^^
      Unpossible!
      
         610                  val = UINT64_MAX;
         611          } else {
         612                  val = val & ((1 << stat.bits) - 1);
         613                  priv->stats[i] += val;
         614                  val = priv->stats[i];
         615          }
         616
         617          return val;
         618  }
      
      The same problem exists in the Marvell driver. Fix both.
      
      Fixes: 2b2427d0 ("phy: micrel: Add ethtool statistics counters")
      Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
      Reported-by: NJulia.Lawall <julia.lawall@lip6.fr>
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      321b4d4b
  8. 19 2月, 2016 2 次提交
  9. 18 2月, 2016 1 次提交
    • C
      phy: marvell: Fix and unify reg-init behavior · 79be1a1c
      Clemens Gruber 提交于
      For the Marvell 88E1510, marvell_of_reg_init was called too late, in the
      config_aneg function.
      Since commit 113c74d8 ("net: phy: turn carrier off on phy attach"),
      this lead to the link not coming up at boot anymore, due to the phy
      state machine being stuck at waiting for interrupts (off by default on
      the 88E1510).
      For seven other Marvell PHYs, marvell_of_reg_init was not called at all.
      
      Add a generic marvell_config_init function, which in turn calls
      marvell_of_reg_init.
      PHYs, which already have a specific config_init function with a call to
      marvell_of_reg_init, are left untouched. The generic marvell_config_init
      function is called for all the others, to get consistent behavior across
      all Marvell PHYs.
      
      Fixes: 113c74d8 ("net: phy: turn carrier off on phy attach")
      Signed-off-by: NClemens Gruber <clemens.gruber@pqgruber.com>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      79be1a1c
  10. 17 2月, 2016 8 次提交
  11. 12 2月, 2016 10 次提交
  12. 29 1月, 2016 1 次提交
  13. 22 1月, 2016 3 次提交
    • T
      net: phy: smsc: Fix disabling energy detect mode · 0a9c453e
      Teresa Remmet 提交于
      When the lan87xx_read_status function is getting called the
      energy detect mode is enabled again even if it has been
      disabled by device tree.
      
      Added private struct to check the energy detect status.
      Signed-off-by: NTeresa Remmet <t.remmet@phytec.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0a9c453e
    • F
      net: phy: Fix phy_mac_interrupt() · deccd16f
      Florian Fainelli 提交于
      Commit 5ea94e76 ("phy: add phy_mac_interrupt()") to use with
      PHY_IGNORE_INTERRUPT added a cancel_work_sync() into phy_mac_interrupt()
      which is allowed to sleep, whereas phy_mac_interrupt() is expected to be
      callable from interrupt context.
      
      Now that we have fixed how the PHY state machine treats
      PHY_IGNORE_INTERRUPT with respect to state changes, we can just set the
      new link state, and queue the PHY state machine for execution so it is
      going to read the new link state.
      
      For that to work properly, we need to update phy_change() not to try to
      invoke any interrupt callbacks if we have configured the PHY device for
      PHY_IGNORE_INTERRUPT, because that PHY device and its driver are not
      required to implement those.
      
      Fixes: 5ea94e76 ("phy: add phy_mac_interrupt() to use with PHY_IGNORE_INTERRUPT")
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      deccd16f
    • F
      net: phy: Avoid polling PHY with PHY_IGNORE_INTERRUPTS · d5c3d846
      Florian Fainelli 提交于
      Commit 2c7b4921 ("phy: fix the use of PHY_IGNORE_INTERRUPT") changed
      a hunk in phy_state_machine() in the PHY_RUNNING case which was not
      needed. The change essentially makes the PHY library treat PHY devices
      with PHY_IGNORE_INTERRUPT to keep polling for the PHY device, even
      though the intent is not to do it.
      
      Fix this by reverting that specific hunk, which makes the PHY state
      machine wait for state changes, and stay in the PHY_RUNNING state for as
      long as needed.
      
      Fixes: 2c7b4921 ("phy: fix the use of PHY_IGNORE_INTERRUPT")
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d5c3d846
  14. 21 1月, 2016 1 次提交
  15. 18 1月, 2016 4 次提交