Re: [PATCH net-next v5 2/4] r8169: hold MDIO bus lock while loading firmware

From: Andrew Lunn

Date: Wed Dec 02 2026 - 08:17:48 EST


On Tue, Dec 01, 2026 at 05:44:52PM +0800, javen wrote:
> From: Javen Xu <javen_xu@xxxxxxxxxxxxxx>
>
> rtl_fw_write_firmware() accesses PHY registers directly, bypassing
> phylib. Hold MDIO bus lock meanwhile, so other phylib users cannot
> interleave their accesses with the firmware sequence.

More signs you really do need to clean up this mess and use
phylink/phylib correctly.

Why is the MAC driver downloading firmware into the PHY? The PHY
driver should do this. All the locking issues then go away.

Andrew