mbox series

[net-next,v2,0/5] net: lan969x: add FDMA support

Message ID 20250113-sparx5-lan969x-switch-driver-5-v2-0-c468f02fd623@microchip.com (mailing list archive)
Headers show
Series net: lan969x: add FDMA support | expand

Message

Daniel Machon Jan. 13, 2025, 7:36 p.m. UTC
== Description:

This series is the last of a multi-part series, that prepares and adds
support for the new lan969x switch driver.

The upstreaming efforts has been split into multiple series:

        1) Prepare the Sparx5 driver for lan969x (merged)

        2) Add support for lan969x (same basic features as Sparx5
           provides excl. FDMA and VCAP, merged).

        3) Add lan969x VCAP functionality (merged).

        4) Add RGMII support (merged).

    --> 5) Add FDMA support.

== FDMA support:

The lan969x switch device uses the same FDMA engine as the Sparx5 switch
device, with the same number of channels etc. This means we can utilize
the newly added FDMA library, that is already in use by the lan966x and
sparx5 drivers.

As previous lan969x series, the FDMA implementation will hook into the
Sparx5 implementation where possible, however both RX and TX handling
will be done differently on lan969x and therefore requires a separate
implementation of the RX and TX path.

Details are in the commit description of the individual patches

== Patch breakdown:

Patch #1: Enable FDMA support on lan969x
Patch #2: Split start()/stop() functions
Patch #3: Activate TX FDMA in start()
Patch #4: Ops out a few functions that differ on the two platforms
Patch #5: Add FDMA implementation for lan969x

Signed-off-by: Daniel Machon <daniel.machon@microchip.com>
---
Changes in v2:
- Dropped patch 4/6. Added a conditional check in 5/5 instead. This
  check makes sure SKB's are not freed in xmit() on lan969x, but rather
  the TX completion loop.

- Added 'struct net_device' to xmit() prototypes.

- Removed duplicate dcb_reload in NAPI poll loop 

- Link to v1:
  https://lore.kernel.org/r/20250109-sparx5-lan969x-switch-driver-5-v1-0-13d6d8451e63@microchip.com

---
Daniel Machon (5):
      net: sparx5: enable FDMA on lan969x
      net: sparx5: split sparx5_fdma_{start(),stop()}
      net: sparx5: activate FDMA tx in start()
      net: sparx5: ops out certain FDMA functions
      net: lan969x: add FDMA implementation

 drivers/net/ethernet/microchip/sparx5/Kconfig      |   1 +
 drivers/net/ethernet/microchip/sparx5/Makefile     |   3 +-
 .../ethernet/microchip/sparx5/lan969x/lan969x.c    |   4 +
 .../ethernet/microchip/sparx5/lan969x/lan969x.h    |   7 +
 .../microchip/sparx5/lan969x/lan969x_fdma.c        | 406 +++++++++++++++++++++
 .../net/ethernet/microchip/sparx5/sparx5_fdma.c    |  68 ++--
 .../net/ethernet/microchip/sparx5/sparx5_main.c    |  19 +-
 .../net/ethernet/microchip/sparx5/sparx5_main.h    |  32 +-
 .../net/ethernet/microchip/sparx5/sparx5_packet.c  |  11 +-
 9 files changed, 518 insertions(+), 33 deletions(-)
---
base-commit: 7d0da8f862340c5f42f0062b8560b8d0971a6ac4
change-id: 20250106-sparx5-lan969x-switch-driver-5-52a46ecb5488

Best regards,