1. 06 11月, 2020 19 次提交
    • I
      net: phy: realtek: remove the use of .ack_interrupt() · 8b43357f
      Ioana Ciornei 提交于
      In preparation of removing the .ack_interrupt() callback, we must replace
      its occurrences (aka phy_clear_interrupt), from the 2 places where it is
      called from (phy_enable_interrupts and phy_disable_interrupts), with
      equivalent functionality.
      
      This means that clearing interrupts now becomes something that the PHY
      driver is responsible of doing, before enabling interrupts and after
      clearing them. Make this driver follow the new contract.
      
      Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
      Cc: Willy Liu <willy.liu@realtek.com>
      Signed-off-by: NIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      8b43357f
    • I
      net: phy: realtek: implement generic .handle_interrupt() callback · 03829163
      Ioana Ciornei 提交于
      In an attempt to actually support shared IRQs in phylib, we now move the
      responsibility of triggering the phylib state machine or just returning
      IRQ_NONE, based on the IRQ status register, to the PHY driver. Having
      3 different IRQ handling callbacks (.handle_interrupt(),
      .did_interrupt() and .ack_interrupt() ) is confusing so let the PHY
      driver implement directly an IRQ handler like any other device driver.
      Make this driver follow the new convention.
      
      Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
      Cc: Willy Liu <willy.liu@realtek.com>
      Signed-off-by: NIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      03829163
    • I
      net: phy: add genphy_handle_interrupt_no_ack() · 87de1f05
      Ioana Ciornei 提交于
      It seems there are cases where the interrupts are handled by another
      entity (ie an IRQ controller embedded inside the PHY) and do not need
      any other interraction from phylib. For this kind of PHYs, like the
      RTL8366RB, add the genphy_handle_interrupt_no_ack() function which just
      triggers the link state machine.
      Signed-off-by: NIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      87de1f05
    • I
      net: phy: davicom: remove the use of .ack_interrupt() · 0d65cc18
      Ioana Ciornei 提交于
      In preparation of removing the .ack_interrupt() callback, we must replace
      its occurrences (aka phy_clear_interrupt), from the 2 places where it is
      called from (phy_enable_interrupts and phy_disable_interrupts), with
      equivalent functionality.
      
      This means that clearing interrupts now becomes something that the PHY
      driver is responsible of doing, before enabling interrupts and after
      clearing them. Make this driver follow the new contract.
      Signed-off-by: NIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      0d65cc18
    • I
      net: phy: davicom: implement generic .handle_interrupt() calback · e954631c
      Ioana Ciornei 提交于
      In an attempt to actually support shared IRQs in phylib, we now move the
      responsibility of triggering the phylib state machine or just returning
      IRQ_NONE, based on the IRQ status register, to the PHY driver. Having
      3 different IRQ handling callbacks (.handle_interrupt(),
      .did_interrupt() and .ack_interrupt() ) is confusing so let the PHY
      driver implement directly an IRQ handler like any other device driver.
      Make this driver follow the new convention.
      Signed-off-by: NIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      e954631c
    • I
      net: phy: cicada: remove the use of .ack_interrupt() · a758087f
      Ioana Ciornei 提交于
      In preparation of removing the .ack_interrupt() callback, we must replace
      its occurrences (aka phy_clear_interrupt), from the 2 places where it is
      called from (phy_enable_interrupts and phy_disable_interrupts), with
      equivalent functionality.
      
      This means that clearing interrupts now becomes something that the PHY
      driver is responsible of doing, before enabling interrupts and after
      clearing them. Make this driver follow the new contract.
      Signed-off-by: NIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      a758087f
    • I
      net: phy: cicada: implement the generic .handle_interrupt() callback · e5d2b0b6
      Ioana Ciornei 提交于
      In an attempt to actually support shared IRQs in phylib, we now move the
      responsibility of triggering the phylib state machine or just returning
      IRQ_NONE, based on the IRQ status register, to the PHY driver. Having
      3 different IRQ handling callbacks (.handle_interrupt(),
      .did_interrupt() and .ack_interrupt() ) is confusing so let the PHY
      driver implement directly an IRQ handler like any other device driver.
      Make this driver follow the new convention.
      Signed-off-by: NIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      e5d2b0b6
    • I
      net: phy: broadcom: remove use of ack_interrupt() · 15772e4d
      Ioana Ciornei 提交于
      In preparation of removing the .ack_interrupt() callback, we must replace
      its occurrences (aka phy_clear_interrupt), from the 2 places where it is
      called from (phy_enable_interrupts and phy_disable_interrupts), with
      equivalent functionality.
      
      This means that clearing interrupts now becomes something that the PHY
      driver is responsible of doing, before enabling interrupts and after
      clearing them. Make this driver follow the new contract.
      
      Cc: Michael Walle <michael@walle.cc>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      15772e4d
    • I
      net: phy: broadcom: implement generic .handle_interrupt() callback · 4567d5c3
      Ioana Ciornei 提交于
      In an attempt to actually support shared IRQs in phylib, we now move the
      responsibility of triggering the phylib state machine or just returning
      IRQ_NONE, based on the IRQ status register, to the PHY driver. Having
      3 different IRQ handling callbacks (.handle_interrupt(),
      .did_interrupt() and .ack_interrupt() ) is confusing so let the PHY
      driver implement directly an IRQ handler like any other device driver.
      Make this driver follow the new convention.
      
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NIoana Ciornei <ioana.ciornei@nxp.com>
      Tested-by: NMichael Walle <michael@walle.cc>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      4567d5c3
    • I
      net: phy: aquantia: remove the use of .ack_interrupt() · e11ef96d
      Ioana Ciornei 提交于
      In preparation of removing the .ack_interrupt() callback, we must replace
      its occurrences (aka phy_clear_interrupt), from the 2 places where it is
      called from (phy_enable_interrupts and phy_disable_interrupts), with
      equivalent functionality.
      
      This means that clearing interrupts now becomes something that the PHY
      driver is responsible of doing, before enabling interrupts and after
      clearing them. Make this driver follow the new contract.
      
      Cc: Heiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      e11ef96d
    • I
      net: phy: aquantia: implement generic .handle_interrupt() callback · 6ab930df
      Ioana Ciornei 提交于
      In an attempt to actually support shared IRQs in phylib, we now move the
      responsibility of triggering the phylib state machine or just returning
      IRQ_NONE, based on the IRQ status register, to the PHY driver. Having
      3 different IRQ handling callbacks (.handle_interrupt(),
      .did_interrupt() and .ack_interrupt() ) is confusing so let the PHY
      driver implement directly an IRQ handler like any other device driver.
      Make this driver follow the new convention.
      
      Cc: Heiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      6ab930df
    • I
      net: phy: mscc: remove the use of .ack_interrupt() · 30446ae4
      Ioana Ciornei 提交于
      In preparation of removing the .ack_interrupt() callback, we must replace
      its occurrences (aka phy_clear_interrupt), from the 2 places where it is
      called from (phy_enable_interrupts and phy_disable_interrupts), with
      equivalent functionality.
      
      This means that clearing interrupts now becomes something that the PHY
      driver is responsible of doing, before enabling interrupts and after
      clearing them. Make this driver follow the new contract.
      
      Cc: Antoine Tenart <atenart@kernel.org>
      Signed-off-by: NIoana Ciornei <ioana.ciornei@nxp.com>
      Tested-by: Vladimir Oltean <olteanv@gmail.com> # VSC8514
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      30446ae4
    • I
      net: phy: mscc: implement generic .handle_interrupt() callback · 4008f373
      Ioana Ciornei 提交于
      In an attempt to actually support shared IRQs in phylib, we now move the
      responsibility of triggering the phylib state machine or just returning
      IRQ_NONE, based on the IRQ status register, to the PHY driver. Having
      3 different IRQ handling callbacks (.handle_interrupt(),
      .did_interrupt() and .ack_interrupt() ) is confusing so let the PHY
      driver implement directly an IRQ handler like any other device driver.
      Make this driver follow the new convention.
      
      Also, remove the .did_interrupt() callback since it's not anymore used.
      Signed-off-by: NIoana Ciornei <ioana.ciornei@nxp.com>
      Tested-by: Vladimir Oltean <olteanv@gmail.com> # VSC8514
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      4008f373
    • I
      net: phy: mscc: use phy_trigger_machine() to notify link change · f2e90604
      Ioana Ciornei 提交于
      According to the comment describing the phy_mac_interrupt() function, it
      it intended to be used by MAC drivers which have noticed a link change
      thus its use in the mscc PHY driver is improper and, most probably, was
      added just because phy_trigger_machine() was not exported.
      Now that we have acces to trigger the link state machine, use directly
      the phy_trigger_machine() function to notify a link change detected by
      the PHY driver.
      Signed-off-by: NIoana Ciornei <ioana.ciornei@nxp.com>
      Tested-by: NVladimir Oltean <olteanv@gmail.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      f2e90604
    • I
      net: phy: at803x: remove the use of .ack_interrupt() · a3417885
      Ioana Ciornei 提交于
      In preparation of removing the .ack_interrupt() callback, we must replace
      its occurrences (aka phy_clear_interrupt), from the 2 places where it is
      called from (phy_enable_interrupts and phy_disable_interrupts), with
      equivalent functionality.
      
      This means that clearing interrupts now becomes something that the PHY
      driver is responsible of doing, before enabling interrupts and after
      clearing them. Make this driver follow the new contract.
      
      Cc: Oleksij Rempel <o.rempel@pengutronix.de>
      Cc: Michael Walle <michael@walle.cc>
      Signed-off-by: NIoana Ciornei <ioana.ciornei@nxp.com>
      Tested-by: NOleksij Rempel <o.rempel@pengutronix.de>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      a3417885
    • I
      net: phy: at803x: implement generic .handle_interrupt() callback · 29773097
      Ioana Ciornei 提交于
      In an attempt to actually support shared IRQs in phylib, we now move the
      responsibility of triggering the phylib state machine or just returning
      IRQ_NONE, based on the IRQ status register, to the PHY driver. Having
      3 different IRQ handling callbacks (.handle_interrupt(),
      .did_interrupt() and .ack_interrupt() ) is confusing so let the PHY
      driver implement directly an IRQ handler like any other device driver.
      Make this driver follow the new convention.
      
      Cc: Oleksij Rempel <o.rempel@pengutronix.de>
      Cc: Michael Walle <michael@walle.cc>
      Signed-off-by: NIoana Ciornei <ioana.ciornei@nxp.com>
      Tested-by: NOleksij Rempel <o.rempel@pengutronix.de>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      29773097
    • I
      net: phy: make .ack_interrupt() optional · 7b2d5908
      Ioana Ciornei 提交于
      As a first step into making phylib and all PHY drivers to actually
      have support for shared IRQs, make the .ack_interrupt() callback
      optional.
      
      After all drivers have been moved to implement the generic
      interrupt handle, the phy_drv_supports_irq() check will be
      changed again to only require the .handle_interrupts() callback.
      
      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: NIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      7b2d5908
    • I
      net: phy: add a shutdown procedure · e2f016cf
      Ioana Ciornei 提交于
      In case of a board which uses a shared IRQ we can easily end up with an
      IRQ storm after a forced reboot.
      
      For example, a 'reboot -f' will trigger a call to the .shutdown()
      callbacks of all devices. Because phylib does not implement that hook,
      the PHY is not quiesced, thus it can very well leave its IRQ enabled.
      
      At the next boot, if that IRQ line is found asserted by the first PHY
      driver that uses it, but _before_ the driver that is _actually_ keeping
      the shared IRQ asserted is probed, the IRQ is not going to be
      acknowledged, thus it will keep being fired preventing the boot process
      of the kernel to continue. This is even worse when the second PHY driver
      is a module.
      
      To fix this, implement the .shutdown() callback and disable the
      interrupts if these are used.
      
      Note that we are still susceptible to IRQ storms if the previous kernel
      exited with a panic or if the bootloader left the shared IRQ active, but
      there is absolutely nothing we can do about these cases.
      
      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: NIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      e2f016cf
    • I
      net: phy: export phy_error and phy_trigger_machine · 293e9a3d
      Ioana Ciornei 提交于
      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: NIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      293e9a3d
  2. 05 11月, 2020 2 次提交
    • A
      net: phy: adin: implement cable-test support · f2531d45
      Alexandru Ardelean 提交于
      The ADIN1300/ADIN1200 support cable diagnostics using TDR.
      
      The cable fault detection is automatically run on all four pairs looking at
      all combinations of pair faults by first putting the PHY in standby (clear
      the LINK_EN bit, PHY_CTRL_3 register, Address 0x0017) and then enabling the
      diagnostic clock (set the DIAG_CLK_EN bit, PHY_CTRL_1 register, Address
      0x0012).
      
      Cable diagnostics can then be run (set the CDIAG_RUN bit in the
      CDIAG_RUN register, Address 0xBA1B). The results are reported for each pair
      in the cable diagnostics results registers, CDIAG_DTLD_RSLTS_0,
      CDIAG_DTLD_RSLTS_1, CDIAG_DTLD_RSLTS_2, and CDIAG_DTLD_RSLTS_3, Address
      0xBA1D to Address 0xBA20).
      
      The distance to the first fault for each pair is reported in the cable
      fault distance registers, CDIAG_FLT_DIST_0, CDIAG_FLT_DIST_1,
      CDIAG_FLT_DIST_2, and CDIAG_FLT_DIST_3, Address 0xBA21 to Address 0xBA24).
      
      This change implements support for this using phylib's cable-test support.
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NAlexandru Ardelean <alexandru.ardelean@analog.com>
      Link: https://lore.kernel.org/r/20201103074436.93790-2-alexandru.ardelean@analog.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      f2531d45
    • A
      net: phy: adin: disable diag clock & disable standby mode in config_aneg · 85ba75bb
      Alexandru Ardelean 提交于
      When the PHY powers up, the diagnostics clock isn't enabled (bit 2 in
      register PHY_CTRL_1 (0x0012)).
      Also, the PHY is not in standby mode, so bit 13 in PHY_CTRL_3 (0x0017) is
      always set at power up.
      
      The standby mode and the diagnostics clock are both meant to be for the
      cable diagnostics feature of the PHY (in phylib this would be equivalent to
      the cable-test support), and for the frame-generator feature of the PHY.
      
      In standby mode, the PHY doesn't negotiate links or manage links.
      
      To use the cable diagnostics/test (or frame-generator), the PHY must be
      first set in standby mode, so that the link operation doesn't interfere.
      Then, the diagnostics clock must be enabled.
      
      For the cable-test feature, when the operation finishes, the PHY goes into
      PHY_UP state, and the config_aneg hook is called.
      
      For the ADIN PHY, we need to make sure that during autonegotiation
      configuration/setup the PHY is removed from standby mode and the
      diagnostics clock is disabled, so that normal operation is resumed.
      
      This change does that by moving the set of the ADIN1300_LINKING_EN bit (2)
      in the config_aneg (to disable standby mode).
      Previously, this was set in the downshift setup, because the downshift
      retry value and the ADIN1300_LINKING_EN are in the same register.
      
      And the ADIN1300_DIAG_CLK_EN bit (13) is cleared, to disable the
      diagnostics clock.
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NAlexandru Ardelean <alexandru.ardelean@analog.com>
      Link: https://lore.kernel.org/r/20201103074436.93790-1-alexandru.ardelean@analog.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      85ba75bb
  3. 04 11月, 2020 1 次提交
  4. 31 10月, 2020 3 次提交
  5. 28 10月, 2020 1 次提交
  6. 05 10月, 2020 1 次提交
  7. 04 10月, 2020 1 次提交
  8. 02 10月, 2020 1 次提交
    • W
      net: phy: realtek: Modify 2.5G PHY name to RTL8226 · 7a333af6
      Willy Liu 提交于
      Realtek single-chip Ethernet PHY solutions can be separated as below:
      10M/100Mbps: RTL8201X
      1Gbps: RTL8211X
      2.5Gbps: RTL8226/RTL8221X
      RTL8226 is the first version for realtek that compatible 2.5Gbps single PHY.
      Since RTL8226 is single port only, realtek changes its name to RTL8221B from
      the second version.
      PHY ID for RTL8226 is 0x001cc800 and RTL8226B/RTL8221B is 0x001cc840.
      
      RTL8125 is not a single PHY solution, it integrates PHY/MAC/PCIE bus
      controller and embedded memory.
      Signed-off-by: NWilly Liu <willy.liu@realtek.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7a333af6
  9. 30 9月, 2020 2 次提交
    • S
      net: mdiobus: Remove WARN_ON_ONCE(in_interrupt()) · 85bdebd1
      Sebastian Andrzej Siewior 提交于
      in_interrupt() is ill defined and does not provide what the name
      suggests. The usage especially in driver code is deprecated and a tree wide
      effort to clean up and consolidate the (ab)usage of in_interrupt() and
      related checks is happening.
      
      In this case the check covers only parts of the contexts in which these
      functions cannot be called. It fails to detect preemption or interrupt
      disabled invocations.
      
      As the functions which contain these warnings invoke mutex_lock() which
      contains a broad variety of checks (always enabled or debug option
      dependent) and therefore covers all invalid conditions already, there is no
      point in having inconsistent warnings in those drivers. The conditional
      return is not really valuable in practice either.
      
      Just remove them.
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      85bdebd1
    • W
      net: phy: realtek: fix rtl8211e rx/tx delay config · bbc4d71d
      Willy Liu 提交于
      There are two chip pins named TXDLY and RXDLY which actually adds the 2ns
      delays to TXC and RXC for TXD/RXD latching. These two pins can config via
      4.7k-ohm resistor to 3.3V hw setting, but also config via software setting
      (extension page 0xa4 register 0x1c bit13 12 and 11).
      
      The configuration register definitions from table 13 official PHY datasheet:
      PHYAD[2:0] = PHY Address
      AN[1:0] = Auto-Negotiation
      Mode = Interface Mode Select
      RX Delay = RX Delay
      TX Delay = TX Delay
      SELRGV = RGMII/GMII Selection
      
      This table describes how to config these hw pins via external pull-high or pull-
      low resistor.
      
      It is a misunderstanding that mapping it as register bits below:
      8:6 = PHY Address
      5:4 = Auto-Negotiation
      3 = Interface Mode Select
      2 = RX Delay
      1 = TX Delay
      0 = SELRGV
      So I removed these descriptions above and add related settings as below:
      14 = reserved
      13 = force Tx RX Delay controlled by bit12 bit11
      12 = Tx Delay
      11 = Rx Delay
      10:0 = Test && debug settings reserved by realtek
      
      Test && debug settings are not recommend to modify by default.
      
      Fixes: f81dadbc ("net: phy: realtek: Add rtl8211e rx/tx delays config")
      Signed-off-by: NWilly Liu <willy.liu@realtek.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bbc4d71d
  10. 29 9月, 2020 3 次提交
  11. 28 9月, 2020 1 次提交
  12. 24 9月, 2020 1 次提交
  13. 22 9月, 2020 2 次提交
  14. 20 9月, 2020 2 次提交