From: netdev-bot+sashiko@kernel.org
To: namiltd@yahoo.com
Cc: linusw@kernel.org, andrew@lunn.ch, olteanv@gmail.com,
kuba@kernel.org, davem@davemloft.net, edumazet@google.com,
pabeni@redhat.com, linux@armlinux.org.uk, luizluca@gmail.com,
maxime.chevallier@bootlin.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v5 9/9] net: dsa: realtek: rtl8365mb: add support for RTL8367S-VB
Date: Wed, 14 Oct 2026 08:56:47 +0000 [thread overview]
Message-ID: <179196820753.434549.9415507328931407333@kernel.org> (raw)
In-Reply-To: <ecb73c8a-0bd7-4c82-8fa7-048aae4e335e@yahoo.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 0
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] The family-D SerDes re-latch work can be queued again after
the reboot notifier has cancelled it.
--
net: dsa: realtek: rtl8365mb: add support for RTL8367S-VB
This patch adds the RTL8367S-VB (chip ID 0x6642, version 0x0010) to the
chip table. It is the first family D chip, so the family D handling added
in the earlier patches becomes reachable. On family D it also caps
priv->num_ports at RTL8365MB_D_MAX_NUM_PORTS.
> diff --git a/drivers/net/dsa/realtek/rtl8365mb_main.c b/drivers/net/dsa/realtek/rtl8365mb_main.c
> index 238a3fa765e97..352b15bd5508d 100644
> --- a/drivers/net/dsa/realtek/rtl8365mb_main.c
> +++ b/drivers/net/dsa/realtek/rtl8365mb_main.c
[ ... ]
> @@ -885,6 +892,19 @@ static const struct rtl8365mb_chip_info rtl8365mb_chip_infos[] = {
> .jam_table = rtl8365mb_init_jam_8365mb_vc,
> .jam_size = ARRAY_SIZE(rtl8365mb_init_jam_8365mb_vc),
> },
> + {
> + .name = "RTL8367S-VB",
> + .chip_id = 0x6642,
> + .chip_ver = 0x0010,
> + .family = RTL8365MB_FAMILY_D,
[Severity: Medium]
With this entry, the family D SerDes re-latch work and the reboot notifier
can now run. Can the sds_relatch work be queued again after the reboot
notifier has cancelled it?
The notifier cancels the work once. It sets no state that anything else
checks:
drivers/net/dsa/realtek/rtl8365mb_main.c:rtl8365mb_sds_reboot_notify() {
/* Runs before device_shutdown() on reboot, halt, power off and kexec.
* cancel_delayed_work_sync() waits for a running pass, so the SerDes
* is not left parked and the bus is not touched while it is shut down.
*/
cancel_delayed_work_sync(&mb->sds_relatch);
...
}
rtl8365mb_pcs_config() queues the work for 2500base-x on family D
without any check:
if (is_d && interface == PHY_INTERFACE_MODE_2500BASEX) {
WRITE_ONCE(mb->sds_relatch_count, 1);
schedule_delayed_work(&mb->sds_relatch, 0);
}
After that, rtl8365mb_sds_relatch_work() re-arms itself every time it
exits:
rearm:
schedule_delayed_work(&mb->sds_relatch, delay);
pcs_config() could run after the reboot notifier chain in two ways:
- Probe overlaps reboot. rtl8365mb_detect() registers the notifier, and
dsa_port_setup()->dsa_port_enable()->dsa_port_enable_rt()->
phylink_start() then configures the HSGMII CPU port.
kernel_restart_prepare() runs the notifiers before device_shutdown()
calls wait_for_device_probe().
- A user port on the SerDes is brought up at the same time, through
dsa_user_open()->phylink_start().
After that, rtl83xx_shutdown()->dsa_switch_shutdown() only closes the
conduits and detaches the user netdevs. It doesn't stop the CPU port
phylink, call rtl8365mb_teardown(), or cancel sds_relatch. The devm action
rtl8365mb_sds_relatch_cancel() doesn't run on shutdown either.
In that case, wouldn't the work keep parking SDS_MISC, sleeping for 20 ms
and doing regmap I/O over SMI/MDIO while the switch, and possibly the host
MDIO/GPIO controller, is being shut down? The notifier comment says this
cannot happen.
Would disable_delayed_work_sync() in the notifier work here? Another
option would be a shutdown flag that rtl8365mb_pcs_config() and the work
check before re-queueing.
> + .extints = {
> + { 6, 0, PHY_INTF(SGMII) | PHY_INTF(HSGMII) },
> + { 7, 1, PHY_INTF(MII) | PHY_INTF(TMII) |
> + PHY_INTF(RMII) | PHY_INTF(RGMII) },
> + },
> + .jam_table = rtl8365mb_init_jam_8365mb_vc,
> + .jam_size = ARRAY_SIZE(rtl8365mb_init_jam_8365mb_vc),
> + },
> };
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/aa5fa12c-e43e-4e5e-9f77-c6eaf477abc4%40yahoo.com
prev parent reply other threads:[~2026-10-14 8:56 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <b45a3350-44a3-45ad-89cc-452c25edbd7d.ref@yahoo.com>
2026-10-13 8:23 ` [PATCH net-next v5 0/9] net: dsa: realtek: rtl8365mb: add support for RTL8367S-VB Mieczyslaw Nalewaj
2026-10-13 8:38 ` [PATCH net-next v5 1/9] dt-bindings: net: dsa: realtek: add RTL8367S-VB Mieczyslaw Nalewaj
2026-10-13 8:39 ` [PATCH net-next v5 2/9] net: dsa: realtek: rtl8365mb: add chip family infrastructure Mieczyslaw Nalewaj
2026-10-13 23:27 ` Linus Walleij
2026-10-13 8:40 ` [PATCH net-next v5 3/9] net: dsa: realtek: rtl8365mb: set speed for family D Mieczyslaw Nalewaj
2026-10-13 8:41 ` [PATCH net-next v5 4/9] net: dsa: realtek: rtl8365mb: set RGMII mode " Mieczyslaw Nalewaj
2026-10-14 8:56 ` netdev-bot+sashiko
2026-10-13 8:42 ` [PATCH net-next v5 5/9] net: dsa: realtek: rtl8365mb: set and get vlan 4k " Mieczyslaw Nalewaj
2026-10-14 8:56 ` netdev-bot+sashiko
2026-10-13 8:43 ` [PATCH net-next v5 6/9] net: dsa: realtek: rtl8365mb: use raw VID for PVID on " Mieczyslaw Nalewaj
2026-10-13 8:43 ` [PATCH net-next v5 7/9] net: dsa: realtek: rtl8365mb: add family D SDS13 PCS support Mieczyslaw Nalewaj
2026-10-14 8:56 ` netdev-bot+sashiko
2026-10-13 8:44 ` [PATCH net-next v5 8/9] net: dsa: realtek: rtl8365mb: re-latch the family D SerDes Mieczyslaw Nalewaj
2026-10-14 8:56 ` netdev-bot+sashiko
2026-10-13 8:45 ` [PATCH net-next v5 9/9] net: dsa: realtek: rtl8365mb: add support for RTL8367S-VB Mieczyslaw Nalewaj
2026-10-14 8:56 ` netdev-bot+sashiko [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=179196820753.434549.9415507328931407333@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=luizluca@gmail.com \
--cc=maxime.chevallier@bootlin.com \
--cc=namiltd@yahoo.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.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