Thread View: linux.kernel.netdev
4 messages
4 total messages
Started by David Yang
Mon, 26 Oct 2026 23:02
[PATCH net v3] net: dsa: motorcomm: Isolate all ports during chip setup
Author: David Yang
Date: Mon, 26 Oct 2026 23:02
Date: Mon, 26 Oct 2026 23:02
53 lines
12144 bytes
12144 bytes
The chip setup only blocked unknown unicast and unknown multicast
frames, known multicast and broadcast were left open (though the former
cannot appear while the FDB is still empty). Broadcast frames received
on a port may flood out of the other ports before port_setup() runs.
Close the window by fully isolating every port right after the hardware
reset.
Fixes: 186623f4aa72 ("net: dsa: yt921x: Add support for Motorcomm YT921x")
Signed-off-by: David Yang <mmyangfl@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
---
v3:
- typo
v2: https://lore.kernel.org/r/20261025144834.2810828-1-mmyangfl@gmail.com
- reword and reduce code changes
v1: https://lore.kernel.org/r/20261024144023.1010237-1-mmyangfl@gmail.com
drivers/net/dsa/motorcomm/chip.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/net/dsa/motorcomm/chip.c b/drivers/net/dsa/motorcomm/chip.c
index d4fc20c52a58..f71160eefe48 100644
--- a/drivers/net/dsa/motorcomm/chip.c
+++ b/drivers/net/dsa/motorcomm/chip.c
@@ -2221,6 +2221,7 @@ static int yt921x_chip_reset(struct yt921x_priv *priv)
{
struct device *dev = yt921x_priv_to_device(priv);
u16 eth_p_tag;
+ u32 ctrl;
u32 val;
int res;
@@ -2258,6 +2259,17 @@ static int yt921x_chip_reset(struct yt921x_priv *priv)
return -EINVAL;
}
+ /* Block all traffic as soon as we reset the hardware since it now acts
+ * as a dumb switch.
+ */
+ for (int port = 0; port < YT921X_PORT_NUM; port++) {
+ ctrl = ~(u32)0;
+ res = yt921x_reg_write(priv, YT921X_PORTn_ISOLATION(port),
+ ctrl);
+ if (res)
+ return res;
+ }
+
return 0;
}
--
2.53.0
Re: [PATCH net v3] net: dsa: motorcomm: Isolate all ports during chip setup
Author: netdev-bot+sinfo
Date: Mon, 26 Oct 2026 23:05
Date: Mon, 26 Oct 2026 23:05
22 lines
8666 bytes
8666 bytes
Hi! This is an automated message. This series looks like a fix, but its commit messages seem to be missing some information: - How the issue was discovered, e.g. hit in production, hit during development, syzbot report, manual code inspection, LLM or static analysis tool scan. - Whether the issue was actually triggered, or is only theoretical (e.g. found by code inspection). If it was triggered please include the symptoms, like the stack trace or error messages. Please do not repost the series just to address the above. Instead, reply to this email with the missing information, so that reviewers can take it into account. If the series needs another revision for other reasons, please include the information in the commit messages then. The evaluation is done by an LLM so it may be wrong, if you think that is the case please reply and explain.
Re: [PATCH net v3] net: dsa: motorcomm: Isolate all ports during chip setup
Author: David Yang
Date: Wed, 28 Oct 2026 07:58
Date: Wed, 28 Oct 2026 07:58
27 lines
11102 bytes
11102 bytes
On Tue, Oct 27, 2026 at 7:05 AM <netdev-bot+sinfo@kernel.org> wrote: > > Hi! > > This is an automated message. This series looks like a fix, but its > commit messages seem to be missing some information: > > - How the issue was discovered, e.g. hit in production, hit during > development, syzbot report, manual code inspection, LLM or static > analysis tool scan. > > - Whether the issue was actually triggered, or is only theoretical > (e.g. found by code inspection). If it was triggered please include > the symptoms, like the stack trace or error messages. > > Please do not repost the series just to address the above. Instead, > reply to this email with the missing information, so that reviewers > can take it into account. If the series needs another revision for > other reasons, please include the information in the commit messages > then. > > The evaluation is done by an LLM so it may be wrong, if you think > that is the case please reply and explain. HW Tested.
Re: [PATCH net v3] net: dsa: motorcomm: Isolate all ports during chip setup
Author: Jakub Kicinski
Date: Wed, 28 Oct 2026 23:23
Date: Wed, 28 Oct 2026 23:23
31 lines
9128 bytes
9128 bytes
On Wed, 28 Oct 2026 15:58:39 +0800 David Yang wrote: > On Tue, Oct 27, 2026 at 7:05 AM <netdev-bot+sinfo@kernel.org> wrote: > > This is an automated message. This series looks like a fix, but its > > commit messages seem to be missing some information: > > > > - How the issue was discovered, e.g. hit in production, hit during > > development, syzbot report, manual code inspection, LLM or static > > analysis tool scan. > > > > - Whether the issue was actually triggered, or is only theoretical > > (e.g. found by code inspection). If it was triggered please include > > the symptoms, like the stack trace or error messages. > > > > Please do not repost the series just to address the above. Instead, > > reply to this email with the missing information, so that reviewers > > can take it into account. If the series needs another revision for > > other reasons, please include the information in the commit messages > > then. > > > > The evaluation is done by an LLM so it may be wrong, if you think > > that is the case please reply and explain. > > HW Tested. Whether it was tested is the only one of the 3 questions which the bot did not ask you about. And if it did ask you you should name the platform. -- pw-bot: cr
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads