From: Kory Maincent <kory.maincent@bootlin.com>
To: Piotr Kubik <piotr@kubik.pl>, netdev@vger.kernel.org
Cc: Oleksij Rempel <o.rempel@pengutronix.de>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
linux-kernel@vger.kernel.org,
Carlo Szelinsky <github@szelinsky.de>
Subject: Re: [PATCH net 2/2] net: pse-pd: si3474: validate the channels of a PI
Date: Tue, 20 Oct 2026 11:33:06 +0200 [thread overview]
Message-ID: <72715cc7-da78-4ff6-a22d-f81ea8235b74@bootlin.com> (raw)
In-Reply-To: <20261019162453.1244120-3-piotr@kubik.pl>
On 10/19/26 18:24, Piotr Kubik wrote:
> si3474_get_of_channels() accepted channel 8, one past the last channel.
> The driver then accessed channel 4 instead: quad 1, channel index 0.
>
> It also accepted a 4-pair PI whose two channels are not a channel pair
> of one quad. The chip forms a 4-pair port only from channels 0+1 or 2+3
> of a quad (2P/4P mode bit in POWER_ALLOCATION, PORT_REMAP default), and
> the driver sends every register access of a PI to the quad of its first
> channel, so such a PI enabled and measured the wrong channels.
>
> Reject both at probe.
>
> Discovered by an AI code review agent; no shipped device tree triggers
> it. Validated and tested on an SDG-9000 board (MediaTek MT7988A, two
> Si3474) with Linux 6.18 and a modified device tree: one chip with a
> channel at reg 8, the other with a 4-pair PI on channels 1 and 2. The
> driver now rejects both at probe, and the unmodified device tree still
> probes all eight PIs. No kernel selftest covers PSE hardware.
Reviewed-by: Kory Maincent <kory.maincent@bootlin.com>
Thank you!
--
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
prev parent reply other threads:[~2026-10-20 9:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-19 16:24 [PATCH net 0/2] net: pse-pd: si3474: two driver fixes Piotr Kubik
2026-10-19 16:24 ` [PATCH net 1/2] net: pse-pd: si3474: keep detection enabled on the other PIs Piotr Kubik
2026-10-20 9:15 ` Kory Maincent
2026-10-19 16:24 ` [PATCH net 2/2] net: pse-pd: si3474: validate the channels of a PI Piotr Kubik
2026-10-20 9:33 ` Kory Maincent [this message]
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=72715cc7-da78-4ff6-a22d-f81ea8235b74@bootlin.com \
--to=kory.maincent@bootlin.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=github@szelinsky.de \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
--cc=pabeni@redhat.com \
--cc=piotr@kubik.pl \
/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®