From: Kai-Heng Feng <kai.heng.feng@canonical.com> To: Andrew Lunn <andrew@lunn.ch> Cc: peppe.cavallaro@st.com, alexandre.torgue@foss.st.com, joabreu@synopsys.com, "David S. Miller" <davem@davemloft.net>, "Jakub Kicinski" <kuba@kernel.org>, "Maxime Coquelin" <mcoquelin.stm32@gmail.com>, "Heiner Kallweit" <hkallweit1@gmail.com>, "Russell King" <linux@armlinux.org.uk>, "Marek Behún" <kabel@kernel.org>, "Ivan Bornyakov" <i.bornyakov@metrotek.ru>, "Pali Rohár" <pali@kernel.org>, netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] stmmac: intel: Honor phy LED set by system firmware on a Dell hardware Date: Fri, 14 Jan 2022 23:22:53 +0800 [thread overview] Message-ID: <CAAd53p5R2y-2JhWx3wp2=aBypJO=iV7fFS99eAgk6q7KBZMFMA@mail.gmail.com> (raw) In-Reply-To: <YeF18mxKuO4/4G0V@lunn.ch> On Fri, Jan 14, 2022 at 9:09 PM Andrew Lunn <andrew@lunn.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@canonical.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
WARNING: multiple messages have this Message-ID (diff)
From: Kai-Heng Feng <kai.heng.feng@canonical.com> To: Andrew Lunn <andrew@lunn.ch> Cc: peppe.cavallaro@st.com, alexandre.torgue@foss.st.com, joabreu@synopsys.com, "David S. Miller" <davem@davemloft.net>, "Jakub Kicinski" <kuba@kernel.org>, "Maxime Coquelin" <mcoquelin.stm32@gmail.com>, "Heiner Kallweit" <hkallweit1@gmail.com>, "Russell King" <linux@armlinux.org.uk>, "Marek Behún" <kabel@kernel.org>, "Ivan Bornyakov" <i.bornyakov@metrotek.ru>, "Pali Rohár" <pali@kernel.org>, netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] stmmac: intel: Honor phy LED set by system firmware on a Dell hardware Date: Fri, 14 Jan 2022 23:22:53 +0800 [thread overview] Message-ID: <CAAd53p5R2y-2JhWx3wp2=aBypJO=iV7fFS99eAgk6q7KBZMFMA@mail.gmail.com> (raw) In-Reply-To: <YeF18mxKuO4/4G0V@lunn.ch> On Fri, Jan 14, 2022 at 9:09 PM Andrew Lunn <andrew@lunn.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@canonical.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-01-14 15:23 UTC|newest] Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-01-14 4:07 [PATCH 1/2] net: phy: marvell: Use BIT() macro for flags Kai-Heng Feng 2022-01-14 4:07 ` [PATCH 2/2] stmmac: intel: Honor phy LED set by system firmware on a Dell hardware Kai-Heng Feng 2022-01-14 4:07 ` Kai-Heng Feng 2022-01-14 4:35 ` Jakub Kicinski 2022-01-14 4:35 ` Jakub Kicinski 2022-01-14 6:47 ` Kai-Heng Feng 2022-01-14 6:47 ` Kai-Heng Feng 2022-01-14 16:23 ` Jakub Kicinski 2022-01-14 16:23 ` Jakub Kicinski 2022-01-14 6:53 ` kernel test robot 2022-01-14 6:53 ` kernel test robot 2022-01-14 13:09 ` Andrew Lunn 2022-01-14 13:09 ` Andrew Lunn 2022-01-14 15:22 ` Kai-Heng Feng [this message] 2022-01-14 15:22 ` Kai-Heng Feng 2022-01-14 17:25 ` Andrew Lunn 2022-01-14 17:25 ` Andrew Lunn 2022-01-14 13:20 ` Andrew Lunn 2022-01-14 13:20 ` Andrew Lunn 2022-01-14 15:25 ` Kai-Heng Feng 2022-01-14 15:25 ` Kai-Heng Feng
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to='CAAd53p5R2y-2JhWx3wp2=aBypJO=iV7fFS99eAgk6q7KBZMFMA@mail.gmail.com' \ --to=kai.heng.feng@canonical.com \ --cc=alexandre.torgue@foss.st.com \ --cc=andrew@lunn.ch \ --cc=davem@davemloft.net \ --cc=hkallweit1@gmail.com \ --cc=i.bornyakov@metrotek.ru \ --cc=joabreu@synopsys.com \ --cc=kabel@kernel.org \ --cc=kuba@kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-stm32@st-md-mailman.stormreply.com \ --cc=linux@armlinux.org.uk \ --cc=mcoquelin.stm32@gmail.com \ --cc=netdev@vger.kernel.org \ --cc=pali@kernel.org \ --cc=peppe.cavallaro@st.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.