Re: [PATCH net-next v19 08/10] net: dsa: mt7530: move MDIO bus locking into regmap
[email protected] Wed, 29 Jul 2026 17:16:37 +0000
| Newsgroups | dev.linux.lists.mfd,org.kernel.vger.linux-devicetree |
|---|---|
| Message-ID | <[email protected]> |
> From: Daniel Golle <[email protected]> > > The switch register regmap was created with .disable_locking = true, > relying on callers to manually lock the MDIO bus. Move the locking > into the regmap using .lock/.unlock callbacks, matching the PCS > regmaps that already do this. This allows any code path reaching the > regmap to be automatically protected. > > With regmap handling bus locking, the manual mt7530_mutex_lock/unlock > wrappers in mt7530_write(), _mt7530_read(), mt7530_rmw() and > mt7530_port_change_mtu() become redundant and are removed. > > The MT7531 indirect PHY access functions need serialization of their > multi-step register sequences, but no longer need to hold bus->mdio_lock > across the whole operation. Switch them to reg_mutex. > [ ... ] > - mt7530_mutex_unlock(priv); > + mutex_unlock(&priv->reg_mutex); > > Signed-off-by: Daniel Golle <[email protected]> > Signed-off-by: Christian Marangi <[email protected]> Sashiko has reviewed this patch and found no issues. It looks great! -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=8