]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: dsa: microchip: bypass dev_ops for port_setup()
authorBastien Curutchet (Schneider Electric) <bastien.curutchet@bootlin.com>
Thu, 21 May 2026 06:12:41 +0000 (08:12 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sat, 23 May 2026 01:40:49 +0000 (18:40 -0700)
commitaa6902098914bd863fda7d22ccf84edf623d0685
treea07e091c4dfebd674ddcc75c2ecd5d79efdd7444
parentdf478153cb2d02f13cbcc61300a977b9176dfdb5
net: dsa: microchip: bypass dev_ops for port_setup()

port_setup() is handled through a common function that redirects
the treatment to ksz_dev_ops callbacks. This layer of indirection
isn't needed since we now have a dsa_switch_ops for each switch family

Remove one indirection layer for KSZ switches, by connecting the
ksz_dev_ops :: port_setup() operations directly to dsa_switch_ops.
Make ksz9477_set_default_prio_queue_mapping() non-static since it's used
by ksz_common for tc operations and by ksz9477.c for this port_setup().
Remove the now unused port_setup() callback from ksz_dev_ops.

Signed-off-by: Bastien Curutchet (Schneider Electric) <bastien.curutchet@bootlin.com>
Link: https://patch.msgid.link/20260521-clean-ksz-2nd-series-v3-6-75c38971c19a@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/microchip/ksz8.c
drivers/net/dsa/microchip/ksz9477.c
drivers/net/dsa/microchip/ksz_common.c
drivers/net/dsa/microchip/ksz_common.h
drivers/net/dsa/microchip/lan937x_main.c