Re: [PATCH net-next 01/13] net: phy: phy_port: Correctly recompute the port's linkmodes

Maxime Chevallier
2026-01-27T15:21:19Z

On 27/01/2026 15:00, Kory Maincent wrote:
> On Tue, 27 Jan 2026 14:41:49 +0100
> Maxime Chevallier <maxime.chevallier@bootlin.com> wrote:
>
>> a PHY-driven phy_port contains a 'supported' field containing the
>> linkmodes available on this port. This is populated based on :
>> - The PHY's reported features
>> - The DT representation of the connector
>> - The PHY's attach_mdi() callback
>>
>> As these different attrbutin methods work in conjunction, the helper
>
> Typo here: ^^^^^^^^^

Erf, thanks :)

>
>> phy_port_update_supported() recomputes the final 'supported' value based
>> on the populated mediums, linkmodes and pairs.
>>
>> However this recompute wasn't correctly implemented, and added more
>> modes than necessary by or'ing the medium-specific modes to the existing
>> support. Let's fix this and properly filter the modes.
>>
>> Fixes: 589e934d2735 ("net: phy: Introduce PHY ports representation")
>> Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
>
> It is the only fix of the series, maybe you should send it standalone?
> Else this seems ok to me.
>

I considered that yeah, however without the rest of this series, this
bug has no impact. I'll probably split it out anyways, depending on how
review goes for the whole series.

Maxime