Re: [PATCH net 3/3] net: dsa: mt7530: error out on failed reads in MT7531 PHY polling
Andrew Lunn <[email protected]> Tue, 28 Jul 2026 23:00:30 +0200
| Newsgroups | org.infradead.lists.linux-mediatek,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel,org.kernel.vger.netdev |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]>
Reviewed-by: Andrew Lunn <[email protected]>
Andrew