Re: [PATCH net] net: phy: air_en8811h: check PBUS register read errors

From: Andrew Lunn

Date: Wed Nov 18 2026 - 13:44:20 EST


On Thu, Nov 19, 2026 at 02:24:36AM +0800, Zhao Li wrote:
> an8811hb_check_crc() ignores the return value of its PBUS reads. When
> the status read fails, the loop tests a stale or uninitialized
> pbus_value and can stop waiting before the check has finished. When the
> result read fails, the PASS or FAIL message tests the status value.
>
> en8811h_print_fw_version() also ignores a failed read, which leaves
> priv->firmware_version at 0 on the first firmware load.
> en8811h_read_status() then handles it as firmware older than 24011202
> and guesses the link partner's 2.5GBASE-T ability from the link speed.
>
> Return the error from each of these reads. A failed version read now
> fails the firmware load or the probe, as the other PBUS errors there
> do.
>
> Found by an AI code review agent; not triggered. Compile-tested with W=1.
>
> Fixes: 71e79430117d ("net: phy: air_en8811h: Add the Airoha EN8811H PHY driver")
> Fixes: 5afda1d734ed ("net: phy: air_en8811h: add Airoha AN8811HB support")
> Cc: stable@xxxxxxxxxxxxxxx # needs adjustments for <= 7.1

Does this bother anybody?

https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html

MDIO pretty much never returns an error.

Please repost for net-next.

Andrew

---
pw-bot: cr