[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAd53p5R2y-2JhWx3wp2=aBypJO=iV7fFS99eAgk6q7KBZMFMA@mail.gmail.com>
Date: Fri, 14 Jan 2022 23:22:53 +0800
From: Kai-Heng Feng <kai.heng.feng@...onical.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: peppe.cavallaro@...com, alexandre.torgue@...s.st.com,
joabreu@...opsys.com, "David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>,
Marek Behún <kabel@...nel.org>,
Ivan Bornyakov <i.bornyakov@...rotek.ru>,
Pali Rohár <pali@...nel.org>,
netdev@...r.kernel.org, linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] stmmac: intel: Honor phy LED set by system firmware
on a Dell hardware
On Fri, Jan 14, 2022 at 9:09 PM Andrew Lunn <andrew@...n.ch> wrote:
>
> On Fri, Jan 14, 2022 at 12:07:54PM +0800, Kai-Heng Feng wrote:
> > BIOS on Dell Edge Gateway 3200 already makes its own phy LED setting, so
> > instead of setting another value, keep it untouched and restore the saved
> > value on system resume.
> >
> > Signed-off-by: Kai-Heng Feng <kai.heng.feng@...onical.com>
> > ---
> > .../net/ethernet/stmicro/stmmac/dwmac-intel.c | 16 +++++
> > drivers/net/ethernet/stmicro/stmmac/stmmac.h | 2 +
> > .../net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++
> > drivers/net/phy/marvell.c | 58 ++++++++++++-------
> > include/linux/marvell_phy.h | 1 +
> > 5 files changed, 61 insertions(+), 20 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
> > index 8e8778cfbbadd..f8a2879e0264a 100644
> > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
> > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
> > @@ -857,6 +857,16 @@ static const struct dmi_system_id quark_pci_dmi[] = {
> > {}
> > };
> >
> > +static const struct dmi_system_id use_preset_led[] = {
> > + {
> > + .matches = {
> > + DMI_MATCH(DMI_SYS_VENDOR, "Dell EMC"),
> > + DMI_MATCH(DMI_PRODUCT_NAME, "Edge Gateway 3200"),
> > + },
> > + },
> > + {}
> > +};
>
> This is a PHY property. Why is the MAC involved?
This is inspired by commit a93f7fe13454 ("net: phy: marvell: add new
default led configure for m88e151x") which passes the flag from MAC to
PHY.
>
> Please also think about how to make this generic, so any ACPI based
> system can use it, with any PHY.
ACPI property won't work because it ties to ACPI platform device or
PCI device, so the property still needs to be passed from MAC to PHY.
So the only approach I can think of is to use DMI match directly in PHY driver.
Kai-Heng
>
> Andrew
Powered by blists - more mailing lists