From: Bastien Curutchet <bastien.curutchet@bootlin.com>
To: Tristram.Ha@microchip.com, olteanv@gmail.com
Cc: Woojung.Huh@microchip.com, UNGLinuxDriver@microchip.com,
andrew@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, richardcochran@gmail.com,
horms@kernel.org, pascal.eberhard@se.com,
miquel.raynal@bootlin.com, thomas.petazzoni@bootlin.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
maxime.chevallier@bootlin.com
Subject: Re: [PATCH net-next v6 1/9] net: dsa: microchip: Add support for KSZ8463 global irq
Date: Wed, 18 Mar 2026 10:26:49 +0100 [thread overview]
Message-ID: <0495251f-79d4-49e8-8829-60e3ad105093@bootlin.com> (raw)
In-Reply-To: <DM3PR11MB8736ECCCE15258C04287889EEC45A@DM3PR11MB8736.namprd11.prod.outlook.com>
Hi all,
On 3/13/26 6:29 PM, Tristram.Ha@microchip.com wrote:
>> 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?
>
> What I did was to simulate the port interrupt mechanism used by KSZ9477
> and LAN937X switch families. I think that does minimum disruption to the
> original code. That new interrupt code also allows interrupt use for
> KSZ8863, KSZ8895, and KSZ8795. I provided that code to Bastien to test.
>
I took a look at Tristram's patches, they should work but I'm not a big
fan of emulating other hardware behavior to fit the existing driver. I'd
rather go with Vladimir's approach.
Thanks for these patches Vladimir, they provide a clear path forward for
the remaining work. I'll rebase my work on top of them. I'll implement a
ksz8463_setup() function to match the KSZ interrupt scheme before adding
PTP support.
And, indeed, implementing a ksz8463_ptp_clock_register() should then
make it easier to add the periodic output support I plan to implement
afterwards.
Best regards,
Bastien
next prev parent reply other threads:[~2026-03-18 9:26 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-04 10:18 [PATCH net-next v6 0/9] net: dsa: microchip: Add PTP support for the KSZ8463 Bastien Curutchet (Schneider Electric)
2026-03-04 10:18 ` [PATCH net-next v6 1/9] net: dsa: microchip: Add support for KSZ8463 global irq Bastien Curutchet (Schneider Electric)
2026-03-05 9:56 ` Vladimir Oltean
2026-03-05 12:39 ` Bastien Curutchet
2026-03-05 12:51 ` Vladimir Oltean
2026-03-05 14:45 ` Bastien Curutchet
2026-03-06 1:10 ` Tristram.Ha
2026-03-06 9:03 ` Bastien Curutchet
2026-03-09 12:54 ` Bastien Curutchet
2026-03-09 20:54 ` Vladimir Oltean
2026-03-11 10:02 ` Bastien Curutchet
2026-03-11 11:53 ` Vladimir Oltean
2026-03-11 12:53 ` Bastien Curutchet
2026-03-11 13:56 ` Vladimir Oltean
2026-03-11 16:58 ` Bastien Curutchet
2026-03-11 18:24 ` Andrew Lunn
2026-03-11 21:24 ` Vladimir Oltean
2026-03-12 18:28 ` Bastien Curutchet
2026-03-13 2:05 ` Tristram.Ha
2026-03-13 2:17 ` Tristram.Ha
2026-03-12 0:14 ` Tristram.Ha
2026-03-12 13:45 ` Vladimir Oltean
2026-03-13 15:38 ` Vladimir Oltean
2026-03-13 17:29 ` Tristram.Ha
2026-03-18 9:26 ` Bastien Curutchet [this message]
2026-03-18 14:02 ` Vladimir Oltean
2026-03-04 10:18 ` [PATCH net-next v6 2/9] net: dsa: microchip: Decorrelate IRQ domain from port Bastien Curutchet (Schneider Electric)
2026-03-05 10:07 ` Vladimir Oltean
2026-03-06 9:18 ` Bastien Curutchet
2026-03-04 10:18 ` [PATCH net-next v6 3/9] net: dsa: microchip: Decorrelate msg_irq index from IRQ bit offset Bastien Curutchet (Schneider Electric)
2026-03-04 10:18 ` [PATCH net-next v6 4/9] net: dsa: microchip: Add support for KSZ8463's PTP interrupts Bastien Curutchet (Schneider Electric)
2026-03-05 10:19 ` Vladimir Oltean
2026-03-06 9:29 ` Bastien Curutchet
2026-03-04 10:18 ` [PATCH net-next v6 5/9] net: dsa: tag_ksz: Share code for KSZ8795 and KSZ9893 xmit operations Bastien Curutchet (Schneider Electric)
2026-03-04 10:18 ` [PATCH net-next v6 6/9] net: dsa: microchip: Add KSZ8463 tail tag handling Bastien Curutchet (Schneider Electric)
2026-03-04 10:18 ` [PATCH net-next v6 7/9] net: dsa: microchip: Explicitly enable detection of L2 PTP frames Bastien Curutchet (Schneider Electric)
2026-03-04 10:18 ` [PATCH net-next v6 8/9] net: dsa: microchip: Adapt port offset for KSZ8463's PTP register Bastien Curutchet (Schneider Electric)
2026-03-04 10:19 ` [PATCH net-next v6 9/9] net: dsa: microchip: Add two-step PTP support for KSZ8463 Bastien Curutchet (Schneider Electric)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0495251f-79d4-49e8-8829-60e3ad105093@bootlin.com \
--to=bastien.curutchet@bootlin.com \
--cc=Tristram.Ha@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=Woojung.Huh@microchip.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maxime.chevallier@bootlin.com \
--cc=miquel.raynal@bootlin.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=pascal.eberhard@se.com \
--cc=richardcochran@gmail.com \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox