]> www.infradead.org Git - users/dwmw2/linux.git/commit
net: sparx5: add ops to match data
authorDaniel Machon <daniel.machon@microchip.com>
Fri, 4 Oct 2024 13:19:34 +0000 (15:19 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 8 Oct 2024 10:07:01 +0000 (12:07 +0200)
commit048c96907ca150c487da66ce0cc3528ab68a1661
treed788bed5b27549f054bcfd16791d27c86f9f8bf6
parent559fb423d5f2d64b6cd74f4ad7bdc09795c67a06
net: sparx5: add ops to match data

Add new struct sparx5_ops, containing functions that needs to be
different as the implementation differs on Sparx5 and lan969x. Initially
we add functions for checking the port type (2g5, 5g, 10g or 25g) based
on the port number. Update the code to use the ops instead of the
platform specific functions.

Reviewed-by: Steen Hegelund <Steen.Hegelund@microchip.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Daniel Machon <daniel.machon@microchip.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/microchip/sparx5/sparx5_main.c
drivers/net/ethernet/microchip/sparx5/sparx5_main.h
drivers/net/ethernet/microchip/sparx5/sparx5_port.c
drivers/net/ethernet/microchip/sparx5/sparx5_port.h