[PATCH net v2 0/6] net: dsa: mt7530: fix remaining swallowed MDIO access errors

Daniel Golle <[email protected]> Tue, 4 Aug 2026 04:10:17 +0100
Newsgroups gmane.linux.network,gmane.linux.kernel,gmane.linux.ports.arm.kernel,gmane.linux.ports.arm.mediatek
Message-ID <[email protected]>
The original series, "net: dsa: mt7530: fix swallowed MDIO read
errors", landed on net as its v1 [1] just before its v2 [2] was sent.
This series started from the fixes in that original v2 which its v1
had not already carried: the two standalone patches that original v2
grew from the Sashiko AI review of its v1 (the mtk-lynxi read check
and the regmap IRQ serialization), plus, split into patches of their
own, the companion fixes original v2 had folded into the
already-applied patches -- the unchecked bus->read() in core_rmw() and
the unchecked PHY_IAC command writes in the MT7531 indirect PHY access
functions.

The Sashiko AI review of this series' own v1 [3] then flagged two more
swallowed MDIO errors of the same kind, added here as patches of their
own: the unchecked CORE_PLL_GROUP4 read-modify-write in mt7531_setup(),
and the unchecked ATC/VTCR command-register writes in mt7530_fdb_cmd()
and mt7530_vlan_cmd().

The remaining non-fix changes from the original v2, dropping a
redundant read-back and improving the poll failure messages, will
follow via net-next.

Changes in this series (v2), relative to its v1 [3]:
 * patch 1: also report the link as down (state->link = false) on the
   failed-read path; phylink presets state->link, so the previous bare
   return reported a failed read as link-up (Sashiko AI review). Kept
   Andrew's Reviewed-by given the small, in-spirit change -- please
   re-confirm.
 * new patch 4: check the CORE_PLL_GROUP4 read-modify-write in
   mt7531_setup(), the call site exposed once patch 3 makes the MT7531
   indirect c45 access propagate command-write failures.
 * new patch 5: propagate MT7530_ATC / MT7530_VTCR command-register
   write errors in mt7530_fdb_cmd() and mt7530_vlan_cmd() instead of
   polling a BUSY bit that a failed write never set.
 * collected Reviewed-by: Andrew Lunn on patches 1-3 and 6.

[1] https://lore.kernel.org/netdev/[email protected]/
[2] https://lore.kernel.org/netdev/[email protected]/
[3] https://lore.kernel.org/netdev/[email protected]/

Daniel Golle (6):
  net: pcs: mtk-lynxi: check regmap reads in mtk_pcs_lynxi_get_state()
  net: dsa: mt7530: check bus->read() error in core_rmw()
  net: dsa: mt7530: error out on failed PHY_IAC command writes
  net: dsa: mt7530: check CORE_PLL_GROUP4 access in mt7531_setup()
  net: dsa: mt7530: check command register writes in fdb and vlan cmd
  net: dsa: mt7530: serialize the regmap IRQ chip like every other user

 drivers/net/dsa/mt7530.c        | 86 +++++++++++++++++++++++++++------
 drivers/net/pcs/pcs-mtk-lynxi.c |  7 ++-
 2 files changed, 75 insertions(+), 18 deletions(-)


base-commit: af39eb111ce6b5eba9c08513b62c4868eb7e7fd5