From patchwork Thu May 5 06:20:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kai-Heng Feng X-Patchwork-Id: 1626693 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=hJeya2ux; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kv3Vg1MfNz9sG0 for ; Thu, 5 May 2022 16:21:13 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1nmUrH-00064u-Je; Thu, 05 May 2022 06:21:03 +0000 Received: from smtp-relay-canonical-0.internal ([10.131.114.83] helo=smtp-relay-canonical-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1nmUrG-00064I-41 for kernel-team@lists.ubuntu.com; Thu, 05 May 2022 06:21:02 +0000 Received: from localhost.localdomain (unknown [10.101.196.174]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPSA id BCBF43F811 for ; Thu, 5 May 2022 06:20:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1651731660; bh=NzQDIswfP2MqUzuu3Pq/pt9r61gN7MS+V8KPPL6NY94=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=hJeya2uxRhLCsFw37ldFf90SvygQu+lmsIqx4bKEVLLXhQF1SgOzyf2SNdKYoV/DU IuFC2+ieb3WN2NSF8y4YqfWrnyF2NE7ISwhJDWBz7lpxE/ft81IQBz+f+1dq5K2p0C 7GY9j15D4Vx/tJfiJIzIuoTPWXZpMQ+goOi49pd5//64UQPqsVBVZZ+pUQkwroIc47 qrQdpS9OaSChIArOzkamqOMqylGX/pfSUSkpOWdRKEvJWgdyDjE/MvhykI0xIXqiBL h+BnaHFPGmOL52cJtqxbot5sco516OJYkGhsP7GlTCIxmfv+74gqD1f0UtDNlxqMaY SaAGZLKolDqbA== From: Kai-Heng Feng To: kernel-team@lists.ubuntu.com Subject: [SRU] [linux-intel] [PATCH] UBUNTU: SAUCE: net: phy: marvell: Skip setting LED on Dell EMC board Date: Thu, 5 May 2022 14:20:13 +0800 Message-Id: <20220505062014.1895607-2-kai.heng.feng@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220505062014.1895607-1-kai.heng.feng@canonical.com> References: <20220505062014.1895607-1-kai.heng.feng@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" 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 --- 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 #include #include +#include #include #include @@ -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):