Skip to content
Snippets Groups Projects
  1. Mar 01, 2021
  2. Feb 15, 2021
  3. Feb 11, 2021
  4. Jan 07, 2021
  5. Nov 25, 2020
  6. Nov 17, 2020
  7. Nov 06, 2020
    • Ioana Ciornei's avatar
      net: phy: export phy_error and phy_trigger_machine · 293e9a3d
      Ioana Ciornei authored
      
      These functions are currently used by phy_interrupt() to either signal
      an error condition or to trigger the link state machine. In an attempt
      to actually support shared PHY IRQs, export these two functions so that
      the actual PHY drivers can use them.
      
      Cc: Alexandru Ardelean <alexandru.ardelean@analog.com>
      Cc: Andre Edich <andre.edich@microchip.com>
      Cc: Antoine Tenart <atenart@kernel.org>
      Cc: Baruch Siach <baruch@tkos.co.il>
      Cc: Christophe Leroy <christophe.leroy@c-s.fr>
      Cc: Dan Murphy <dmurphy@ti.com>
      Cc: Divya Koppera <Divya.Koppera@microchip.com>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Cc: Hauke Mehrtens <hauke@hauke-m.de>
      Cc: Heiner Kallweit <hkallweit1@gmail.com>
      Cc: Jerome Brunet <jbrunet@baylibre.com>
      Cc: Kavya Sree Kotagiri <kavyasree.kotagiri@microchip.com>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Marco Felsch <m.felsch@pengutronix.de>
      Cc: Marek Vasut <marex@denx.de>
      Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
      Cc: Mathias Kresin <dev@kresin.me>
      Cc: Maxim Kochetkov <fido_max@inbox.ru>
      Cc: Michael Walle <michael@walle.cc>
      Cc: Neil Armstrong <narmstrong@baylibre.com>
      Cc: Nisar Sayed <Nisar.Sayed@microchip.com>
      Cc: Oleksij Rempel <o.rempel@pengutronix.de>
      Cc: Philippe Schenker <philippe.schenker@toradex.com>
      Cc: Willy Liu <willy.liu@realtek.com>
      Cc: Yuiko Oshino <yuiko.oshino@microchip.com>
      Signed-off-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      293e9a3d
  8. Sep 24, 2020
  9. Sep 17, 2020
  10. Aug 23, 2020
  11. Jul 08, 2020
  12. Jun 24, 2020
    • Jisheng Zhang's avatar
      net: phy: make phy_disable_interrupts() non-static · 3dd4ef1b
      Jisheng Zhang authored
      
      We face an issue with rtl8211f, a pin is shared between INTB and PMEB,
      and the PHY Register Accessible Interrupt is enabled by default, so
      the INTB/PMEB pin is always active in polling mode case.
      
      As Heiner pointed out "I was thinking about calling
      phy_disable_interrupts() in phy_init_hw(), to have a defined init
      state as we don't know in which state the PHY is if the PHY driver is
      loaded. We shouldn't assume that it's the chip power-on defaults, BIOS
      or boot loader could have changed this. Or in case of dual-boot
      systems the other OS could leave the PHY in whatever state."
      
      Make phy_disable_interrupts() non-static so that it could be used in
      phy_init_hw() to have a defined init state.
      
      Suggested-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: default avatarJisheng Zhang <Jisheng.Zhang@synaptics.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3dd4ef1b
  13. May 27, 2020
  14. May 26, 2020
  15. May 18, 2020
    • Doug Berger's avatar
      net: phy: simplify phy_link_change arguments · a307593a
      Doug Berger authored
      
      This function was introduced to allow for different handling of
      link up and link down events particularly with regard to the
      netif_carrier. The third argument do_carrier allowed the flag to
      be left unchanged.
      
      Since then the phylink has introduced an implementation that
      completely ignores the third parameter since it never wants to
      change the flag and the phylib always sets the third parameter
      to true so the flag is always changed.
      
      Therefore the third argument (i.e. do_carrier) is no longer
      necessary and can be removed. This also means that the phylib
      phy_link_down() function no longer needs its second argument.
      
      Signed-off-by: default avatarDoug Berger <opendmb@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a307593a
  16. May 13, 2020
  17. May 10, 2020
  18. May 07, 2020
    • Oleksij Rempel's avatar
      ethtool: provide UAPI for PHY master/slave configuration. · bdbdac76
      Oleksij Rempel authored
      
      This UAPI is needed for BroadR-Reach 100BASE-T1 devices. Due to lack of
      auto-negotiation support, we needed to be able to configure the
      MASTER-SLAVE role of the port manually or from an application in user
      space.
      
      The same UAPI can be used for 1000BASE-T or MultiGBASE-T devices to
      force MASTER or SLAVE role. See IEEE 802.3-2018:
      22.2.4.3.7 MASTER-SLAVE control register (Register 9)
      22.2.4.3.8 MASTER-SLAVE status register (Register 10)
      40.5.2 MASTER-SLAVE configuration resolution
      45.2.1.185.1 MASTER-SLAVE config value (1.2100.14)
      45.2.7.10 MultiGBASE-T AN control 1 register (Register 7.32)
      
      The MASTER-SLAVE role affects the clock configuration:
      
      -------------------------------------------------------------------------------
      When the  PHY is configured as MASTER, the PMA Transmit function shall
      source TX_TCLK from a local clock source. When configured as SLAVE, the
      PMA Transmit function shall source TX_TCLK from the clock recovered from
      data stream provided by MASTER.
      
      iMX6Q                     KSZ9031                XXX
      ------\                /-----------\        /------------\
            |                |           |        |            |
       MAC  |<----RGMII----->| PHY Slave |<------>| PHY Master |
            |<--- 125 MHz ---+-<------/  |        | \          |
      ------/                \-----------/        \------------/
                                                     ^
                                                      \-TX_TCLK
      
      -------------------------------------------------------------------------------
      
      Since some clock or link related issues are only reproducible in a
      specific MASTER-SLAVE-role, MAC and PHY configuration, it is beneficial
      to provide generic (not 100BASE-T1 specific) interface to the user space
      for configuration flexibility and trouble shooting.
      
      Signed-off-by: default avatarOleksij Rempel <o.rempel@pengutronix.de>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bdbdac76
  19. Mar 24, 2020
    • Heiner Kallweit's avatar
      net: phy: add and use phy_check_downshift · 5eee3bb7
      Heiner Kallweit authored
      
      So far PHY drivers have to check whether a downshift occurred to be
      able to notify the user. To make life of drivers authors a little bit
      easier move the downshift notification to phylib. phy_check_downshift()
      compares the highest mutually advertised speed with the actual value
      of phydev->speed (typically read by the PHY driver from a
      vendor-specific register) to detect a downshift.
      
      v2:
      - Add downshift hint to phy_print_status
      
      Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5eee3bb7
  20. Mar 18, 2020
    • Heiner Kallweit's avatar
      net: phy: improve phy_driver callback handle_interrupt · 9010f9de
      Heiner Kallweit authored
      
      did_interrupt() clears the interrupt, therefore handle_interrupt() can
      not check which event triggered the interrupt. To overcome this
      constraint and allow more flexibility for customer interrupt handlers,
      let's decouple handle_interrupt() from parts of the phylib interrupt
      handling. Custom interrupt handlers now have to implement the
      did_interrupt() functionality in handle_interrupt() if needed.
      
      Fortunately we have just one custom interrupt handler so far (in the
      mscc PHY driver), convert it to the changed API.
      
      Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9010f9de
  21. Mar 02, 2020
  22. Jan 21, 2020
  23. Jan 20, 2020
  24. Dec 26, 2019
  25. Nov 23, 2019
  26. Nov 19, 2019
  27. Oct 16, 2019
    • Yonglong Liu's avatar
      net: phy: Fix "link partner" information disappear issue · 3de5ae54
      Yonglong Liu authored
      
      Some drivers just call phy_ethtool_ksettings_set() to set the
      links, for those phy drivers that use genphy_read_status(), if
      autoneg is on, and the link is up, than execute "ethtool -s
      ethx autoneg on" will cause "link partner" information disappear.
      
      The call trace is phy_ethtool_ksettings_set()->phy_start_aneg()
      ->linkmode_zero(phydev->lp_advertising)->genphy_read_status(),
      the link didn't change, so genphy_read_status() just return, and
      phydev->lp_advertising is zero now.
      
      This patch moves the clear operation of lp_advertising from
      phy_start_aneg() to genphy_read_lpa()/genphy_c45_read_lpa(), and
      if autoneg on and autoneg not complete, just clear what the
      generic functions care about.
      
      Fixes: 88d6272a ("net: phy: avoid unneeded MDIO reads in genphy_read_status")
      Signed-off-by: default avatarYonglong Liu <liuyonglong@huawei.com>
      Reviewed-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3de5ae54
  28. Oct 05, 2019
  29. Sep 06, 2019
  30. Aug 28, 2019
  31. Aug 14, 2019
  32. Jul 09, 2019
  33. Jun 06, 2019
  34. May 31, 2019
Loading