]> www.infradead.org Git - users/hch/misc.git/commit
net: sparx5: split sparx5_fdma_{start(),stop()}
authorDaniel Machon <daniel.machon@microchip.com>
Mon, 13 Jan 2025 19:36:06 +0000 (20:36 +0100)
committerJakub Kicinski <kuba@kernel.org>
Wed, 15 Jan 2025 22:13:33 +0000 (14:13 -0800)
commitb91dcb237c69a05b06d64e2f4ba0a74a0552b80f
tree5697b4bd97ac61124986d85f1126020d0044f3c2
parent4a7d78c27806bc9b90560438e6aef22efd6050fd
net: sparx5: split sparx5_fdma_{start(),stop()}

The two functions: sparx5_fdma_{start(),stop()} are responsible for a
number of things, namely: allocation and initialization of FDMA buffers,
activation FDMA channels in hardware and activation of the NAPI
instance.

This patch splits the buffer allocation and initialization into init and
deinit functions, and the channel and NAPI activation into start and
stop functions. This serves two purposes: 1) the start() and stop()
functions can be reused for lan969x and 2) prepares for future MTU
change support, where we must be able to stop and start the FDMA
channels and NAPI instance, without free'ing and reallocating the FDMA
buffers.

Reviewed-by: Steen Hegelund <Steen.Hegelund@microchip.com>
Signed-off-by: Daniel Machon <daniel.machon@microchip.com>
Link: https://patch.msgid.link/20250113-sparx5-lan969x-switch-driver-5-v2-2-c468f02fd623@microchip.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/microchip/sparx5/sparx5_fdma.c
drivers/net/ethernet/microchip/sparx5/sparx5_main.c
drivers/net/ethernet/microchip/sparx5/sparx5_main.h