Skip to content

net: dsa: mt7530: fix remaining swallowed MDIO access errors

Daniel Golle linux-arm-kernel linux-mediatek lkml netdev 2 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest6 patches 0 repliesApplied 6/6
  2. v14 patches 5 repliesSuperseded

Changes in this series (v2), relative to its v1 [3] from the cover letter

* 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]/

Patches in v2 All 6 applied

#Subject and filesSizeRepliesApplied
1/6net: pcs: mtk-lynxi: check regmap reads in mtk_pcs_lynxi_get_state()drivers/net/pcs/pcs-mtk-lynxi.c+5 -20 repliesApplied
2/6net: dsa: mt7530: check bus->read() error in core_rmw()drivers/net/dsa/mt7530.c+5 -10 repliesApplied
3/6net: dsa: mt7530: error out on failed PHY_IAC command writesdrivers/net/dsa/mt7530.c+18 -60 repliesApplied
4/6net: dsa: mt7530: check CORE_PLL_GROUP4 access in mt7531_setup()drivers/net/dsa/mt7530.c+10 -40 repliesApplied
5/6net: dsa: mt7530: check command register writes in fdb and vlan cmddrivers/net/dsa/mt7530.c+12 -40 repliesApplied
6/6net: dsa: mt7530: serialize the regmap IRQ chip like every other userdrivers/net/dsa/mt7530.c+25 -10 repliesApplied

Reviews trailers per patch

4 of 6 patches have a Reviewed-by or Acked-by.

PatchAndrew Lunn
1/6R-b
2/6R-b
3/6R-b
4/6
5/6
6/6R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

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

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