Re: [PATCH net v3 1/3] net: phy: dp83867: handle the active-high LED polarity mode

From: Andrew Lunn

Date: Tue Sep 08 2026 - 10:51:02 EST


On Tue, Sep 08, 2026 at 07:59:57PM +0900, Donggeun Yoo wrote:
> Commit a274465cc3be ("net: phy: support 'active-high' property for PHY
> LEDs") added PHY_LED_ACTIVE_HIGH and made of_phy_led() set the matching
> bit in the modes mask when a LED node carries the 'active-high'
> property. dp83867 was not part of that series.
>
> dp83867_led_polarity_set() only recognizes PHY_LED_ACTIVE_LOW, so
> PHY_LED_ACTIVE_HIGH falls through to the default case and returns -EINVAL.
> of_phy_led() propagates the error, of_phy_leds() drops the LEDs registered
> so far and passes it on, and phy_probe() returns it. A device tree marking
> a DP83867 LED as 'active-high', which leds/common.yaml allows and
> ethernet-phy.yaml references for led@N nodes, thus leaves the mdio device
> unbound, so phy_attach_direct() falls back to the genphy driver: the PHY
> comes up without its DP83867 configuration and loses the RGMII internal
> delay setup.
>
> Active high is what the function programs when no polarity mode is
> requested at all, so the initial value of polarity already satisfies the
> request and only the case label is missing.
>
> Cc: stable@xxxxxxxxxxxxxxx
> Fixes: a274465cc3be ("net: phy: support 'active-high' property for PHY LEDs")
> Assisted-by: Claude:claude-fable-5
> Signed-off-by: Donggeun Yoo <donggeunyoo.kernel@xxxxxxxxx>

Reviewed-by: Andrew Lunn <andrew@xxxxxxx>

Andrew