Re: [PATCH net-next v6 1/9] net: dsa: microchip: Add support for KSZ8463 global irq
From: Vladimir Oltean
Date: Fri Mar 13 2026 - 11:45:30 EST
On Thu, Mar 12, 2026 at 03:45:26PM +0200, Vladimir Oltean wrote:
> Thanks for the comment. I took a deeper look at the ksz_switch common
> driver and I've started working on some patches. I'll return when
> they're more or less ready.
So if the common ksz_switch were to remain preferable, we still have the
problem that it's very cluttered/abstract and impossible to follow and
ensure correctness/lack of regressions for other hardware.
Bastien, Tristram, I've tried to address that very particular issue by
giving KSZ8463 its very own dsa_switch_ops structure, which it doesn't
have to share with anyone else.
I have no hardware to test, but some patches are here:
https://github.com/vladimiroltean/linux/tree/ksz_separate_dsa_switch_ops
Do you think this would be useful? For now I've created a common ksz8_setup(),
but it can be further split into whatever granularity is required for
ksz8463 to have its own IRQ domain operations.
One could conceivable walk this alternative route of having independent
per-family dsa_switch_ops and only call ksz_common.c when something is
truly common ad infinitum. We could use it to get rid of dev->info->regs[],
dev->info->xmii_ctrl1, etc. We could further give ksz8463 a separate
ksz_ptp_clock_register() implementation with different PTP operations,
to address Bastien's concern. I stopped at only 19 patches though :-/
What do you think, is this direction something worth exploring? Does it
help with the PTP IRQ differences here?