1. 20 9月, 2021 2 次提交
  2. 14 9月, 2021 1 次提交
  3. 21 7月, 2021 1 次提交
  4. 20 7月, 2021 1 次提交
  5. 29 6月, 2021 1 次提交
  6. 15 5月, 2021 2 次提交
  7. 21 4月, 2021 1 次提交
    • M
      net: phy: at803x: fix probe error if copper page is selected · 8f7e8762
      Michael Walle 提交于
      The commit c329e5af ("net: phy: at803x: select correct page on
      config init") selects the copper page during probe. This fails if the
      copper page was already selected. In this case, the value of the copper
      page (which is 1) is propagated through phy_restore_page() and is
      finally returned for at803x_probe(). Fix it, by just using the
      at803x_page_write() directly.
      
      Also in case of an error, the regulator is not disabled and leads to a
      WARN_ON() when the probe fails. This couldn't happen before, because
      at803x_parse_dt() was the last call in at803x_probe(). It is hard to
      see, that the parse_dt() actually enables the regulator. Thus move the
      regulator_enable() to the probe function and undo it in case of an
      error.
      
      Fixes: c329e5af ("net: phy: at803x: select correct page on config init")
      Signed-off-by: NMichael Walle <michael@walle.cc>
      Reviewed-by: NDavid Bauer <mail@david-bauer.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8f7e8762
  8. 16 4月, 2021 1 次提交
    • D
      net: phy: at803x: select correct page on config init · c329e5af
      David Bauer 提交于
      The Atheros AR8031 and AR8033 expose different registers for SGMII/Fiber
      as well as the copper side of the PHY depending on the BT_BX_REG_SEL bit
      in the chip configure register.
      
      The driver assumes the copper side is selected on probe, but this might
      not be the case depending which page was last selected by the
      bootloader. Notably, Ubiquiti UniFi bootloaders show this behavior.
      
      Select the copper page when probing to circumvent this.
      Signed-off-by: NDavid Bauer <mail@david-bauer.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c329e5af
  9. 20 3月, 2021 1 次提交
  10. 16 2月, 2021 1 次提交
  11. 16 1月, 2021 1 次提交
    • R
      net: phy: at803x: add support for configuring SmartEEE · 390b4cad
      Russell King 提交于
      SmartEEE for the atheros phy was deemed buggy by Freescale and commits
      were added to disable it for their boards.
      
      In initial testing, SolidRun found that the default settings were
      causing disconnects but by increasing the Tw buffer time we could allow
      enough time for all parts of the link to come out of a low power state
      and function properly without causing a disconnect. This allows us to
      have functional power savings of between 300 and 400mW, rather than
      disabling the feature altogether.
      
      This commit adds support for disabling SmartEEE and configuring the Tw
      parameters for 1G and 100M speeds.
      Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      390b4cad
  12. 15 1月, 2021 1 次提交
  13. 12 1月, 2021 1 次提交
  14. 06 11月, 2020 2 次提交
  15. 27 8月, 2020 1 次提交
  16. 20 7月, 2020 1 次提交
  17. 08 7月, 2020 1 次提交
  18. 27 5月, 2020 1 次提交
  19. 24 5月, 2020 1 次提交
    • M
      net: phy: at803x: fix PHY ID masks · 0465d8f8
      Michael Walle 提交于
      Ever since its first commit 0ca7111a ("phy: add AT803x driver") the
      PHY ID mask was set to 0xffffffef. It is unclear to me why this mask was
      chosen in the first place. Both the AR8031/AR8033 and the AR8035
      datasheets mention it is always the given value:
       - for AR8031/AR8033 its 0x004d/0xd074
       - for AR8035 its 0x004d/0xd072
      
      Unfortunately, I don't have a datasheet for the AR8030. Therefore, we
      leave its PHY ID mask untouched. For the PHYs mentioned before use the
      handy PHY_ID_MATCH_EXACT() macro.
      
      I've tried to contact the author of the initial commit, but received no
      answer so far.
      
      Cc: Matus Ujhelyi <ujhelyi.m@gmail.com>
      Signed-off-by: NMichael Walle <michael@walle.cc>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0465d8f8
  20. 14 5月, 2020 1 次提交
    • M
      net: phy: at803x: add cable diagnostics support · 6cb75767
      Michael Walle 提交于
      The AR8031/AR8033 and the AR8035 support cable diagnostics. Adding
      driver support is straightforward, so lets add it.
      
      The PHY just do one pair at a time, so we have to start the test four
      times. The cable_test_get_status() can block and therefore we can just
      busy poll the test completion and continue with the next pair until we
      are done.
      The time delta counter seems to run at 125MHz which just gives us a
      resolution of about 82.4cm per tick.
      
      100m cable, A/B/C/D open:
        Cable test started for device eth0.
        Cable test completed for device eth0.
        Pair: Pair A, result: Open Circuit
        Pair: Pair A, fault length: 107.94m
        Pair: Pair B, result: Open Circuit
        Pair: Pair B, fault length: 104.64m
        Pair: Pair C, result: Open Circuit
        Pair: Pair C, fault length: 105.47m
        Pair: Pair D, result: Open Circuit
        Pair: Pair D, fault length: 107.94m
      
      1m cable, A/B connected, C shorted, D open:
        Cable test started for device eth0.
        Cable test completed for device eth0.
        Pair: Pair A, result: OK
        Pair: Pair B, result: OK
        Pair: Pair C, result: Short within Pair
        Pair: Pair C, fault length: 0.82m
        Pair: Pair D, result: Open Circuit
        Pair: Pair D, fault length: 0.82m
      Signed-off-by: NMichael Walle <michael@walle.cc>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6cb75767
  21. 01 5月, 2020 1 次提交
  22. 19 4月, 2020 1 次提交
  23. 02 4月, 2020 1 次提交
  24. 31 1月, 2020 1 次提交
  25. 07 11月, 2019 4 次提交
  26. 05 10月, 2019 1 次提交
  27. 04 10月, 2019 2 次提交
  28. 18 8月, 2019 1 次提交
    • H
      net: phy: remove calls to genphy_config_init · c227ce44
      Heiner Kallweit 提交于
      Supported PHY features are either auto-detected or explicitly set.
      In both cases calling genphy_config_init isn't needed. All that
      genphy_config_init does is removing features that are set as
      supported but can't be auto-detected. Basically it duplicates the
      code in genphy_read_abilities. Therefore remove such calls from
      all PHY drivers.
      
      v2:
      - remove call also from new adin PHY driver
      v3:
      - pass NULL as config_init function pointer for dp83848
      Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c227ce44
  29. 13 8月, 2019 1 次提交
    • A
      net: phy: at803x: stop switching phy delay config needlessly · bb0ce4c1
      André Draszik 提交于
      This driver does a funny dance disabling and re-enabling
      RX and/or TX delays. In any of the RGMII-ID modes, it first
      disables the delays, just to re-enable them again right
      away. This looks like a needless exercise.
      
      Just enable the respective delays when in any of the
      relevant 'id' modes, and disable them otherwise.
      
      Also, remove comments which don't add anything that can't be
      seen by looking at the code.
      Signed-off-by: NAndré Draszik <git@andred.net>
      CC: Andrew Lunn <andrew@lunn.ch>
      CC: Florian Fainelli <f.fainelli@gmail.com>
      CC: Heiner Kallweit <hkallweit1@gmail.com>
      CC: "David S. Miller" <davem@davemloft.net>
      CC: netdev@vger.kernel.org
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bb0ce4c1
  30. 19 4月, 2019 1 次提交
  31. 16 4月, 2019 1 次提交
  32. 21 3月, 2019 1 次提交
    • H
      net: phy: improve handling link_change_notify callback · 5c5f626b
      Heiner Kallweit 提交于
      Currently the Phy driver's link_change_notify callback is called
      whenever the state machine is run (every second if polling), no matter
      whether the state changed or not. This isn't needed and may confuse
      users considering the name of the callback. Actually it contradicts
      its kernel-doc description. Therefore let's change the behavior and
      call this callback only in case of an actual state change.
      
      This requires changes to the at803x and rockchip drivers.
      at803x can be simplified so that it reacts on a state change to
      PHY_NOLINK only.
      The rockchip driver can also be much simplified. We simply re-init
      the AFE/DSP registers whenever we change to PHY_RUNNING and speed
      is 100Mbps. This causes very small overhead because we do this even
      if the speed was 100Mbps already. But this is negligible and
      I think justified by the much simpler code.
      
      Changes are compile-tested only.
      
      A little bit problematic seems to be to find somebody with the
      hardware to test the changes to the two PHY drivers. See also [0].
      David may be able to test the Rockchip driver.
      
      [0] https://marc.info/?t=153782508800006&r=1&w=2Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5c5f626b
  33. 23 2月, 2019 1 次提交