Re: [net-next PATCH v13 2/9] net: dsa: realtek: rtl8365mb: reject unsupported topologies
From: Andrew Lunn <andrew@lunn.ch>
Date: 2026-06-07 17:28:23
Also in:
lkml
From: Andrew Lunn <andrew@lunn.ch>
Date: 2026-06-07 17:28:23
Also in:
lkml
On Sun, Jun 07, 2026 at 02:55:07PM +0200, Mieczyslaw Nalewaj wrote:
On 6/6/2026 10:29 AM, Luiz Angelo Daros de Luca wrote:quoted
Explicitly enforce the presence of a CPU port (-EINVAL) and reject DSA cascade links (-EOPNOTSUPP) during setup to prevent silent failures. These topologies were already non-functional. Without a CPU port, the driver does not activate CPU tagging. Additionally, the switch hardware was not designed to be cascaded, and DSA links never worked because CPU tagging is not enabled for them. Reviewed-by: Mieczyslaw Nalewaj <redacted> Reviewed-by: Linus Walleij <linusw@kernel.org> Signed-off-by: Luiz Angelo Daros de Luca <redacted> ---[...]quoted
drivers/net/dsa/realtek/rtl8365mb.c:rtl8365mb_get_stats64() { ... mb = priv->chip_data; p = &mb->ports[port]; spin_lock(&p->stats_lock); memcpy(s, &p->stats, sizeof(*s)); spin_unlock(&p->stats_lock); }Sashiko reports a potential deadlock around stats_lock, however I couldn't find a call chain reaching rtl8365mb_get_stats64() from softirq context. Can anyone point to such a path?
Enable CONFIG_PROVE_LOCKING and use the device, get the statistics etc. If you hit the two paths with a potential deadlock you will get a report. Andrew