From patchwork Sat Dec 17 20:45:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Hoffmann X-Patchwork-Id: 1716950 X-Patchwork-Delegate: sander@svanheule.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=D/KRg+dq; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=3e8.eu header.i=@3e8.eu header.a=rsa-sha256 header.s=mail20211217 header.b=NyqEGbex; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NZJ370Q4cz2403 for ; Sun, 18 Dec 2022 07:48:35 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=uukKY6RZdJvKfYsB9wZVPKI9Mp7+C2TUzUU37zu0GJ8=; b=D/KRg+dqKiVoKm au76TsbC/IsOGi9PJ4qMXYSAHvL38aCpbHh0Tiwulra2CH3bZml0oMTLjWynpKMdSK1LNoaywkEVo d2bAN54MPImF9w7SfUFYqh9CkXrO5PvW5fXIUfeYSNKvIXnypqoVRzsrDDJKEkfPjQq8IJJ7XYDbS uL8htSfto16IbP07V0OJPz4Ml4jq1NAqvoypIBHSmY7d5OoDzHvDrmY8+L0I9GCYkr5rPLEZSd4Gj xOEEfZkmTAba4oixZvC/qTo7h2eaaro0RWMywynZifgKscnvTEv6wr6VP7Ap7kFNmhOAsbhbxs1Ge J78cD8bLRQgodbDr16Mg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p6e4t-00CiVZ-Cy; Sat, 17 Dec 2022 20:46:39 +0000 Received: from srv5.3e8.eu ([94.16.113.219]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p6e4R-00CiDZ-De for openwrt-devel@lists.openwrt.org; Sat, 17 Dec 2022 20:46:25 +0000 Received: from localhost.localdomain (p200300c6cf1c7da031f9d769c6dfbbbe.dip0.t-ipconnect.de [IPv6:2003:c6:cf1c:7da0:31f9:d769:c6df:bbbe]) (using TLSv1.3 with cipher TLS_CHACHA20_POLY1305_SHA256 (256/256 bits)) (No client certificate requested) by srv5.3e8.eu (Postfix) with ESMTPSA id 14EE1E10E5; Sat, 17 Dec 2022 21:46:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=3e8.eu; s=mail20211217; t=1671309967; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=660aVjgX1JbpDdNl2dLPqZsPh+BHcOHeFAJO6gxYOwA=; b=NyqEGbexaQFZy/9t6TKM/7LM22FA2bGlD6FCUXW7HNVuJL7vsoBsJNy9BDmbgFd5PrnpK4 pBW58BgAv5snuCwAw0d7Is6eJod0VIqYJ3cQ34iRcRkuxakgX5E8OhboYCYL3sIx0rF2+8 jr1Dze+jx+70NwYrKV6rCRu50yIM6twjvc24+RX7w4SFtO0Up9ZvPU1+M3+pnzr4FSjjq3 iuhXGmHKYIFJ2N1aPeBU9JWlDY9TzNooNSiu1N7WaR4VxvwYzotjZqnPlmNXMG4Y7lHB9W NyLXnrG+RPfp3wPdV3jDFur8YSkbc11AbrSF2Q1CyrhiRZKHDE7q2eZOBGfBtA== From: Jan Hoffmann To: openwrt-devel@lists.openwrt.org Cc: sander@svanheule.net, Jan Hoffmann Subject: [PATCH v2 1/3] realtek: simplify log messages in rtl83xx_mdio_probe Date: Sat, 17 Dec 2022 21:45:41 +0100 Message-Id: <20221217204543.1725984-2-jan@3e8.eu> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221217204543.1725984-1-jan@3e8.eu> References: <20221217204543.1725984-1-jan@3e8.eu> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221217_124623_155057_9B6E8A7F X-CRM114-Status: UNSURE ( 9.79 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This function currently prints three messages for every switch port at KERN_INFO level. This takes a considerable amount of time during bootup and can even trigger an external watchdog. Replace these log messages by a single one at KERN_DEBUG level. Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org This function currently prints three messages for every switch port at KERN_INFO level. This takes a considerable amount of time during bootup and can even trigger an external watchdog. Replace these log messages by a single one at KERN_DEBUG level. Signed-off-by: Jan Hoffmann --- .../realtek/files-5.10/drivers/net/dsa/rtl83xx/common.c | 8 +------- .../realtek/files-5.15/drivers/net/dsa/rtl83xx/common.c | 8 +------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/common.c b/target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/common.c index e86ff9ccdfed..63c024c81e82 100644 --- a/target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/common.c +++ b/target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/common.c @@ -323,7 +323,6 @@ static int __init rtl83xx_mdio_probe(struct rtl838x_switch_priv *priv) if (of_property_read_u32(dn, "reg", &pn)) continue; - pr_info("%s found port %d\n", __func__, pn); phy_node = of_parse_phandle(dn, "phy-handle", 0); if (!phy_node) { if (pn != priv->cpu_port) @@ -331,14 +330,9 @@ static int __init rtl83xx_mdio_probe(struct rtl838x_switch_priv *priv) continue; } - pr_info("%s port %d has phandle\n", __func__, pn); if (of_property_read_u32(phy_node, "sds", &priv->ports[pn].sds_num)) priv->ports[pn].sds_num = -1; - else { - pr_info("%s sds port %d is %d\n", __func__, pn, - priv->ports[pn].sds_num); - } - pr_info("%s port %d has SDS\n", __func__, priv->ports[pn].sds_num); + pr_debug("%s port %d has SDS %d\n", __func__, pn, priv->ports[pn].sds_num); if (of_get_phy_mode(dn, &interface)) interface = PHY_INTERFACE_MODE_NA; diff --git a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/common.c b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/common.c index b5afed0ef553..8b0b55d89199 100644 --- a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/common.c +++ b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/common.c @@ -323,7 +323,6 @@ static int __init rtl83xx_mdio_probe(struct rtl838x_switch_priv *priv) if (of_property_read_u32(dn, "reg", &pn)) continue; - pr_info("%s found port %d\n", __func__, pn); phy_node = of_parse_phandle(dn, "phy-handle", 0); if (!phy_node) { if (pn != priv->cpu_port) @@ -331,14 +330,9 @@ static int __init rtl83xx_mdio_probe(struct rtl838x_switch_priv *priv) continue; } - pr_info("%s port %d has phandle\n", __func__, pn); if (of_property_read_u32(phy_node, "sds", &priv->ports[pn].sds_num)) priv->ports[pn].sds_num = -1; - else { - pr_info("%s sds port %d is %d\n", __func__, pn, - priv->ports[pn].sds_num); - } - pr_info("%s port %d has SDS\n", __func__, priv->ports[pn].sds_num); + pr_debug("%s port %d has SDS %d\n", __func__, pn, priv->ports[pn].sds_num); if (of_get_phy_mode(dn, &interface)) interface = PHY_INTERFACE_MODE_NA;