mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bastien Curutchet <bastien.curutchet@bootlin.com>
To: netdev-bot+sashiko@kernel.org
Cc: woojung.huh@microchip.com, UNGLinuxDriver@microchip.com,
	andrew@lunn.ch, olteanv@gmail.com, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	richardcochran@gmail.com, pascal.eberhard@se.com,
	miquel.raynal@bootlin.com, thomas.petazzoni@bootlin.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v3 10/10] net: dsa: microchip: add periodic output support for the KSZ8463
Date: Fri, 11 Sep 2026 09:23:06 +0200	[thread overview]
Message-ID: <e2ecdd7e-80dd-4540-a316-0718d05cb367@bootlin.com> (raw)
In-Reply-To: <178903621782.219967.1067616730052651942@kernel.org>

Hi all,

On 9/10/26 12:30 PM, netdev-bot+sashiko@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 4 potential
> issue(s) to consider:
> 
> Critical: 0 · High: 1 (2) · Medium: 2 · Low: 1
> 
> - [High] KSZ8463 advertises 12 periodic-output channels (.n_pins = 12,
>    .n_per_out = 12, copied into caps by ksz8463_ptp_set_caps()) while the…
> - [Medium] ksz8463_ptp_enable_perout() is not transactional: it calls
>    ksz8463_ptp_tou_reset(dev, request->index) (stopping an already…
> - [Medium] ksz8463_ptp_configure_perout() dereferences
>    dev->ptp_data.pin_config[index]…
> - [Low] ksz8463_ptp_set_caps() (drivers/net/dsa/microchip/ksz_ptp.c:1335)
>    does not set ptp_data->caps.supported_perout_flags, while the code…
> 
> Pre-existing issues:
> - [High] The new KSZ8463 settime/adjtime paths funnel into
>    ksz_ptp_prepare_restart_perout(), whose catch-up arithmetic can…
> - [High] A denormalized periodic-output period is accepted as zero
>    nanoseconds and later causes a kernel divide-by-zero or an infinite…
> 
> --
> 
> net: dsa: microchip: add periodic output support for the KSZ8463
> 
> This adds KSZ8463 specific periodic output handling: per-unit trigger
> configuration registers, a smaller maximum pulse width, and a new set of
> ksz8463_* PTP callbacks installed by ksz8463_ptp_set_caps().  The chip
> data now advertises 12 pins and 12 periodic output channels.
> 
> A few questions below about the new paths.
> 
>> diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c
>> index 041bb4f963659..9e234ad71b723 100644
>> --- a/drivers/net/dsa/microchip/ksz_common.c
>> +++ b/drivers/net/dsa/microchip/ksz_common.c
>> @@ -1161,6 +1161,8 @@ const struct ksz_chip_data ksz_switch_chips[] = {
>>   		.supports_mii = {false, false, true},
>>   		.supports_rmii = {false, false, true},
>>   		.internal_phy = {true, true, false},
>> +		.n_pins = 12,
>> +		.n_per_out = 12,
>>   	},
> 
> [Severity: High]
> Twelve periodic output channels are advertised here, but struct
> ksz_ptp_data still keeps only one set of perout state (a single tou_mode,
> one perout_target_time_first, one perout_period), and the restart helper
> always rebuilds a request for channel 0:
> 
> drivers/net/dsa/microchip/ksz_ptp.c:ksz_ptp_prepare_restart_perout() {
> 	...
> 	request->index = 0;
> 	request->flags = 0;
> 
> 	return 0;
> }
> 

This is an already existing bug. It made me realize that I forgot to 
send the fix ..

The fix conflicts with this series. I can either send the fix now, wait 
for it to enter net-next and then send a new iteration of this series; 
or send the fix once this series has been merged. I checked the other 
Sashiko comments, and IMHO, this comment is the only one that is really 
relevant.

What do you prefer ?


Best regards,
Bastien

  reply	other threads:[~2026-09-11  7:23 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-08  7:27 [PATCH net-next v3 00/10] " Bastien Curutchet (Schneider Electric)
2026-09-08  7:27 ` [PATCH net-next v3 01/10] net: dsa: microchip: add the number of pins to chip infos Bastien Curutchet (Schneider Electric)
2026-09-10 10:30   ` netdev-bot+sashiko
2026-09-08  7:27 ` [PATCH net-next v3 02/10] net: dsa: microchip: add the number of periodic signals " Bastien Curutchet (Schneider Electric)
2026-09-10 10:30   ` netdev-bot+sashiko
2026-09-08  7:27 ` [PATCH net-next v3 03/10] net: dsa: microchip: use dynamic mask to check pulse width validity Bastien Curutchet (Schneider Electric)
2026-09-08  7:27 ` [PATCH net-next v3 04/10] net: dsa: microchip: extract PTP callbacks configuration from PTP registration Bastien Curutchet (Schneider Electric)
2026-09-08  7:27 ` [PATCH net-next v3 05/10] net: dsa: microchip: extract ptp_get_pin Bastien Curutchet (Schneider Electric)
2026-09-08  7:27 ` [PATCH net-next v3 06/10] net: dsa: microchip: extract compute_width Bastien Curutchet (Schneider Electric)
2026-09-10 10:30   ` netdev-bot+sashiko
2026-09-08  7:27 ` [PATCH net-next v3 07/10] net: dsa: microchip: extract prepare reset Bastien Curutchet (Schneider Electric)
2026-09-10 10:30   ` netdev-bot+sashiko
2026-09-08  7:27 ` [PATCH net-next v3 08/10] net: dsa: microchip: extract time update Bastien Curutchet (Schneider Electric)
2026-09-08  7:27 ` [PATCH net-next v3 09/10] net: dsa: microchip: extract time adjustment Bastien Curutchet (Schneider Electric)
2026-09-08  7:27 ` [PATCH net-next v3 10/10] net: dsa: microchip: add periodic output support for the KSZ8463 Bastien Curutchet (Schneider Electric)
2026-09-10 10:30   ` netdev-bot+sashiko
2026-09-11  7:23     ` Bastien Curutchet [this message]
2026-09-11 23:33       ` Jakub Kicinski

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=e2ecdd7e-80dd-4540-a316-0718d05cb367@bootlin.com \
    --to=bastien.curutchet@bootlin.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=netdev-bot+sashiko@kernel.org \
    --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 \
    --cc=woojung.huh@microchip.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

all inboxes | Powered by JetHome®