[SRU] [linux-intel] [PATCH] UBUNTU: SAUCE: net: phy: marvell: Skip setting LED on Dell EMC board
Kai-Heng Feng
kai.heng.feng at canonical.com
Thu May 5 06:20:13 UTC 2022
BugLink: https://bugs.launchpad.net/bugs/1971667
The board in question requires certain LED config, which is already
configured by BIOS, to correctly show its networking status. However,
Marvell PHY driver hardcodes LED value so we need a way to preserve the
default set by BIOS.
PHY maintainer asked for a "generic" approach which goes no where [1],
so let's move on and use a quirk to handle it.
[1] https://lore.kernel.org/lkml/20220420124053.853891-2-kai.heng.feng@canonical.com/
Signed-off-by: Kai-Heng Feng <kai.heng.feng at canonical.com>
---
drivers/net/phy/marvell.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index cb9858aeec095..dd5b83d9059ac 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -32,6 +32,7 @@
#include <linux/marvell_phy.h>
#include <linux/bitfield.h>
#include <linux/of.h>
+#include <linux/dmi.h>
#include <linux/io.h>
#include <asm/irq.h>
@@ -297,6 +298,16 @@ struct marvell_priv {
s8 pair;
};
+static const struct dmi_system_id skip_config_led_tbl[] = {
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "Dell EMC"),
+ DMI_MATCH(DMI_BOARD_NAME, "0d370eed-89ca-4dc0-a365-e9904c4c62bb"),
+ },
+ },
+ {}
+};
+
static int marvell_read_page(struct phy_device *phydev)
{
return __phy_read(phydev, MII_MARVELL_PHY_PAGE);
@@ -757,6 +768,9 @@ static void marvell_config_led(struct phy_device *phydev)
u16 def_config;
int err;
+ if (dmi_check_system(skip_config_led_tbl))
+ return;
+
switch (MARVELL_PHY_FAMILY_ID(phydev->phy_id)) {
/* Default PHY LED config: LED[0] .. Link, LED[1] .. Activity */
case MARVELL_PHY_FAMILY_ID(MARVELL_PHY_ID_88E1121R):
--
2.34.1
More information about the kernel-team
mailing list