From 77ae5553ca7afb92a4eee2ab60cffc069bf75d3b Mon Sep 17 00:00:00 2001 From: Kai-Heng Feng Date: Thu, 5 May 2022 14:20:14 +0800 Subject: [PATCH] UBUNTU: SAUCE: net: phy: marvell: Skip setting LED on Dell EMC board 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 Acked-by: Tim Gardner Signed-off-by: Andrea Righi --- 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 eba652a4c1d8..fc55f19994fc 100644 --- a/drivers/net/phy/marvell.c +++ b/drivers/net/phy/marvell.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -312,6 +313,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); @@ -759,6 +770,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):