Re: [PATCH net-next v2] net: phy: realtek: improve firmware write speed

From: Andrew Lunn

Date: Mon Sep 14 2026 - 13:24:27 EST


On Fri, Sep 11, 2026 at 05:45:27PM +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.
>
> Benchmark number from tracing MDC/MDIO hardware transactions during
> firmware loading process:
> - Unpatched: about 28,000 MDIO transactions
> - Patched: about 9,600 MDIO transactions
> This results in an approx 65% reduction in MDIO traffic.
>
> Signed-off-by: Javen Xu <javen_xu@xxxxxxxxxxxxxx>

Thanks for the numbers.

Reviewed-by: Andrew Lunn <andrew@xxxxxxx>

Andrew