mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net-next v3 0/3] net: dsa: qca8k: fix MDIO error handling
@ 2026-10-03 17:24 Yongzhao Chen
  2026-10-03 17:24 ` [PATCH net-next v3 1/3] net: dsa: qca8k: propagate MDIO errors Yongzhao Chen
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Yongzhao Chen @ 2026-10-03 17:24 UTC (permalink / raw)
  To: netdev
  Cc: Christian Marangi, Andrew Lunn, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, John Crispin,
	linux-kernel

This series fixes qca8k MDIO error-handling bugs found by code
inspection and the Sashiko review of v1 [1]. I am not aware of reports
of actual MDIO failures, so v3 targets net-next without Fixes tags, as
Andrew requested [2].

The patches propagate register and PHY access errors, skip MASTER_EN
cleanup after a failed page select, invalidate the uncertain page cache,
and return management Ethernet busy-wait errors so MDIO fallback can run.
They apply directly to net-next; the separate qca8k MTU series depends on
the write-error propagation provided here.

Testing: the base and each patch build with W=1 for arm64
(drivers/net/dsa/qca, net/dsa, drivers/net/phy/qcom). A userspace model
compiles the driver's own MDIO functions against a simulated paged
switch and a scripted management Ethernet responder, with phylib's
read-modify-write helper as a consumer. Fault injection leaves 15 failing
cases on the base, 10 after patch 1, seven after patch 2, and none after
patch 3. These are model tests, not kernel selftests or hardware error
injection.

A Redmi AX5400 (RA74, IPQ5018 + QCA8337) passed connectivity checks
with a 6.18.52 OpenWrt backport of v2 after boot, reboot, one cold boot,
link re-initialization and MTU changes. Its switch PHYs are on the SoC
MDIO bus and it has no CPU port 0. This covers normal register access
through page selection; the internal MDIO master and management
Ethernet paths remain tested only in the model.

v3:
- Target net-next and drop the Fixes: tags as requested [2]. Historical
  commits are identified in the commit messages instead.
- Order local variable declarations in reverse Christmas tree order in
  the functions the series touches [3]. No other code change.

Previous versions:
v2 [4], v1 [5].

[1] https://lore.kernel.org/netdev/179054715863.3145.10179961093285192493@kernel.org/
[2] https://lore.kernel.org/netdev/12875133-1659-4507-a007-c3cfa425ec76@lunn.ch/
[3] https://lore.kernel.org/netdev/f7889e9e-8ca8-47b1-b902-c31e7c016858@lunn.ch/
[4] https://lore.kernel.org/netdev/20260928220629.238-1-yongzhao.derek@gmail.com/
[5] https://lore.kernel.org/netdev/20260923215748.1336-1-yongzhao.derek@gmail.com/

Yongzhao Chen (3):
  net: dsa: qca8k: propagate MDIO errors
  net: dsa: qca8k: do not clear MASTER_EN after a failed page select
  net: dsa: qca8k: fail mgmt Ethernet MDIO access on busy wait errors

 drivers/net/dsa/qca/qca8k-8xxx.c | 68 +++++++++++++++++++-------------
 1 file changed, 40 insertions(+), 28 deletions(-)


base-commit: cfb7793d1bc0f7d90571611979654cf1b3886b29
-- 
2.43.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-10-03 17:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-03 17:24 [PATCH net-next v3 0/3] net: dsa: qca8k: fix MDIO error handling Yongzhao Chen
2026-10-03 17:24 ` [PATCH net-next v3 1/3] net: dsa: qca8k: propagate MDIO errors Yongzhao Chen
2026-10-03 17:24 ` [PATCH net-next v3 2/3] net: dsa: qca8k: do not clear MASTER_EN after a failed page select Yongzhao Chen
2026-10-03 17:24 ` [PATCH net-next v3 3/3] net: dsa: qca8k: fail mgmt Ethernet MDIO access on busy wait errors Yongzhao Chen

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®