Skip to content

Commit 586b298

Browse files
committed
Merge branch 'net-lan969x-add-fdma-support'
Daniel Machon says: ==================== net: lan969x: add FDMA support == 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 v1: https://lore.kernel.org/20250109-sparx5-lan969x-switch-driver-5-v1-0-13d6d8451e63@microchip.com ==================== Link: https://patch.msgid.link/20250113-sparx5-lan969x-switch-driver-5-v2-0-c468f02fd623@microchip.com Signed-off-by: Jakub Kicinski <[email protected]>
2 parents e80ed97 + d84ad2c commit 586b298

File tree

9 files changed

+518
-33
lines changed

9 files changed

+518
-33
lines changed

drivers/net/ethernet/microchip/sparx5/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,6 @@ config SPARX5_DCB
2828
config LAN969X_SWITCH
2929
bool "Lan969x switch driver"
3030
depends on SPARX5_SWITCH
31+
select PAGE_POOL
3132
help
3233
This driver supports the lan969x family of network switch devices.

drivers/net/ethernet/microchip/sparx5/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ sparx5-switch-$(CONFIG_LAN969X_SWITCH) += lan969x/lan969x_regs.o \
2121
lan969x/lan969x_calendar.o \
2222
lan969x/lan969x_vcap_ag_api.o \
2323
lan969x/lan969x_vcap_impl.o \
24-
lan969x/lan969x_rgmii.o
24+
lan969x/lan969x_rgmii.o \
25+
lan969x/lan969x_fdma.o
2526

2627
# Provide include files
2728
ccflags-y += -I$(srctree)/drivers/net/ethernet/microchip/vcap

drivers/net/ethernet/microchip/sparx5/lan969x/lan969x.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,10 @@ static const struct sparx5_ops lan969x_ops = {
341341
.ptp_irq_handler = &lan969x_ptp_irq_handler,
342342
.dsm_calendar_calc = &lan969x_dsm_calendar_calc,
343343
.port_config_rgmii = &lan969x_port_config_rgmii,
344+
.fdma_init = &lan969x_fdma_init,
345+
.fdma_deinit = &lan969x_fdma_deinit,
346+
.fdma_poll = &lan969x_fdma_napi_poll,
347+
.fdma_xmit = &lan969x_fdma_xmit,
344348
};
345349

346350
const struct sparx5_match_data lan969x_desc = {

drivers/net/ethernet/microchip/sparx5/lan969x/lan969x.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,11 @@ int lan969x_dsm_calendar_calc(struct sparx5 *sparx5, u32 taxi,
7272
int lan969x_port_config_rgmii(struct sparx5_port *port,
7373
struct sparx5_port_config *conf);
7474

75+
/* lan969x_fdma.c */
76+
int lan969x_fdma_init(struct sparx5 *sparx5);
77+
int lan969x_fdma_deinit(struct sparx5 *sparx5);
78+
int lan969x_fdma_napi_poll(struct napi_struct *napi, int weight);
79+
int lan969x_fdma_xmit(struct sparx5 *sparx5, u32 *ifh, struct sk_buff *skb,
80+
struct net_device *dev);
81+
7582
#endif

0 commit comments

Comments
 (0)