1. 25 Nov, 2020 10 commits
    • Ioana Ciornei's avatar
      net: phy: micrel: remove the use of .ack_interrupt() · c0c99d0c
      Ioana Ciornei authored
      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: Divya Koppera <Divya.Koppera@microchip.com>
      Cc: Oleksij Rempel <o.rempel@pengutronix.de>
      Cc: Philippe Schenker <philippe.schenker@toradex.com>
      Cc: Marek Vasut <marex@denx.de>
      Cc: Antoine Tenart <atenart@kernel.org>
      Signed-off-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      c0c99d0c
    • Ioana Ciornei's avatar
      net: phy: micrel: implement generic .handle_interrupt() callback · 59ca4e58
      Ioana Ciornei authored
      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: Divya Koppera <Divya.Koppera@microchip.com>
      Cc: Oleksij Rempel <o.rempel@pengutronix.de>
      Cc: Philippe Schenker <philippe.schenker@toradex.com>
      Cc: Marek Vasut <marex@denx.de>
      Cc: Antoine Tenart <atenart@kernel.org>
      Signed-off-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      59ca4e58
    • Ioana Ciornei's avatar
      net: phy: meson-gxl: remove the use of .ack_callback() · 84c8f773
      Ioana Ciornei authored
      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: Jerome Brunet <jbrunet@baylibre.com>
      Cc: Neil Armstrong <narmstrong@baylibre.com>
      Signed-off-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      84c8f773
    • Ioana Ciornei's avatar
      net: phy: meson-gxl: implement generic .handle_interrupt() callback · 6719e2be
      Ioana Ciornei authored
      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: Jerome Brunet <jbrunet@baylibre.com>
      Cc: Neil Armstrong <narmstrong@baylibre.com>
      Signed-off-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      6719e2be
    • Ioana Ciornei's avatar
      net: phy: icplus: remove the use .ack_interrupt() · 12ae7ba3
      Ioana Ciornei authored
      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>
      Signed-off-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      12ae7ba3
    • Ioana Ciornei's avatar
      net: phy: icplus: implement generic .handle_interrupt() callback · 25497b7f
      Ioana Ciornei authored
      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>
      Signed-off-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      25497b7f
    • Ioana Ciornei's avatar
      net: phy: intel-xway: remove the use of .ack_interrupt() · 16c9709a
      Ioana Ciornei authored
      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: Mathias Kresin <dev@kresin.me>
      Cc: Hauke Mehrtens <hauke@hauke-m.de>
      Signed-off-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      16c9709a
    • Ioana Ciornei's avatar
      net: phy: intel-xway: implement generic .handle_interrupt() callback · 1566db04
      Ioana Ciornei authored
      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: Mathias Kresin <dev@kresin.me>
      Cc: Hauke Mehrtens <hauke@hauke-m.de>
      Signed-off-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      1566db04
    • Sven Van Asbroeck's avatar
      lan743x: replace polling loop by wait_event_timeout() · 470dfd80
      Sven Van Asbroeck authored
      The driver's ISR sends a 'software interrupt' event to the probe()
      thread using the following method:
      - probe(): write 0 to flag, enable s/w interrupt
      - probe(): poll on flag, relax using usleep_range()
      - ISR    : write 1 to flag
      
      Replace with wake_up() / wait_event_timeout(). Besides being easier
      to get right, this abstraction has better timing and memory
      consistency properties.
      
      Tested-by: Sven Van Asbroeck <thesven73@gmail.com> # lan7430
      Signed-off-by: default avatarSven Van Asbroeck <thesven73@gmail.com>
      Link: https://lore.kernel.org/r/20201123191529.14908-2-TheSven73@gmail.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      470dfd80
    • Sven Van Asbroeck's avatar
      lan743x: clean up software_isr function · c31799ba
      Sven Van Asbroeck authored
      For no apparent reason, this function reads the INT_STS register, and
      checks if the software interrupt bit is set. These things have already
      been carried out by this function's only caller.
      
      Clean up by removing the redundant code.
      
      Tested-by: Sven Van Asbroeck <thesven73@gmail.com> # lan7430
      Signed-off-by: default avatarSven Van Asbroeck <thesven73@gmail.com>
      Link: https://lore.kernel.org/r/20201123191529.14908-1-TheSven73@gmail.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      c31799ba
  2. 24 Nov, 2020 28 commits
  3. 23 Nov, 2020 2 commits