All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 00/15] net: dsa: microchip: Remove unnecessary ksz_dev_ops callbacks
@ 2026-05-12 13:06 Bastien Curutchet (Schneider Electric)
  2026-05-12 13:06 ` [PATCH net-next 01/15] net: dsa: microchip: remove unused phylink_mac_link_up() callback Bastien Curutchet (Schneider Electric)
                   ` (15 more replies)
  0 siblings, 16 replies; 18+ messages in thread
From: Bastien Curutchet (Schneider Electric) @ 2026-05-12 13:06 UTC (permalink / raw)
  To: Woojung Huh, UNGLinuxDriver, Andrew Lunn, Vladimir Oltean,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Russell King, Richard Cochran
  Cc: Pascal Eberhard, Miquèl Raynal, Thomas Petazzoni,
	Tristram Ha, netdev, linux-kernel,
	Bastien Curutchet (Schneider Electric), Vladimir Oltean

Hi all,

This series continues the rework of the KSZ driver initiated by a previous
series (see [1]), following the discussion we had here [2].

The KSZ driver got way too convoluted over time because it uses a common
framework to handle more than 20 switches split in 5 families (see below
table)

+----------+---------+---------+---------+---------+---------+
| Family   | KSZ8463 | KSZ87xx | KSZ88xx | KSZ9477 | LAN937X |
+----------+---------+---------+---------+---------+---------+
| Switches | KSZ8463 | KSZ8795 | KSZ88X3 | KSZ8563 | LAN9370 |
|          |         | KSZ8794 | KSZ8864 | KSZ9477 | LAN9371 |
|          |         | KSZ8765 | KSZ8895 | KSZ9896 | LAN9372 |
|          |         |         |         | KSZ9897 | LAN9373 |
|          |         |         |         | KSZ9893 | LAN9374 |
|          |         |         |         | KSZ9563 |         |
|          |         |         |         | KSZ8567 |         |
|          |         |         |         | KSZ9567 |         |
|          |         |         |         | LAN9646 |         |
+----------+---------+---------+---------+---------+---------+

The previous series ([1]) replaced the unique dsa_swicth_ops struct used
by all the KSZ families with one dsa_switch_ops struct for each family.

These dsa_switch_ops structs still rely on common functions that redirect
the calls to ksz_dev_ops operations which are custom to each switch
family. Many of hese ksz_dev_ops callbacks have a direct equivalent in the
struct dsa_switch_ops. This series directly connects the implementations of
these ksz_dev_ops operations to the relevant dsa_switch_ops attribute
to get rid of one unnecessary level of indirection.

On top of this on-going rework I added PTP and periodic output support for
the KSZ8463 (which was my first goal). There are more than 60 patches for
all this so this series will be followed by several others and if you
want to see the full picture we can check my github ([3]).

I haven't finished yet to group all the patches into meaningful series
but here is more or less what I plan to do next:

- A series will split again some operations to get rid of the
  if (is_kszXYZ) branches.
- Maybe another series will be needed to completely move out of
  ksz_common.c everything that isn't truly common to all the switches
- A series will add PTP support for the KSZ8463
- A final series will add periodic output support for the KSZ8463

[1]: https://lore.kernel.org/r/20260505-clean-ksz-driver-v1-0-05d70fa42461@bootlin.com
[2]: https://lore.kernel.org/r/20260304-ksz8463-ptp-v6-0-3f4c47954c71@bootlin.com)
[3]: https://github.com/bastien-curutchet/linux/tree/ksz_rework

Signed-off-by: Bastien Curutchet (Schneider Electric) <bastien.curutchet@bootlin.com>
---
Bastien Curutchet (Schneider Electric) (4):
      net: dsa: microchip: remove unused phylink_mac_link_up() callback
      net: dsa: microchip: bypass dev_ops for port_setup()
      net: dsa: microchip: call DSA's phy_{read/write} to do mdio {read/write}
      net: dsa: microchip: bypass dev_ops for phy_read()/phy_write()

Vladimir Oltean (11):
      net: dsa: microchip: bypass dev_ops for FDB ageing operations
      net: dsa: microchip: bypass dev_ops for change_mtu() operation
      net: dsa: microchip: bypass dev_ops for VLAN operations
      net: dsa: microchip: bypass dev_ops for FDB and MDB operations
      net: dsa: microchip: bypass dev_ops for mirror operations
      net: dsa: microchip: bypass dev_ops for phylink_get_caps()
      net: dsa: microchip: don't reset on shutdown or driver removal
      net: dsa: microchip: bypass dev_ops->setup() and teardown() for lan937x
      net: dsa: microchip: bypass dev_ops->setup() and teardown() for ksz9477
      net: dsa: microchip: bypass dev_ops->setup() and teardown() for ksz8
      net: dsa: microchip: remove dev_ops->setup() and teardown()

 drivers/net/dsa/microchip/ksz8.c         | 406 ++++++++++++++++++++-----------
 drivers/net/dsa/microchip/ksz9477.c      | 288 ++++++++++++++++------
 drivers/net/dsa/microchip/ksz9477.h      |  23 +-
 drivers/net/dsa/microchip/ksz_common.c   | 385 ++---------------------------
 drivers/net/dsa/microchip/ksz_common.h   |  85 +------
 drivers/net/dsa/microchip/lan937x_main.c | 207 +++++++++++-----
 6 files changed, 663 insertions(+), 731 deletions(-)
---
base-commit: 1df461e527477068e5f3773e645d555120704be6
change-id: 20260511-clean-ksz-2nd-series-3b755ec99cf0

Best regards,
-- 
Bastien Curutchet (Schneider Electric) <bastien.curutchet@bootlin.com>


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2026-05-15  1:21 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-12 13:06 [PATCH net-next 00/15] net: dsa: microchip: Remove unnecessary ksz_dev_ops callbacks Bastien Curutchet (Schneider Electric)
2026-05-12 13:06 ` [PATCH net-next 01/15] net: dsa: microchip: remove unused phylink_mac_link_up() callback Bastien Curutchet (Schneider Electric)
2026-05-12 13:06 ` [PATCH net-next 02/15] net: dsa: microchip: bypass dev_ops for FDB ageing operations Bastien Curutchet
2026-05-12 13:06 ` [PATCH net-next 03/15] net: dsa: microchip: bypass dev_ops for change_mtu() operation Bastien Curutchet
2026-05-12 13:06 ` [PATCH net-next 04/15] net: dsa: microchip: bypass dev_ops for VLAN operations Bastien Curutchet
2026-05-12 13:06 ` [PATCH net-next 05/15] net: dsa: microchip: bypass dev_ops for FDB and MDB operations Bastien Curutchet
2026-05-12 13:06 ` [PATCH net-next 06/15] net: dsa: microchip: bypass dev_ops for mirror operations Bastien Curutchet
2026-05-12 13:06 ` [PATCH net-next 07/15] net: dsa: microchip: bypass dev_ops for phylink_get_caps() Bastien Curutchet
2026-05-12 13:06 ` [PATCH net-next 08/15] net: dsa: microchip: don't reset on shutdown or driver removal Bastien Curutchet
2026-05-12 13:06 ` [PATCH net-next 09/15] net: dsa: microchip: bypass dev_ops->setup() and teardown() for lan937x Bastien Curutchet
2026-05-12 13:06 ` [PATCH net-next 10/15] net: dsa: microchip: bypass dev_ops->setup() and teardown() for ksz9477 Bastien Curutchet
2026-05-12 13:06 ` [PATCH net-next 11/15] net: dsa: microchip: bypass dev_ops->setup() and teardown() for ksz8 Bastien Curutchet
2026-05-12 13:06 ` [PATCH net-next 12/15] net: dsa: microchip: remove dev_ops->setup() and teardown() Bastien Curutchet
2026-05-12 13:06 ` [PATCH net-next 13/15] net: dsa: microchip: bypass dev_ops for port_setup() Bastien Curutchet (Schneider Electric)
2026-05-15  1:15   ` Jakub Kicinski
2026-05-12 13:06 ` [PATCH net-next 14/15] net: dsa: microchip: call DSA's phy_{read/write} to do mdio {read/write} Bastien Curutchet (Schneider Electric)
2026-05-12 13:06 ` [PATCH net-next 15/15] net: dsa: microchip: bypass dev_ops for phy_read()/phy_write() Bastien Curutchet (Schneider Electric)
2026-05-15  1:20 ` [PATCH net-next 00/15] net: dsa: microchip: Remove unnecessary ksz_dev_ops callbacks patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.