1. 08 12月, 2012 1 次提交
  2. 06 12月, 2012 1 次提交
  3. 04 12月, 2012 1 次提交
  4. 24 11月, 2012 1 次提交
  5. 20 11月, 2012 1 次提交
    • S
      of/net/mdio-gpio: Fix pdev->id issue when using devicetrees. · 3272dd9b
      Srinivas Kandagatla 提交于
      When the mdio-gpio driver is probed via device trees, the platform
      device id is set as -1, However the pdev->id is re-used as bus-id for
      while creating mdio gpio bus.
      So
      For device tree case the mdio-gpio bus name appears as "gpio-ffffffff"
      where as
      for non-device tree case the bus name appears as "gpio-<bus-num>"
      
      Which means the bus_id is fixed in device tree case, so we can't have
      two mdio gpio buses via device trees. Assigning a logical bus number
      via device tree solves the problem and the bus name is much consistent
      with non-device tree bus name.
      
      Without this patch
      1. we can't support two mdio-gpio buses via device trees.
      2. we should always pass gpio-ffffffff as bus name to phy_connect, very
      different to non-device tree bus name.
      
      So, setting up the bus_id via aliases from device tree is the right
      solution and other drivers do similar thing.
      Signed-off-by: NSrinivas Kandagatla <srinivas.kandagatla@st.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3272dd9b
  6. 16 11月, 2012 1 次提交
    • P
      net: phy: smsc: Re-enable EDPD mode for LAN87xx · 4223dbff
      Patrick Trantham 提交于
      This patch re-enables Energy Detect Power Down (EDPD) mode for the
      LAN8710/LAN8720.  EDPD mode was disabled in a previous commit,
      (b629820d), because it was causing the
      PHY to not be able to detect a link when cold started without a cable
      connected.
      
      The LAN8710/LAN8720 requires a minimum of 2 link pulses within 64ms of
      each other in order to set the ENERGYON bit and exit EDPD mode.  If a
      link partner does send the pulses within this interval, the PHY will
      remained powered down.
      
      This workaround will manually toggle the PHY on/off upon calls to
      read_status in order to generate link test pulses if the link is down.
      If a link partner is present, it will respond to the pulses, which will
      cause the ENERGYON bit to be set and will cause the EDPD mode to be
      exited.
      Signed-off-by: NPatrick Trantham <patrick.trantham@fuel7.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4223dbff
  7. 15 11月, 2012 2 次提交
  8. 10 11月, 2012 1 次提交
  9. 03 11月, 2012 1 次提交
  10. 19 10月, 2012 1 次提交
  11. 10 10月, 2012 1 次提交
  12. 28 9月, 2012 2 次提交
  13. 25 9月, 2012 2 次提交
    • M
      phy/micrel: Rename KS80xx to KSZ80xx · 510d573f
      Marek Vasut 提交于
      There is no such part as KS8001, KS8041 or KS8051. There are only
      KSZ8001, KSZ8041 and KSZ8051. Rename these parts as such to match
      the Micrel naming.
      Signed-off-by: NMarek Vasut <marex@denx.de>
      Cc: David J. Choi <david.choi@micrel.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
      Cc: Linux ARM kernel <linux-arm-kernel@lists.infradead.org>
      Cc: Fabio Estevam <fabio.estevam@freescale.com>
      Cc: Shawn Guo <shawn.guo@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      510d573f
    • M
      phy/micrel: Implement support for KSZ8021 · 212ea99a
      Marek Vasut 提交于
      The KSZ8021 PHY was previously caught by KS8051, which is not correct.
      This PHY needs additional setup if it is strapped for address 0. In such
      case an reserved bit must be written in the 0x16, "Operation Mode Strap
      Override" register. According to the KS8051 datasheet, that bit means
      "PHY Address 0 in non-broadcast" and it indeed behaves as such on KSZ8021.
      The issue where the ethernet controller (Freescale FEC) did not communicate
      with network is fixed by writing this bit as 1.
      Signed-off-by: NMarek Vasut <marex@denx.de>
      Cc: David J. Choi <david.choi@micrel.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      212ea99a
  14. 23 9月, 2012 2 次提交
  15. 08 9月, 2012 1 次提交
  16. 31 8月, 2012 2 次提交
  17. 23 8月, 2012 1 次提交
    • A
      mdio: translation of MMD EEE registers to/from ethtool settings · b32607dd
      Allan, Bruce W 提交于
      The helper functions which translate IEEE MDIO Manageable Device (MMD)
      Energy-Efficient Ethernet (EEE) registers 3.20, 7.60 and 7.61 to and from
      the comparable ethtool supported/advertised settings will be needed by
      drivers other than those in PHYLIB (e.g. e1000e in a follow-on patch).
      
      In the same fashion as similar translation functions in linux/mii.h, move
      these functions from the PHYLIB core to the linux/mdio.h header file so the
      code will not have to be duplicated in each driver needing MMD-to-ethtool
      (and vice-versa) translations.  The function and some variable names have
      been renamed to be more descriptive.
      
      Not tested on the only hardware that currently calls the related functions,
      stmmac, because I don't have access to any.  Has been compile tested and
      the translations have been tested on a locally modified version of e1000e.
      Signed-off-by: NBruce Allan <bruce.w.allan@intel.com>
      Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b32607dd
  18. 20 8月, 2012 1 次提交
  19. 07 8月, 2012 1 次提交
  20. 23 7月, 2012 1 次提交
  21. 17 7月, 2012 1 次提交
  22. 09 7月, 2012 4 次提交
  23. 01 7月, 2012 1 次提交
    • G
      phy: add the EEE support and the way to access to the MMD registers. · a59a4d19
      Giuseppe CAVALLARO 提交于
      This patch adds the support for the Energy-Efficient Ethernet (EEE)
      to the Physical Abstraction Layer.
      To support the EEE we have to access to the MMD registers 3.20 and
      7.60/61. So two new functions have been added to read/write the MMD
      registers (clause 45).
      
      An Ethernet driver (I tested the stmmac) can invoke the phy_init_eee to properly
      check if the EEE is supported by the PHYs and it can also set the clock
      stop enable bit in the 3.0 register.
      The phy_get_eee_err can be used for reporting the number of time where
      the PHY failed to complete its normal wake sequence.
      
      In the end, this patch also adds the EEE ethtool support implementing:
       o phy_ethtool_set_eee
       o phy_ethtool_get_eee
      
      v1: initial patch
      v2: fixed some errors especially on naming convention
      v3: renamed again the mmd read/write functions thank to Ben's feedback
      v4: moved file to phy.c and added the ethtool support.
      v5: fixed phy_adv_to_eee, phy_eee_to_supported, phy_eee_to_adv return
          values according to ethtool API (thanks to Ben's feedback).
          Renamed some macros to avoid too long names.
      v6: fixed kernel-doc comments to be properly parsed.
          Fixed the phy_init_eee function: we need to check which link mode
          was autonegotiated and then the corresponding bits in 7.60 and 7.61
          registers.
      v7: reviewed the way to get the negotiated settings.
      v8: fixed a problem in the phy_init_eee return value erroneously added
          when included the phy_read_status call.
      v9: do not remove the MDIO_AN_EEE_ADV_100TX and MDIO_AN_EEE_ADV_1000T
          and fixed the eee_{cap,lp,adv} declaration as "int" instead of u16.
      Signed-off-by: NGiuseppe Cavallaro <peppe.cavallaro@st.com>
      Reviewed-by: NBen Hutchings <bhutchings@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a59a4d19
  24. 28 6月, 2012 4 次提交
    • D
      phy: Fix warning in get_phy_device(). · 160c85f0
      David S. Miller 提交于
      drivers/net/phy/phy_device.c: In function ‘get_phy_device’:
      drivers/net/phy/phy_device.c:340:14: warning: ‘phy_id’ may be used uninitialized in this function [-Wmaybe-uninitialized]
      
      GCC can't see that when we return zero we always initialize
      phy_id and that's the only path where we use it.
      
      Initialize phy_id to zero to shut it up.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      160c85f0
    • D
      netdev/phy: Add driver for Broadcom BCM87XX 10G Ethernet PHYs · e9976d7c
      David Daney 提交于
      Add a driver for BCM8706 and BCM8727 devices.  These are a 10Gig PHYs
      which use MII_ADDR_C45 addressing.  They are always 10G full duplex, so
      there is no autonegotiation.  All we do is report link state and send
      interrupts when it changes.
      
      If the PHY has a device tree of_node associated with it, the
      "broadcom,c45-reg-init" property is used to supply register
      initialization values when config_init() is called.
      Signed-off-by: NDavid Daney <david.daney@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e9976d7c
    • D
      netdev/phy/of: Add more methods for binding PHY devices to drivers. · a30e2c18
      David Daney 提交于
      Allow PHY drivers to supply their own device matching function
      (match_phy_device()), or to be matched OF compatible properties.
      
      PHYs following IEEE802.3 clause 45 have more than one device
      identifier constants, which breaks the default device matching code.
      Other 10G PHYs don't follow the standard manufacturer/device
      identifier register layout standards, but they do use the standard
      MDIO bus protocols for register access.  Both of these require
      adjustments to the PHY driver to device matching code.
      
      If the there is an of_node associated with such a PHY, we can match it
      to its driver using the "compatible" properties, just as we do with
      certain platform devices.  If the "compatible" property match fails,
      first check if there is a driver supplied matching function, and if
      not fall back to the existing identifier matching rules.
      Signed-off-by: NDavid Daney <david.daney@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a30e2c18
    • D
      netdev/phy: Handle IEEE802.3 clause 45 Ethernet PHYs · ac28b9f8
      David Daney 提交于
      The IEEE802.3 clause 45 MDIO bus protocol allows for directly
      addressing PHY registers using a 21 bit address, and is used by many
      10G Ethernet PHYS.  Already existing is the ability of MDIO bus
      drivers to use clause 45, with the MII_ADDR_C45 flag.  Here we add
      struct phy_c45_device_ids to hold the device identifier registers
      present in clause 45. struct phy_device gets a couple of new fields:
      c45_ids to hold the identifiers and is_c45 to signal that it is clause
      45.
      
      get_phy_device() gets a new parameter is_c45 to indicate that the PHY
      device should use the clause 45 protocol, and its callers are adjusted
      to pass false.  The follow-on patch to of_mdio.c will pass true where
      appropriate.
      
      EXPORT phy_device_create() so that the follow-on patch to of_mdio.c
      can use it to create phy devices for PHYs, that have non-standard
      device identifier registers, based on the device tree bindings.
      Signed-off-by: NDavid Daney <david.daney@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ac28b9f8
  25. 19 6月, 2012 1 次提交
    • J
      phy/micrel: change phy_id_mask for KSZ9021 and KS8001 · 48d7d0ad
      Jason Wang 提交于
      On a freescale imx6q platform, a hardware phy chip KSZ9021 is
      recognized as a KS8001 chip by the current driver like this:
      eth0: Freescale FEC PHY driver [Micrel KS8001 or KS8721]
      
      KSZ9021 has phy_id 0x00221610, while KSZ8001 has phy_id
      0x0022161a, the current phy_id_mask (0x00fffff0/0x00ffff10) can't
      distinguish them. So change phy_id_mask to resolve this problem.
      
      Although the micrel datasheet says that the 4 LSB of phyid2 register
      contains the chip revision number and the current driver is designed
      to follow this rule, in reality the chip implementation doesn't follow
      it.
      
      Cc: David J. Choi <david.choi@micrel.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
      Signed-off-by: NHui Wang <jason77.wang@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      48d7d0ad
  26. 12 6月, 2012 1 次提交
  27. 09 6月, 2012 1 次提交
  28. 05 6月, 2012 1 次提交
  29. 16 5月, 2012 1 次提交