Re: [PATCH net 2/2] net: phy: aquantia: fix applying active_low bit after reset

From: Russell King (Oracle)
Date: Tue Sep 17 2024 - 10:41:36 EST


On Tue, Sep 17, 2024 at 02:49:55PM +0100, Daniel Golle wrote:
> for_each_set_bit was used wrongly in aqr107_config_init() when iterating
> over LEDs. Drop misleading 'index' variable and call
> aqr_phy_led_active_low_set() for each set bit representing an LED which
> is driven by VDD instead of GND pin.

Assuming that the intention is only to set LEDs active-low that were
previously configured to be active-low, then:

Reviewed-by: Russell King (Oracle) <rmk+kernel@xxxxxxxxxxxxxxx>

It's good that we don't call aqr_phy_led_active_low_set() for every LED
in the .config_init method because we don't know whether the LED
outputs for this PHY are used on SFPs to drive e.g. the SFP LOS pin,
and changing LED settings in such a case could cause incorrect
signalling. If this ever changes, then this code needs to be
conditional on !phy_on_sfp(phydev).

Thanks!

--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!