RE: [PATCH net-next v8 10/11] r8152: add TGPHY register access for RTL8157 and RTL8159
From: Chih Kai Hsu
Date: Mon Nov 23 2026 - 01:22:09 EST
On 11/20/26 9:22 pm, Andrew wrote:
> > The root cause there is also that
> > the MII library does not check the errno, so a future patch could make
> > the MII APIs check the mdio_read() return value and propagate the error.
>
> The MII library is deprecated. It is not maintained. It will not be changed unless
> it is really broken, and by that i mean it breaks 802.3.
Understood, I won't touch the MII library. read_mii_word() returns 0 to the MII
library when TGPHY fails. That's a BMCR with autoneg disabled, so mii_nway_restart()
returns without writing anything. As for -ENODEV, every write that follows is blocked
then, so it's also safe. So, I think the current `ret < 0 ? 0 : ret` is enough until we
move to phylink.
>
> All feature development work should be done on phylink and phylib.
>
> Andrew
Best Regards,
Chih-Kai