[PATCH net 3/3] net: dsa: mt7530: error out on failed reads in MT7531 PHY polling

Andrew Lunn andrew at lunn.ch
Tue Jul 28 14:00:30 PDT 2026


On Tue, Jul 28, 2026 at 05:52:29AM +0100, Daniel Golle wrote:
> The MT7531 indirect PHY access functions poll MT7531_PHY_IAC through
> a helper which returns 0 when the underlying read fails, so a failed
> bus transaction clears MT7531_PHY_ACS_ST and the access carries on,
> returning garbage PHY register data to phylib.
> 
> Poll using regmap_read_poll_timeout(), which stops on read errors and
> propagates them. These functions hold the MDIO bus lock across the
> whole sequence, so the unlocked regmap accesses remain correct. Remove
> the now-unused _mt7530_unlocked_read().
> 
> Fixes: c288575f7810 ("net: dsa: mt7530: Add the support of MT7531 switch")
> Signed-off-by: Daniel Golle <daniel at makrotopia.org>

Reviewed-by: Andrew Lunn <andrew at lunn.ch>

    Andrew



More information about the Linux-mediatek mailing list