RE: [PATCH net-next v1] net: phy: realtek: improve firmware write speed

From: Javen

Date: Fri Sep 11 2026 - 05:50:48 EST


>
>
>Hi Javen
>
>On 11.9.2026 07:51, Javen wrote:
>>>
>>> On Thu, Sep 10, 2026 at 10:49:26AM +0800, javen wrote:
>>>> From: Javen Xu <javen_xu@xxxxxxxxxxxxxx>
>>>>
>>>> Firmware execution routine unconditionally uses phy_modify_mmd() for
>>>> all OP_WRITE entries which introduces an unnecessary read
>>>> transaction when updating an entire 16-bit register. So we optimize
>>>> this by checking bitmask boundaries. Use phy_write_mmd() directly to
>>>> speed up firmware loading process.
>>>
>>> For optimisations, it is normal to include some benchmark numbers to
>>> show how big a change it made. Is the added complexity worth the
>>> change?
>>>
>>
>> I traced the actual MDC/MDIO hardware transactions during firmware
>> loading process. Here are the benchmark numbers:
>>
>> - Unpatched : about 28,000 MDIO transactions.
>> - Patched: about 9,600 MDIO transactions.
>>
>> This results in a 65% reduction in MDIO traffic.
>
>Can you please add these numbers to the commit?
>
>The patch itself looks fine and also compiles cleanly on my machine.
>So with the number added, I'd be happy to R-b.
>

Hi Nicolai,

Thanks for the review and testing.
I will add these benchmark numbers to the commit message and send out a v2 patch.

Thanks,
Javen