1. 05 Sep, 2022 6 commits
    • David S. Miller's avatar
      Merge branch 'altera-tse-phylink' · 7752422f
      David S. Miller authored
      Maxime Chevallier says:
      
      ====================
      net: altera: tse: phylink conversion
      
      This is V4 of a series converting the Altera TSE driver to phylink,
      introducing a new PCS driver along the way.
      
      The Altera TSE can be built with a SGMII/1000BaseX PCS, allowing to use
      SFP ports with this MAC, which is the end goal of adding phylink support
      and a proper PCS driver.
      
      The PCS itself can either be mapped in the MAC's register space, in that
      case, it's accessed through 32 bits registers, with the higher 16 bits
      always 0. Alternatively, it can sit on its own register space, exposing
      16 bits registers, some of which ressemble the standard PHY registers.
      
      To tackle that rework, several things needs updating, starting by the DT
      binding, since we add support for a new register range for the PCS.
      
      Hence, the first patch of the series is a conversion to YAML of the
      existing binding.
      
      Then, patch 2 does a bit of simple cleanup to the TSE driver, using nice
      reverse xmas tree definitions.
      
      Patch 3 adds the actual PCS driver, as a standalone driver. Some future
      series will then reuse that PCS driver from the dwmac-socfpga driver,
      which implements support for this exact PCS too, allowing to share the
      code nicely.
      
      Patch 4 is then a phylink conversion of the altera_tse driver, to use
      this new PCS driver.
      
      Finally, patch 5 updates the newly converted DT binding to support the
      pcs register range.
      
      This series contains bits and pieces for this conversion, please tell me if
      you want me to send it as individual patches.
      
      V4 Changes:
       - Add missing MODULE_* macros to the TSE PCS driver
      
      V3 Changes:
       - YAML binding conversion changes and PCS addition changes thanks to
         Krzysztof's reviews
      
      V2 Changes :
       - Fixed the binding after the YAML conversion
       - Added a pcs_validate() callback
       - Introduced a comment to justify a soft reset for the PCS
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7752422f
    • Maxime Chevallier's avatar
      dt-bindings: net: altera: tse: add an optional pcs register range · 565f02fc
      Maxime Chevallier authored
      Some implementations of the TSE have their PCS as an external bloc,
      exposed at its own register range. Document this, and add a new example
      showing a case using the pcs and the new phylink conversion to connect
      an sfp port to a TSE mac.
      Signed-off-by: default avatarMaxime Chevallier <maxime.chevallier@bootlin.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      565f02fc
    • Maxime Chevallier's avatar
      net: altera: tse: convert to phylink · fef29982
      Maxime Chevallier authored
      Convert the Altera Triple Speed Ethernet Controller to phylink.
      This controller supports MII, GMII and RGMII with its MAC, and
      SGMII + 1000BaseX through a small embedded PCS.
      
      The PCS itself has a register set very similar to what is found in a
      typical 802.3 ethernet PHY, but this register set memory-mapped instead
      of lying on an mdio bus.
      Signed-off-by: default avatarMaxime Chevallier <maxime.chevallier@bootlin.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fef29982
    • Maxime Chevallier's avatar
      net: pcs: add new PCS driver for altera TSE PCS · 4a502cf4
      Maxime Chevallier authored
      The Altera Triple Speed Ethernet has a SGMII/1000BaseC PCS that can be
      integrated in several ways. It can either be part of the TSE MAC's
      address space, accessed through 32 bits accesses on the mapped mdio
      device 0, or through a dedicated 16 bits register set.
      
      This driver allows using the TSE PCS outside of altera TSE's driver,
      since it can be used standalone by other MACs.
      Signed-off-by: default avatarMaxime Chevallier <maxime.chevallier@bootlin.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4a502cf4
    • Maxime Chevallier's avatar
      net: altera: tse: cosmetic change to use reverse xmas tree ordering · 5adb0ed0
      Maxime Chevallier authored
      Make the driver code cleaner through a strictly cosmetic change, using
      he reverse xmas tree variable declaration ordering.
      Signed-off-by: default avatarMaxime Chevallier <maxime.chevallier@bootlin.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5adb0ed0
    • Maxime Chevallier's avatar
      dt-bindings: net: Convert Altera TSE bindings to yaml · b0155d90
      Maxime Chevallier authored
      Convert the bindings for the Altera Triple-Speed Ethernet to yaml.
      Signed-off-by: default avatarMaxime Chevallier <maxime.chevallier@bootlin.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b0155d90
  2. 04 Sep, 2022 1 commit
  3. 03 Sep, 2022 29 commits
  4. 02 Sep, 2022 4 commits
    • Jakub Kicinski's avatar
      net: remove netif_tx_napi_add() · c3f760ef
      Jakub Kicinski authored
      All callers are now gone.
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c3f760ef
    • Eric Dumazet's avatar
      net: bql: add more documentation · 977f1aa5
      Eric Dumazet authored
      Add some documentation for netdev_tx_sent_queue() and
      netdev_tx_completed_queue()
      
      Stating that netdev_tx_completed_queue() must be called once
      per TX completion round is apparently not obvious for everybody.
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      977f1aa5
    • David S. Miller's avatar
      Merge branch 'net-ipa-transaction-state-IDs' · 25de4a0b
      David S. Miller authored
      Alex Elder says:
      
      ====================
      net: ipa: use IDs to track transaction state
      
      This series is the first of three groups of changes that simplify
      the way the IPA driver tracks the state of its transactions.
      
      Each GSI channel has a fixed number of transactions allocated at
      initialization time.  The number allocated matches the number of
      TREs in the transfer ring associated with the channel.  This is
      because the transfer ring limits the number of transfers that can
      ever be underway, and in the worst case, each transaction represents
      a single TRE.
      
      Transactions go through various states during their lifetime.
      Currently a set of lists keeps track of which transactions are in
      each state.  Initially, all transactions are free.  An allocated
      transaction is placed on the allocated list.  Once an allocated
      transaction is committed, it is moved from the allocated to the
      committed list.  When a committed transaction is sent to hardware
      (via a doorbell) it is moved to the pending list.  When hardware
      signals that some work has completed, transactions are moved to the
      completed list.  Finally, when a completed transaction is polled
      it's moved to the polled list before being removed when it becomes
      free.
      
      Changing a transaction's state thus normally involves manipulating
      two lists, and to prevent corruption a spinlock is held while the
      lists are updated.
      
      Transactions move through their states in a well-defined sequence
      though, and they do so strictly in order.  So transaction 0 is
      always allocated before transaction 1; transaction 0 is always
      committed before transaction 1; and so on, through completion,
      polling, and becoming free.  Because of this, it's sufficient to
      just keep track of which transaction is the first in each state.
      The rest of the transactions in a given state can be derived from
      the first transaction in an "adjacent" state.  As a result, we can
      track the state of all transactions with a set of indexes, and can
      update these without the need for a spinlock.
      
      This first group of patches just defines the set of indexes that
      will be used for this new way of tracking transaction state.  Two
      more groups of patches will follow.  I've broken the 17 patches into
      these three groups to facilitate review.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      25de4a0b
    • Alex Elder's avatar
      net: ipa: track polled transactions with an ID · fd3bd039
      Alex Elder authored
      Add a transaction ID to track the first element in the transaction
      array that has been polled.  Advance the ID when we are releasing a
      transaction.
      
      Temporarily add warnings that verify that the first polled
      transaction tracked by the ID matches the first element on the
      polled list, both when polling and freeing.
      
      Remove the temporary warnings added by the previous commit.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fd3bd039