>
>On Tue, Dec 01, 2026 at 05:44:52PM +0800, javen wrote:
>> From: Javen Xu <jave…@realsil.com.cn>
>>
>> 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.
>
I agree. But most of Realtek nics are single chip, mac and phy are highly integrated. Some of the chips share the same PHY ID, but they have different mac version which should be applied different firmware. In this case, I think firmware here can not be moved into PHY driver for the bad design.
Just as we discusses in r8169 phylink patch.
Link: https://lore.kernel.org/netdev/7473…@realsil.com.cn/
Thanks,
Javen