Re: [PATCH net-next v5 2/5] net: dsa: mxl862xx: add SMDIO clause-22 register access

Andrew Lunn <[email protected]>
Newsgroups org.kernel.vger.linux-doc,org.kernel.vger.linux-kernel,org.kernel.vger.netdev
Message-ID <[email protected]>
On Sat, Jul 25, 2026 at 03:16:03AM +0100, Daniel Golle wrote:
> Add mxl862xx_smdio_read() and mxl862xx_smdio_write() for clause-22
> SMDIO register access. The switch's MCUboot bootloader exposes only
> clause-22 registers; the clause-45 MMD interface needs the running
> firmware and is unavailable while the switch is in MCUboot. The MDIO
> bus lock is held per-transaction (not across polls) so that SB PDI
> polling during flash erase does not starve other non-switch users of
> the same MDIO bus, such as separate PHYs providing WAN or management
> interfaces.
> 
> Unlike mxl862xx_api_wrap(), which takes the bus lock with
> MDIO_MUTEX_NESTED because it can be entered from the accessors of
> the switch-internal MDIO bus while that bus's lock of the same lock
> class is already held, the SMDIO helpers take it with a plain
> mutex_lock(). They are only called from probe and devlink flash
> contexts where no other MDIO bus lock can be held.
> 
> Signed-off-by: Daniel Golle <[email protected]>

Reviewed-by: Andrew Lunn <[email protected]>

    Andrew
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.