From patchwork Sun Feb 20 18:50:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sander Vanheule X-Patchwork-Id: 1595234 X-Patchwork-Delegate: sander@svanheule.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.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=z8tofJuC; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=svanheule.net header.i=@svanheule.net header.a=rsa-sha256 header.s=mail1707 header.b=i4Z5bz81; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4K1vhx4wjsz9sFn for ; Mon, 21 Feb 2022 05:53:37 +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=WZgtAfyK/tHzoZWt72NLh5vfV+TABN7Rali6CDfK0ZM=; b=z8tofJuCkvyRBA UD+23Qm+sTSseWBaQoXJlkBl6m9gd7qNN4Kw5OwLRjH7oTw/MWKTVyagpZT+CPfmhiYDUFQ5RNHMm iXqDBXoAL4PICSyNPgNX3sxPuSwnFex7Xpbsd+dNTKS0exyCQ2N4sjFe7f4U+7yS0muh4mbeHVrt2 S+sFWm1ixgX/jptuicmgh3i2T1Gq+UyRvP3AhFhpeuBgAmTXbjcnilPTyLwmB5CCmJATBrXCEsTKi N8WvQtNiqrwGF5EsnPmEANP3bhcMuDxMICOOd4+gKqNDPirJF5nMXi/KhTAl7rNR7Sjl+bVgFOYDk j4PLJPMAkN6Txk5hC9+w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nLrII-0026ne-JC; Sun, 20 Feb 2022 18:50:50 +0000 Received: from polaris.svanheule.net ([84.16.241.116]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nLrIE-0026mF-M2 for openwrt-devel@lists.openwrt.org; Sun, 20 Feb 2022 18:50:48 +0000 Received: from terra.local.svanheule.net (104.153-136-217.adsl-dyn.isp.belgacom.be [217.136.153.104]) (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) (Authenticated sender: sander@svanheule.net) by polaris.svanheule.net (Postfix) with ESMTPSA id 927772A58FC; Sun, 20 Feb 2022 19:50:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=svanheule.net; s=mail1707; t=1645383043; 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=xEWUsnlIrJV0c8e4PmcInQh8cUQAdSP2O/46DeVDyTM=; b=i4Z5bz81Wqo61JlWfDqiLx9aeEdyFc2tSyPArxjm7KhE4ecdc2puaK4hR9zfqx1rE5fB0d s3KmH2wWKSUA6lbwuBd0DxV3Td0/MKLqXl7yNTf0RirzcJupoSGPwag5fkSVJQkbhBveac MGtWvnhSRx+red8x3WZ7Ock4KFHbMurpvWm2FkdFwSAqQi1vImi2IyAV9PJXx4CPkaHMvR bJ7xYvkUMkizerrqvoK0XTIXqsPXb5IndIxXDt23SfepE9pQDuta6uWUUYec5OIZg+hvJm cXYlpEPWF2tcs+nq9dhPBepJ4roi09LkAH7zacljsu10N1VfnvofDpGKLYkH9A== From: Sander Vanheule To: openwrt-devel@lists.openwrt.org Cc: Birger Koblitz , Daniel Golle , Sander Vanheule Subject: [PATCH] realtek: ZyXEL GS1900-48: drop gpio-restart Date: Sun, 20 Feb 2022 19:50:38 +0100 Message-Id: <20220220185038.943824-1-sander@svanheule.net> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220220_105046_960842_D0480B54 X-CRM114-Status: UNSURE ( 8.47 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.9 (/) 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: GPIO 5 on the RTL8231 can be used to reset the system, but gpio-restart uses gpiod_set_value. This triggers a kernel warning and backtrace for GPIO pins that can sleep, such as the RTL8231's. Two warn [...] Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [84.16.241.116 listed in list.dnswl.org] -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 GPIO 5 on the RTL8231 can be used to reset the system, but gpio-restart uses gpiod_set_value. This triggers a kernel warning and backtrace for GPIO pins that can sleep, such as the RTL8231's. Two warnings are emitted by libgpiod, and a third warning by gpio-restart itself after it fails to restart the system: [ 106.654008] ------------[ cut here ]------------ [ 106.659240] WARNING: CPU: 0 PID: 4279 at drivers/gpio/gpiolib.c:3098 gpiod_set_value+0x7c/0x108 [ Stack dump and call trace ] [ 106.826218] ---[ end trace d1de50b401f5a153 ]--- [ 106.962992] ------------[ cut here ]------------ [ 106.968208] WARNING: CPU: 0 PID: 4279 at drivers/gpio/gpiolib.c:3098 gpiod_set_value+0x7c/0x108 [ Stack dump and call trace ] [ 107.136718] ---[ end trace d1de50b401f5a154 ]--- [ 111.087092] ------------[ cut here ]------------ [ 111.092271] WARNING: CPU: 0 PID: 4279 at drivers/power/reset/gpio-restart.c:46 gpio_restart_notify+0xc0/0xdc [ Stack dump and call trace ] [ 111.256629] ---[ end trace d1de50b401f5a155 ]--- By removing gpio-restart from this device, we skip the restart-by-GPIO attempt and rely only on the watchdog for restarts, which is already the de facto behaviour. Signed-off-by: Sander Vanheule --- target/linux/realtek/dts-5.10/rtl8393_zyxel_gs1900-48.dts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/target/linux/realtek/dts-5.10/rtl8393_zyxel_gs1900-48.dts b/target/linux/realtek/dts-5.10/rtl8393_zyxel_gs1900-48.dts index dd392c5a9beb..e0e79068d2bc 100644 --- a/target/linux/realtek/dts-5.10/rtl8393_zyxel_gs1900-48.dts +++ b/target/linux/realtek/dts-5.10/rtl8393_zyxel_gs1900-48.dts @@ -39,11 +39,6 @@ gpio-controller; }; - gpio-restart { - compatible = "gpio-restart"; - gpios = <&gpio1 5 GPIO_ACTIVE_LOW>; - }; - keys { compatible = "gpio-keys-polled"; poll-interval = <20>;