Messages in this thread | | | From | Kai-Heng Feng <> | Date | Fri, 21 Jan 2022 22:06:23 +0800 | Subject | Re: [PATCH v2] net: phy: marvell: Honor phy LED set by system firmware on a Dell hardware |
| |
On Fri, Jan 21, 2022 at 9:10 PM Andrew Lunn <andrew@lunn.ch> wrote: > > > > > -static void marvell_config_led(struct phy_device *phydev) > > > > +static int marvell_find_led_config(struct phy_device *phydev) > > > > { > > > > - u16 def_config; > > > > - int err; > > > > + int def_config; > > > > + > > > > + if (phydev->dev_flags & PHY_USE_FIRMWARE_LED) { > > > > + def_config = phy_read_paged(phydev, MII_MARVELL_LED_PAGE, MII_PHY_LED_CTRL); > > > > + return def_config < 0 ? -1 : def_config; > > > > > > What about the other two registers which configure the LEDs? > > > > Do you mean the other two LEDs? They are not used on this machine. > > Have you read the datasheet for the PHY? It has three registers for > configuring the LEDs. There is one register which controls the blink > mode, a register which controls polarity, and a third register which > controls how long each blink lasts, and interrupts. If you are going > to save the configuration over suspend/resume you probably need to > save all three.
OK, will change it in next iteration.
> > This last register is also important for WoL, which is why i asked > about it.
The Marvell PHY on the system doesn't support WoL.
Kai-Heng
> > Andrew
| |