1. 21 1月, 2017 1 次提交
  2. 11 1月, 2017 1 次提交
    • R
      net: phy: marvell: fix Marvell 88E1512 used in SGMII mode · a13c0652
      Russell King 提交于
      When an Marvell 88E1512 PHY is connected to a nic in SGMII mode, the
      fiber page is used for the SGMII host-side connection.  The PHY driver
      notices that SUPPORTED_FIBRE is set, so it tries reading the fiber page
      for the link status, and ends up reading the MAC-side status instead of
      the outgoing (copper) link.  This leads to incorrect results reported
      via ethtool.
      
      If the PHY is connected via SGMII to the host, ignore the fiber page.
      However, continue to allow the existing power management code to
      suspend and resume the fiber page.
      
      Fixes: 6cfb3bcc ("Marvell phy: check link status in case of fiber link.")
      Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a13c0652
  3. 02 12月, 2016 1 次提交
  4. 14 11月, 2016 1 次提交
  5. 20 7月, 2016 4 次提交
  6. 29 6月, 2016 1 次提交
  7. 15 6月, 2016 1 次提交
  8. 26 2月, 2016 1 次提交
  9. 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
  10. 19 2月, 2016 1 次提交
  11. 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
  12. 08 1月, 2016 2 次提交
  13. 31 12月, 2015 1 次提交
  14. 18 11月, 2015 1 次提交
  15. 26 9月, 2015 1 次提交
  16. 11 8月, 2015 1 次提交
  17. 11 7月, 2015 1 次提交
  18. 27 5月, 2015 1 次提交
  19. 13 11月, 2014 1 次提交
  20. 29 10月, 2014 2 次提交
  21. 25 10月, 2014 1 次提交
  22. 18 12月, 2013 1 次提交
  23. 01 10月, 2013 1 次提交
  24. 31 5月, 2013 3 次提交
  25. 12 3月, 2013 1 次提交
  26. 18 1月, 2013 1 次提交
  27. 09 7月, 2012 1 次提交
  28. 04 4月, 2012 1 次提交
  29. 23 11月, 2010 3 次提交
    • D
      of/phylib: Use device tree properties to initialize Marvell PHYs. · cf41a51d
      David Daney 提交于
      Some aspects of PHY initialization are board dependent, things like
      indicator LED connections and some clocking modes cannot be determined
      by probing.  The dev_flags element of struct phy_device can be used to
      control these things if an appropriate value can be passed from the
      Ethernet driver.  We run into problems however if the PHY connections
      are specified by the device tree.  There is no way for the Ethernet
      driver to know what flags it should pass.
      
      If we are using the device tree, the struct phy_device will be
      populated with the device tree node corresponding to the PHY, and we
      can extract extra configuration information from there.
      
      The next question is what should the format of that information be?
      It is highly device specific, and the device tree representation
      should not be tied to any arbitrary kernel defined constants.  A
      straight forward representation is just to specify the exact bits that
      should be set using the "marvell,reg-init" property:
      
            phy5: ethernet-phy@5 {
              reg = <5>;
              compatible = "marvell,88e1149r";
              marvell,reg-init =
                      /* led[0]:1000, led[1]:100, led[2]:10, led[3]:tx */
                      <3 0x10 0 0x5777>, /* Reg 3,16 <- 0x5777 */
                      /* mix %:0, led[0123]:drive low off hiZ */
                      <3 0x11 0 0x00aa>, /* Reg 3,17 <- 0x00aa */
                      /* default blink periods. */
                      <3 0x12 0 0x4105>, /* Reg 3,18 <- 0x4105 */
                      /* led[4]:rx, led[5]:dplx, led[45]:drive low off hiZ */
                      <3 0x13 0 0x0a60>; /* Reg 3,19 <- 0x0a60 */
            };
      
            phy6: ethernet-phy@6 {
              reg = <6>;
              compatible = "marvell,88e1118";
              marvell,reg-init =
                      /* Fix rx and tx clock transition timing */
                      <2 0x15 0xffcf 0>, /* Reg 2,21 Clear bits 4, 5 */
                      /* Adjust LED drive. */
                      <3 0x11 0 0x442a>, /* Reg 3,17 <- 0442a */
                      /* irq, blink-activity, blink-link */
                      <3 0x10 0 0x0242>; /* Reg 3,16 <- 0x0242 */
            };
      
      The Marvell PHYs have a page select register at register 22 (0x16), we
      can specify any register by its page and register number.  These are
      the first and second word.  The third word contains a mask to be ANDed
      with the existing register value, and the fourth word is ORed with the
      result to yield the new register value.  The new marvell_of_reg_init
      function leaves the page select register unchanged, so a call to it
      can be dropped into the .config_init functions without unduly
      affecting the state of the PHY.
      
      If CONFIG_OF_MDIO is not set, there is no of_node, or no
      "marvell,reg-init" property, the PHY initialization is unchanged.
      Signed-off-by: NDavid Daney <ddaney@caviumnetworks.com>
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Cc: Cyril Chemparathy <cyril@ti.com>
      Cc: David Daney <ddaney@caviumnetworks.com>
      Cc: Arnaud Patard <arnaud.patard@rtp-net.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Reviewed-by: NGrant Likely <grant.likely@secretlab.ca>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cf41a51d
    • D
      phylib: Add support for Marvell 88E1149R devices. · 90600732
      David Daney 提交于
      The 88E1149R is 10/100/1000 quad-gigabit Ethernet PHY.  The
      .config_aneg function can be shared with 88E1118, but it needs its own
      .config_init.
      Signed-off-by: NDavid Daney <ddaney@caviumnetworks.com>
      Cc: Cyril Chemparathy <cyril@ti.com>
      Cc: Arnaud Patard <arnaud.patard@rtp-net.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Wolfram Sang <w.sang@pengutronix.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      90600732
    • D
      phylib: Use common page register definition for Marvell PHYs. · 27d916d6
      David Daney 提交于
      The definition of the Marvell PHY page register is not specific to
      88E1121, so rename the macro to MII_MARVELL_PHY_PAGE, and use it
      throughout.
      Suggested-by: NCyril Chemparathy <cyril@ti.com>
      Signed-off-by: NDavid Daney <ddaney@caviumnetworks.com>
      Cc: Cyril Chemparathy <cyril@ti.com>
      Cc: Arnaud Patard <arnaud.patard@rtp-net.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      27d916d6
  30. 30 10月, 2010 1 次提交
  31. 21 10月, 2010 1 次提交