From patchwork Fri Oct 14 21:06:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Hoffmann X-Patchwork-Id: 1690168 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=4p2B0SZf; 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=qVGst1Ke; 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 4MpzgN2QF2z23kK for ; Sat, 15 Oct 2022 08:15:12 +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: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:In-Reply-To:References: List-Owner; bh=+yI5BA1eGXqFCg0n3ec6y1tbkifduNZNpShann6tKxs=; b=4p2B0SZfwby3kn WeHWj4z/nPO8y28bH3Gby0ZXDKlK/baz+Y9vLNzkKn+PYURmQr3coUv+rtPCXJdL7s8+OZCb8kjNL EefBtLi4RlORIyIrxPhqxg36bNWOiVfmLK7Lzv7r/yl6JDFfozHQ0qGzIODZgkzppnl9ONgdPG3Et VdSGwFe1UdUn8Z1t0f5BNfb6nA+WYYQzXn8IPVPpMrr6zpfoaNjiCphUl7eVE456phw1tMFM2zVrb CV33pDtRSRtlSq8D7wlyqdfKkS3sMX7Gi+d++mvVsdKio28ZjgYRUHtld58H+sM8w0Bh2HymBLF1K g04PTK00GUUFOHIdK4eA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ojRuz-00FvUP-I7; Fri, 14 Oct 2022 21:08:33 +0000 Received: from srv4.3e8.eu ([193.25.101.238]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ojRut-00FvS9-NH for openwrt-devel@lists.openwrt.org; Fri, 14 Oct 2022 21:08:30 +0000 Received: from localhost.localdomain (p200300c6cf1a0ba001060ed8c12b2b70.dip0.t-ipconnect.de [IPv6:2003:c6:cf1a:ba0:106:ed8:c12b:2b70]) (using TLSv1.3 with cipher TLS_CHACHA20_POLY1305_SHA256 (256/256 bits)) (No client certificate requested) by srv4.3e8.eu (Postfix) with ESMTPSA id C416C600C5; Fri, 14 Oct 2022 23:08:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=3e8.eu; s=mail20211217; t=1665781691; 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; bh=1MrRcsmGVsyXCSGe/P7KlX0iI3S4DEqICamlXOKE1J8=; b=qVGst1KeyEmio+ti9AQjFrLdbjVpkPc7Vj094lNmtdtLT6A/uLXrVxzZuTeXkR3AnLeJI6 uVkMzRJY03r307j111lDtVAWOzE90tIN1g8pjy3f11fDt9izOUpM7/oxzWpEH+fSmNoocY J/8rN215b/zdCdcjK43Y0NKBmcDMtHWl2zG34iMq03uGNosy30wqBrnQmn/enaxYBIBTZe 4Q1VUoNurUah1kOatesYpEPqSm14xdwaDI+cZED+YBme7r9yAAcspGHlpjUpESdJizpAI1 Wh0rE6ZwgQlN7QLfLGQpiH6MFLJchCVoLKAoK/nqknxOo6kcHAURd1W3o6aoXA== From: Jan Hoffmann To: openwrt-devel@lists.openwrt.org Cc: Sander Vanheule , Jan Hoffmann Subject: [PATCH 0/5] realtek: avoid blocking for too long Date: Fri, 14 Oct 2022 23:06:13 +0200 Message-Id: <20221014210618.3012368-1-jan@3e8.eu> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221014_140828_411780_124CD499 X-CRM114-Status: UNSURE ( 8.13 ) 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 fixes multiple instances where the realtek drivers may block for too long. These issues were discovered on HPE 1920 devices where such behaviour is made obvious by the short timeout of the hardwa [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_NONE SPF: sender does not publish an 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 fixes multiple instances where the realtek drivers may block for too long. These issues were discovered on HPE 1920 devices where such behaviour is made obvious by the short timeout of the hardware watchdog. This patch series intentionally doesn't address calls to pr_debug which may also block for long enough to cause issues. Those calls are only effective if the kernel is built with support for debug messages, which is a non-default configuration. Also, it is really an issue with printk itself and in no way specific to the realtek drivers. It is already being worked on upstream by moving to threaded printk. Jan Hoffmann (5): realtek: avoid busy waiting for RTL839x PHY read/write realtek: simplify log messages in rtl83xx_mdio_probe realtek: add debugfs node for L2 table realtek: reduce excessive logging for FDB operations realtek: restructure rtl_table_read/write .../drivers/net/dsa/rtl83xx/common.c | 51 ++++++--- .../drivers/net/dsa/rtl83xx/debugfs.c | 107 ++++++++++++++++++ .../files-5.10/drivers/net/dsa/rtl83xx/dsa.c | 55 +-------- .../drivers/net/dsa/rtl83xx/rtl839x.c | 45 ++++++-- .../drivers/net/dsa/rtl83xx/rtl83xx.h | 4 +- .../drivers/net/dsa/rtl83xx/rtl930x.c | 16 --- 6 files changed, 181 insertions(+), 97 deletions(-)