Thread (4 messages) 4 messages, 3 authors, 2026-01-09

Re: [PATCH v2] net: ethernet: mtk_eth_soc: avoid writing to ESW registers on MT7628

From: Jakub Kicinski <kuba@kernel.org>
Date: 2026-01-08 16:35:32

On Thu, 8 Jan 2026 15:04:57 +0000 Simon Horman wrote:
On Tue, Jan 06, 2026 at 07:18:28AM +0200, Joris Vaisvila wrote:
quoted
The MT7628 does not expose MAC control registers. Writes to these
registers corrupt the ESW VLAN configuration. Existing drivers
never use the affected features, so this went unnoticed.

This patch skips MCR register reads and writes on MT7628, preventing
invalid register access.

Fixes: 296c9120752b ("net: ethernet: mediatek: Add MT7628/88 SoC support")
Signed-off-by: Joris Vaisvila <redacted>
While I think a minimal patch along these lines is appropriate as a bug
fix. I am wondering if, as a follow-up, consideration could be given to
registering alternate phy ops for MT7628. This would push the conditional
handling to probe rather than calback execution time. And I suspect it
would lead to a cleaner implementation.
Plus the commit message says: "Existing drivers never use the affected
features, so this went unnoticed." which makes it sound like user will
not notice the bad writes today?

So perhaps we can go for the cleaner approach and stick to net-next
(without fixing the older kernels?). Sorry for not reading the commit
message closely enough on v1.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help