From patchwork Fri Jul 12 13:49:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Hoffmann X-Patchwork-Id: 1959913 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=Bnmmy1US; 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=DcgudItu; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WLF1D5TvFz1xqx for ; Sat, 13 Jul 2024 00:52:00 +1000 (AEST) 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=ui/dQHDAqLBDdDjwKyGz0TgzJfhaBd1dW8aUNoDxrnc=; b=Bnmmy1USmmjt7d 9cW0taGG2Hifp0j1dpF0l67n6Mb8+t76Pnl6zXYLA8MbCphvs3Fz7rBmDHDpGzuWQqpVL4a/WrGcN PxNN1dqu2ZnlW4buXyG0A+KD82t28efWueS52f1ITUCzkI9wuaGL+NgkPa2V4O+quQC/Mq6W8Msg1 QXwjFuJkB2vVM5GCp+C7QI7Qt4xHEGvgA0wwe/zaY6iYk2D7JmW7AXK86vAs/3JhmOIkml+IYEhLy oVJ15MqNt4MuZngpgDp1wksS3NNkscnJyRWIOZj6Wo0/U/uZNz+NLycKlY1h7VLqoCs1DvbsXRnlO 8IkZZkvsYulResjGpaFQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sSHb6-00000000NrW-05Z2; Fri, 12 Jul 2024 14:50:08 +0000 Received: from srv5.3e8.eu ([2a03:4000:28:8d0::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sSHb2-00000000Npw-3qbn for openwrt-devel@lists.openwrt.org; Fri, 12 Jul 2024 14:50:06 +0000 Received: from localhost.localdomain (p200300c6cf02cba0ae21e636d180025d.dip0.t-ipconnect.de [IPv6:2003:c6:cf02:cba0:ae21:e636:d180:25d]) (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 srv5.3e8.eu (Postfix) with ESMTPSA id BF15B12087D; Fri, 12 Jul 2024 16:49:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=3e8.eu; s=mail20211217; t=1720795772; 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=TxrY1iOmZcr7AE/BDeRwOwaeyuWzy81PHCLe7hPJrtU=; b=DcgudItuKNkEzCHe2p/Va0ITKbt31ivJjYSsWBp9Kbk64OGYAlILlBV7u4v4iUggPuG/Ei 4y8yRrpRiuiIvR/ApsrvNjpvKcVfw7+j6c1bp+Zz/CXYEl3C2thKLdynj2pgZNL08YcqQz XzblsoqPpS/QowCGYDHEAXJx+wnm0uYJvQBrUqFF1aWkUpRVu//5yUTVJaxSSUH1bzz+f+ spURpo6/pa/3B+u26PM5FYkxtBM0TiZDlR6FvBWH96dz5ChsEva1dDWMh3VQLoVr/tEYDU 2lr2+l0GaT5Cx5S5AhvIXruJBMChaij4mETWh1ty6wcHXrMTmekDBAFbZ7CCTw== From: Jan Hoffmann To: openwrt-devel@lists.openwrt.org Cc: Jan Hoffmann Subject: [PATCH 1/5] ltq-vdsl-vr9-app: fix error handling during disconnection Date: Fri, 12 Jul 2024 15:49:49 +0200 Message-ID: <20240712144801.1192493-2-jan@3e8.eu> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240712144801.1192493-1-jan@3e8.eu> References: <20240712144801.1192493-1-jan@3e8.eu> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240712_075005_137272_B49ED38B X-CRM114-Status: UNSURE ( 9.88 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.1 (--) 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: Use the correct return value in error message. Fixes: 1daaef31b352 ("ltq-vdsl-app: disconnect when service is stopped") Signed-off-by: Jan Hoffmann --- package/network/config/ltq-vdsl-vr9-app/Makefile | 2 +- .../network/config/ltq-vds [...] Content analysis details: (-2.1 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_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 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 Use the correct return value in error message. Fixes: 1daaef31b352 ("ltq-vdsl-app: disconnect when service is stopped") Signed-off-by: Jan Hoffmann --- package/network/config/ltq-vdsl-vr9-app/Makefile | 2 +- .../network/config/ltq-vdsl-vr9-app/patches/200-autoboot.patch | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package/network/config/ltq-vdsl-vr9-app/Makefile b/package/network/config/ltq-vdsl-vr9-app/Makefile index c51489e2c5fa..e2042bf314d8 100644 --- a/package/network/config/ltq-vdsl-vr9-app/Makefile +++ b/package/network/config/ltq-vdsl-vr9-app/Makefile @@ -9,7 +9,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=ltq-vdsl-vr9-app PKG_VERSION:=4.17.18.6 -PKG_RELEASE:=5 +PKG_RELEASE:=6 PKG_BASE_NAME:=dsl_cpe_control PKG_SOURCE:=$(PKG_BASE_NAME)_vrx-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@OPENWRT diff --git a/package/network/config/ltq-vdsl-vr9-app/patches/200-autoboot.patch b/package/network/config/ltq-vdsl-vr9-app/patches/200-autoboot.patch index cc6feb94aa9f..d949162f5877 100644 --- a/package/network/config/ltq-vdsl-vr9-app/patches/200-autoboot.patch +++ b/package/network/config/ltq-vdsl-vr9-app/patches/200-autoboot.patch @@ -60,7 +60,7 @@ a state where an explicit start command is necessary to connect again. + { + DSL_CCA_DEBUG(DSL_CCA_DBG_ERR, (DSL_CPE_PREFIX + "Autoboot configuration for device (%d) failed!, nRet = %d!" -+ DSL_CPE_CRLF, nDevice, sAutobootCtl.accessCtl.nReturn)); ++ DSL_CPE_CRLF, nDevice, sAutobootCfg.accessCtl.nReturn)); + } + + memset(&sAutobootCtl, 0, sizeof(DSL_AutobootControl_t)); From patchwork Fri Jul 12 13:49:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Hoffmann X-Patchwork-Id: 1959917 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=39B6ACUd; 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=RworQYSS; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WLF1H0rYCz20Mf for ; Sat, 13 Jul 2024 00:52:03 +1000 (AEST) 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=haZ0vf95AndnvWlo/1ei2uyPRnj8HiJpaEVdJc/fuD8=; b=39B6ACUdLfwyRu E8zsbAAz9L+b8IJCBdGCiILoT7IHJbqYtW2Mif9QACuygzUP7n2l1BuCAxbyexPzouDW8ECXrnPKa 1eIIjJVzjR2zXWRSb+8QWkAGpED7hM86lIWigwTf643L6UJLaxOKVniAk6y0W7U/5WYoIj+T/Y86g GQBK6A4fDTNHSDrV1PNpnHuzwBDqP0VkiUW2e1B/AloxklRYdvEgBytgiEQowqr7FoHk8ac4mIHOF BKvhXf0L+8l+QitjHjF/m8+M47vPf0J9QViGqS+ynrZGgfWwxniitl+LL16fxt1liX9wKTXmLPr5H MBZq3Fwnm/4hp2KhxKyg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sSHbC-00000000Nt4-1t2v; Fri, 12 Jul 2024 14:50:14 +0000 Received: from srv5.3e8.eu ([94.16.113.219]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sSHbA-00000000NsF-0KRg for openwrt-devel@lists.openwrt.org; Fri, 12 Jul 2024 14:50:13 +0000 Received: from localhost.localdomain (p200300c6cf02cba0ae21e636d180025d.dip0.t-ipconnect.de [IPv6:2003:c6:cf02:cba0:ae21:e636:d180:25d]) (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 srv5.3e8.eu (Postfix) with ESMTPSA id 53D45120ACB; Fri, 12 Jul 2024 16:49:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=3e8.eu; s=mail20211217; t=1720795773; 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=oS/tMG1Rt5vtrzk6teb6TpFsLZ3ue5RuNbWqOhULjbI=; b=RworQYSSKvSOltTtpYwlM0GCSKtO2LCTZT4lftVD8fMpi4v/rl0X2HQnU7Z0fN05gHDR3b TFfWJwbZwetLEKXtzFsrpzDupkCVkG9WR1afD3h7K4+69q3kY0ajpCwBPFYemn1SRlUaxQ 0Rs5mw5tKREFTcgV5jqJd32kQP1L/qDA1cLVzAxdgQlJ4FHGOm8PX1NnQl4ELzVTIJuV9C OS8g5Iqj1MRevL+9M+HhYvVixcEU3KZk8joqu9hHrblf9yM6RGUzxjvzrwhk1nUfS+xPyP nbvS5GzFgUYcbmR+XaWieZend5VrQLkC2VhcJsog6oiChdl/l2tPWmSUTU4yHw== From: Jan Hoffmann To: openwrt-devel@lists.openwrt.org Cc: Jan Hoffmann Subject: [PATCH 2/5] ltq-vdsl-vr11-app: fix error handling during disconnection Date: Fri, 12 Jul 2024 15:49:50 +0200 Message-ID: <20240712144801.1192493-3-jan@3e8.eu> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240712144801.1192493-1-jan@3e8.eu> References: <20240712144801.1192493-1-jan@3e8.eu> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240712_075012_298389_8535E8C6 X-CRM114-Status: GOOD ( 10.37 ) X-Spam-Score: -2.1 (--) 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: Use the correct return value in error message. Fixes: 6e4c9738bed0 ("ltq-vdsl-vr11-app: add version 4.23.1 for vr11 targets") Signed-off-by: Jan Hoffmann --- package/network/config/ltq-vdsl-vr11-app/Makefile | 2 +- .../network/config/ [...] Content analysis details: (-2.1 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_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 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 Use the correct return value in error message. Fixes: 6e4c9738bed0 ("ltq-vdsl-vr11-app: add version 4.23.1 for vr11 targets") Signed-off-by: Jan Hoffmann --- package/network/config/ltq-vdsl-vr11-app/Makefile | 2 +- .../network/config/ltq-vdsl-vr11-app/patches/200-autoboot.patch | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package/network/config/ltq-vdsl-vr11-app/Makefile b/package/network/config/ltq-vdsl-vr11-app/Makefile index bcbf41e65a15..4e26ee459a1e 100644 --- a/package/network/config/ltq-vdsl-vr11-app/Makefile +++ b/package/network/config/ltq-vdsl-vr11-app/Makefile @@ -9,7 +9,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=ltq-vdsl-vr11-app PKG_VERSION:=4.23.1 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_BASE_NAME:=dsl_cpe_control UGW_VERSION=8.5.2.10 diff --git a/package/network/config/ltq-vdsl-vr11-app/patches/200-autoboot.patch b/package/network/config/ltq-vdsl-vr11-app/patches/200-autoboot.patch index c3e9b9662048..3397c7f024e3 100644 --- a/package/network/config/ltq-vdsl-vr11-app/patches/200-autoboot.patch +++ b/package/network/config/ltq-vdsl-vr11-app/patches/200-autoboot.patch @@ -51,7 +51,7 @@ start it again later, short of unloading and reloading the module. + { + DSL_CCA_DEBUG(DSL_CCA_DBG_ERR, (DSL_CPE_PREFIX + "Autoboot configuration for device (%d) failed!, nRet = %d!" -+ DSL_CPE_CRLF, nDevice, sAutobootCtl.accessCtl.nReturn)); ++ DSL_CPE_CRLF, nDevice, sAutobootCfg.accessCtl.nReturn)); + } + memset(&sAutobootCtl, 0, sizeof(DSL_AutobootControl_t)); From patchwork Fri Jul 12 13:49:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Hoffmann X-Patchwork-Id: 1959914 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=iRlzRisK; 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=kNSaOZEi; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WLF1D5Wxjz1xqy for ; Sat, 13 Jul 2024 00:52:00 +1000 (AEST) 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=1pXZWtFvSjwr1ZkLSfbx1Y49Nl9uhUSupn5uByq7r2w=; b=iRlzRisKgVGarT WJdNIqV9E8lab8G4Oow8JE6KNVaJHyFQRf6nm6+FgeGtjxok+LQi58Nuj0fytt+EUu7g+nvobNx6a jJJKDJaH2ayjwLnJO0tyqd3otjDxmxXHkgOV8RCtDuFCYZ0QUjqy99vMNbZwE2xBjRaezfQZYzrB/ sQY5FqY2lG5Zy0WosNENER55e51P/T8Qa3LSsBy8FLVsXu/gCeJCdGEGRNGb8/bx08e37juFXVN6E P3HwAdlNNJE2ZpvPyfw1LjM+BG9PN8bTtEXFSndSEU78kkE3fY+cMTuQOw4eTljCpOoAjllDFNlJi WyOG9XLA5RDHC+t02H/g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sSHbK-00000000Nve-3puh; Fri, 12 Jul 2024 14:50:22 +0000 Received: from srv5.3e8.eu ([94.16.113.219]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sSHbG-00000000NuB-481x for openwrt-devel@lists.openwrt.org; Fri, 12 Jul 2024 14:50:20 +0000 Received: from localhost.localdomain (p200300c6cf02cba0ae21e636d180025d.dip0.t-ipconnect.de [IPv6:2003:c6:cf02:cba0:ae21:e636:d180:25d]) (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 srv5.3e8.eu (Postfix) with ESMTPSA id 71B90120ACD; Fri, 12 Jul 2024 16:49:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=3e8.eu; s=mail20211217; t=1720795773; 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=EBT9sE4eKtZ/n9YPR7cbmiFIojlByAB2SrxLwsD3aU0=; b=kNSaOZEiaOiCJkWHOphaZ7Gq9dtV0UeEP+XzKW95+ZfJQ+cXAgtijp+GO2avLKiSxx8cX9 p79myiAEY4S1u0dJweU2ZAleLzuOGsaODw0HXjDqbb+KiieHA7re3agFy+VglhgmtjBeK0 deupdfyrEcmMIfnvG+DZtfZhOkV6IACrxpHrSqc8WDtlksBfFhKOrz0IqcN5cGc/xgepS9 l2hMh48VDW4K3ASuK80g2KLd4ayXj6P1KI+lQTsKssiyTbCceKhwjHQ+BSwruz4g4QCv2r AuWCPgLv/JOw5vtruAKJmlr8HULmKGjko3HvT6DEcd4TaGAH/EFUwbWT44+pHQ== From: Jan Hoffmann To: openwrt-devel@lists.openwrt.org Cc: Jan Hoffmann Subject: [PATCH 3/5] ltq-vdsl-vr9-app: always disconnect on exit Date: Fri, 12 Jul 2024 15:49:51 +0200 Message-ID: <20240712144801.1192493-4-jan@3e8.eu> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240712144801.1192493-1-jan@3e8.eu> References: <20240712144801.1192493-1-jan@3e8.eu> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240712_075019_205485_B13F9171 X-CRM114-Status: GOOD ( 15.78 ) X-Spam-Score: -2.1 (--) 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: Move the code for disconnection on exit to a separate function, and also call it in the code path for the "quit" CLI command. While at it, make the patch description a bit clearer. Signed-off-by: Jan Hoffmann --- .../network/config/ltq-vdsl-vr9-app/Makefile | 2 +- .../patches/200-autoboot.patch | 52 ++++++++++++------- .../patches/201-sigterm.patch | 4 +- .../ltq-vd [...] Content analysis details: (-2.1 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_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 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 Move the code for disconnection on exit to a separate function, and also call it in the code path for the "quit" CLI command. While at it, make the patch description a bit clearer. Signed-off-by: Jan Hoffmann --- .../network/config/ltq-vdsl-vr9-app/Makefile | 2 +- .../patches/200-autoboot.patch | 52 ++++++++++++------- .../patches/201-sigterm.patch | 4 +- .../ltq-vdsl-vr9-app/patches/300-ubus.patch | 4 +- 4 files changed, 37 insertions(+), 25 deletions(-) diff --git a/package/network/config/ltq-vdsl-vr9-app/Makefile b/package/network/config/ltq-vdsl-vr9-app/Makefile index e2042bf314d8..51b88231f7e4 100644 --- a/package/network/config/ltq-vdsl-vr9-app/Makefile +++ b/package/network/config/ltq-vdsl-vr9-app/Makefile @@ -9,7 +9,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=ltq-vdsl-vr9-app PKG_VERSION:=4.17.18.6 -PKG_RELEASE:=6 +PKG_RELEASE:=7 PKG_BASE_NAME:=dsl_cpe_control PKG_SOURCE:=$(PKG_BASE_NAME)_vrx-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@OPENWRT diff --git a/package/network/config/ltq-vdsl-vr9-app/patches/200-autoboot.patch b/package/network/config/ltq-vdsl-vr9-app/patches/200-autoboot.patch index d949162f5877..2d3a6a822ead 100644 --- a/package/network/config/ltq-vdsl-vr9-app/patches/200-autoboot.patch +++ b/package/network/config/ltq-vdsl-vr9-app/patches/200-autoboot.patch @@ -1,9 +1,10 @@ This enables automatic connection after the control daemon is started, and also stops the connection on termination. -Using the autoboot restart command is necessary because the stop command -doesn't actually stop the connection, and would also leave the driver in -a state where an explicit start command is necessary to connect again. +Using the autoboot restart command (in combination with configuring the +state machine to wait) is necessary because the stop command doesn't +actually stop the connection, and would also leave the driver in a state +where an explicit start command is necessary to connect again. --- a/src/dsl_cpe_init_cfg.c +++ b/src/dsl_cpe_init_cfg.c @@ -18,25 +19,17 @@ a state where an explicit start command is necessary to connect again. DSL_CPE_LINE_ACTIVATE_CTRL_SET(DSL_G997_INHIBIT_LDSF, DSL_G997_INHIBIT_ACSF, DSL_G997_NORMAL_STARTUP), --- a/src/dsl_cpe_control.c +++ b/src/dsl_cpe_control.c -@@ -6515,10 +6515,13 @@ DSL_CPE_STATIC void DSL_CPE_Termination - DSL_CPE_STATIC DSL_void_t DSL_CPE_Termination (void) - { - #ifdef INCLUDE_DSL_CPE_CLI_SUPPORT -- DSL_int_t nDevice = 0; - DSL_char_t buf[32] = "quit"; - #endif +@@ -6491,6 +6491,57 @@ DSL_int32_t DSL_CPE_DeviceInit ( + return ret; + } ++DSL_CPE_STATIC DSL_void_t DSL_CPE_ShutdownConnection(void) ++{ + DSL_Error_t nRet = DSL_SUCCESS; + DSL_int_t nDevice = 0; + DSL_AutobootConfig_t sAutobootCfg; + DSL_AutobootControl_t sAutobootCtl; - DSL_CPE_Control_Context_t *pCtrlCtx; - - pCtrlCtx = DSL_CPE_GetGlobalContext(); -@@ -6527,6 +6530,50 @@ DSL_CPE_STATIC DSL_void_t DSL_CPE_Termi - pCtrlCtx->bRun = DSL_FALSE; - } - ++ + for (nDevice = 0; nDevice < DSL_CPE_MAX_DSL_ENTITIES; ++nDevice) + { + g_bWaitBeforeConfigWrite[nDevice] = DSL_TRUE; @@ -79,8 +72,27 @@ a state where an explicit start command is necessary to connect again. + } + + DSL_CCA_DEBUG(DSL_CCA_DBG_MSG, (DSL_CPE_PREFIX -+ "Autoboot restart executed" DSL_CPE_CRLF)); ++ "Connection shutdown finished." DSL_CPE_CRLF)); ++} + + /** + Termination handler. Will clean up in case of ctrl-c. +@@ -6521,6 +6572,8 @@ DSL_CPE_STATIC DSL_void_t DSL_CPE_Termi + + DSL_CPE_Control_Context_t *pCtrlCtx; + ++ DSL_CPE_ShutdownConnection(); + - #ifdef INCLUDE_DSL_CPE_CLI_SUPPORT - for (nDevice = 0; nDevice < DSL_CPE_MAX_DSL_ENTITIES; nDevice++) + pCtrlCtx = DSL_CPE_GetGlobalContext(); + if (pCtrlCtx != DSL_NULL) { +@@ -7416,6 +7469,9 @@ void DSL_CPE_main(void) + DSL_CPE_STATIC DSL_Error_t DSL_CPE_Control_Exit (DSL_void_t * pContext) + { + dummy_console_t *pConsole = pContext; ++ ++ DSL_CPE_ShutdownConnection(); ++ + pConsole->bRun = DSL_FALSE; + return DSL_SUCCESS; + } diff --git a/package/network/config/ltq-vdsl-vr9-app/patches/201-sigterm.patch b/package/network/config/ltq-vdsl-vr9-app/patches/201-sigterm.patch index 4e978359835e..5397a139f5a3 100644 --- a/package/network/config/ltq-vdsl-vr9-app/patches/201-sigterm.patch +++ b/package/network/config/ltq-vdsl-vr9-app/patches/201-sigterm.patch @@ -1,6 +1,6 @@ --- a/src/dsl_cpe_control.c +++ b/src/dsl_cpe_control.c -@@ -6504,7 +6504,7 @@ DSL_CPE_STATIC void DSL_CPE_Termination +@@ -6555,7 +6555,7 @@ DSL_CPE_STATIC void DSL_CPE_Termination /* ignore the signal, we'll handle by ourself */ signal (sig, SIG_IGN); @@ -9,7 +9,7 @@ { DSL_CCA_DEBUG(DSL_CCA_DBG_MSG, (DSL_CPE_PREFIX "terminated" DSL_CPE_CRLF)); DSL_CPE_Termination (); -@@ -6803,6 +6803,7 @@ DSL_int_t dsl_cpe_daemon ( +@@ -6809,6 +6809,7 @@ DSL_int_t dsl_cpe_daemon ( #ifndef RTEMS signal (SIGINT, DSL_CPE_TerminationHandler); diff --git a/package/network/config/ltq-vdsl-vr9-app/patches/300-ubus.patch b/package/network/config/ltq-vdsl-vr9-app/patches/300-ubus.patch index d257ca2fc4ab..b0cdaa1bcf04 100644 --- a/package/network/config/ltq-vdsl-vr9-app/patches/300-ubus.patch +++ b/package/network/config/ltq-vdsl-vr9-app/patches/300-ubus.patch @@ -10,7 +10,7 @@ DSL_char_t *g_sFirmwareName1 = DSL_NULL; DSL_FirmwareFeatures_t g_nFwFeatures1 = {DSL_FW_XDSLMODE_CLEANED, DSL_FW_XDSLFEATURE_CLEANED, DSL_FW_XDSLFEATURE_CLEANED}; -@@ -6806,6 +6809,8 @@ DSL_int_t dsl_cpe_daemon ( +@@ -6812,6 +6815,8 @@ DSL_int_t dsl_cpe_daemon ( signal (SIGTERM, DSL_CPE_TerminationHandler); #endif /* RTEMS*/ @@ -19,7 +19,7 @@ /* Open DSL_CPE_MAX_DSL_ENTITIES devices*/ for (nDevice = 0; nDevice < DSL_CPE_MAX_DSL_ENTITIES; nDevice++) { -@@ -7260,6 +7265,7 @@ DSL_int_t dsl_cpe_daemon ( +@@ -7266,6 +7271,7 @@ DSL_int_t dsl_cpe_daemon ( #endif /* INCLUDE_DSL_CPE_CLI_SUPPORT */ DSL_CPE_CONTROL_EXIT: From patchwork Fri Jul 12 13:49:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Hoffmann X-Patchwork-Id: 1959912 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=VrFwyhpG; 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=clkI5pgH; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WLF1D6Lm7z20Mc for ; Sat, 13 Jul 2024 00:52:00 +1000 (AEST) 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=6NhDXZhXPJ5Q+FrR/NSqAev+MOWuLOzstzqtbxQkptY=; b=VrFwyhpG9DU17+ DajKk9cxtkRhvnEyBs0/FB9B5Y8wSvMo1TJg18K4tAr2qLBk77e9Hy/WFwyDhToTgCaaH4CB0/Ma2 YeKJ3pAXzHV1MbvWjVzysInXpgb5FFrWe6Bg1Tncn5go9YZf6AJxntmQhiSfTmQtlyZZoK3yEX9Ft yX/AlLBnYGEJ0g8nf6Mh3LThWZIrf39J9X11L5geQmFWLpkGV+bjFAJFxKP+/+sszVcY9r+7msQcl oYVzO8x0hGuUFDoCc28uo3gnPuxYb55qIThj6K8zxyukiIrpRJqL7J12W1tvQVHoAWDaiN0oxcH6P 242E9Mib8QKuczkX0OuQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sSHbS-00000000NyP-1Wvz; Fri, 12 Jul 2024 14:50:30 +0000 Received: from srv5.3e8.eu ([94.16.113.219]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sSHbO-00000000Nwl-2XAe for openwrt-devel@lists.openwrt.org; Fri, 12 Jul 2024 14:50:28 +0000 Received: from localhost.localdomain (p200300c6cf02cba0ae21e636d180025d.dip0.t-ipconnect.de [IPv6:2003:c6:cf02:cba0:ae21:e636:d180:25d]) (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 srv5.3e8.eu (Postfix) with ESMTPSA id 93120120B75; Fri, 12 Jul 2024 16:49:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=3e8.eu; s=mail20211217; t=1720795773; 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=4tEwg/jJc0BApaxVCe6JJKZABmg3J4L3suG2r/LCw5k=; b=clkI5pgHVSlBVFbJB+D33sFcuV4297100Ck/H6QNYS0OH3qbBhHIDQXY+0jQDQ4EpRo3/K 25qBNWtZU85eoZeh1l/p4viVxkn/Z/cbNi66VptI5iX+aipzLudwDkybg9owKvkoJxduXQ bhCBSVQQfibEGbLoWYdCBElF+5UFqn6+lbCvyr1hyEx6FUvR90v+be0Qv4R8UUJJmfd1ej uUCUNlvb7tC6XmadrZxHBsH6mdwQsa8P4Zfz+uzQ6DAh11+cmivOO8Yy8beAt4RQSdCL73 doAviE6yppstvgmBD5WFO3/oDvvx+DVuoybqb/sJH5IlwpMr0V2JVHSJqwhOJQ== From: Jan Hoffmann To: openwrt-devel@lists.openwrt.org Cc: Jan Hoffmann Subject: [PATCH 4/5] ltq-vdsl-vr11-app: always disconnect on exit Date: Fri, 12 Jul 2024 15:49:52 +0200 Message-ID: <20240712144801.1192493-5-jan@3e8.eu> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240712144801.1192493-1-jan@3e8.eu> References: <20240712144801.1192493-1-jan@3e8.eu> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240712_075026_877191_591DF665 X-CRM114-Status: GOOD ( 17.21 ) X-Spam-Score: -2.1 (--) 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: Move the code for disconnection on exit to a separate function, and also call it in the code paths for SIGINT and the "quit" CLI command. While at it, make the patch description a bit clearer. Signed-off-by: Jan Hoffmann --- .../network/config/ltq-vdsl-vr11-app/Makefile | 2 +- .../patches/200-autoboot.patch | 124 +++++++++++++----- .../ltq-vdsl-vr11-app/patches/300-ubus.patch | [...] Content analysis details: (-2.1 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_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 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 Move the code for disconnection on exit to a separate function, and also call it in the code paths for SIGINT and the "quit" CLI command. While at it, make the patch description a bit clearer. Signed-off-by: Jan Hoffmann --- .../network/config/ltq-vdsl-vr11-app/Makefile | 2 +- .../patches/200-autoboot.patch | 124 +++++++++++++----- .../ltq-vdsl-vr11-app/patches/300-ubus.patch | 4 +- 3 files changed, 97 insertions(+), 33 deletions(-) diff --git a/package/network/config/ltq-vdsl-vr11-app/Makefile b/package/network/config/ltq-vdsl-vr11-app/Makefile index 4e26ee459a1e..e56e90f99642 100644 --- a/package/network/config/ltq-vdsl-vr11-app/Makefile +++ b/package/network/config/ltq-vdsl-vr11-app/Makefile @@ -9,7 +9,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=ltq-vdsl-vr11-app PKG_VERSION:=4.23.1 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_BASE_NAME:=dsl_cpe_control UGW_VERSION=8.5.2.10 diff --git a/package/network/config/ltq-vdsl-vr11-app/patches/200-autoboot.patch b/package/network/config/ltq-vdsl-vr11-app/patches/200-autoboot.patch index 3397c7f024e3..5625af97725c 100644 --- a/package/network/config/ltq-vdsl-vr11-app/patches/200-autoboot.patch +++ b/package/network/config/ltq-vdsl-vr11-app/patches/200-autoboot.patch @@ -1,9 +1,13 @@ This enables automatic connection after the control daemon is started, and also changes the way the connection is stopped on termination. -Using the autoboot restart command is necessary because the stop command -would stop the autoboot thread, and the driver offers no working way to -start it again later, short of unloading and reloading the module. +Using the autoboot restart command (in combination with configuring the +state machine to wait) is necessary because the stop command would stop +the autoboot thread, and the driver offers no working way to start it +again later, short of unloading and reloading the module. + +The disconnection code is also moved to a separate function, so it can +be called in other exit code paths than the one for SIGTERM. --- a/src/dsl_cpe_init_cfg.c +++ b/src/dsl_cpe_init_cfg.c @@ -18,18 +22,19 @@ start it again later, short of unloading and reloading the module. DSL_CPE_LINE_ACTIVATE_CTRL_SET(DSL_G997_INHIBIT_LDSF, DSL_G997_INHIBIT_ACSF, DSL_G997_NORMAL_STARTUP), --- a/src/dsl_cpe_control.c +++ b/src/dsl_cpe_control.c -@@ -7338,6 +7338,7 @@ DSL_CPE_STATIC DSL_void_t DSL_CPE_Termi - { - DSL_Error_t nRet = DSL_SUCCESS; - DSL_int_t nDevice = 0; -+ DSL_AutobootConfig_t sAutobootCfg; - DSL_AutobootControl_t sAutobootCtl; - DSL_CPE_Control_Context_t *pCtrlCtx = DSL_NULL; - -@@ -7349,8 +7350,32 @@ DSL_CPE_STATIC DSL_void_t DSL_CPE_Termi +@@ -7252,6 +7252,58 @@ static DSL_boolean_t DSL_CPE_DebugAndTes + #endif /* defined(DSL_DEBUG_TOOL_INTERFACE) || defined(INCLUDE_DSL_CPE_DTI_SUPPORT) */ + #endif /* defined(INCLUDE_DSL_JSON_PARSING) && (INCLUDE_DSL_JSON_PARSING == 1) */ - for (nDevice = 0; nDevice < DSL_CPE_DSL_ENTITIES; ++nDevice) - { ++DSL_CPE_STATIC DSL_void_t DSL_CPE_ShutdownConnection(void) ++{ ++ DSL_Error_t nRet = DSL_SUCCESS; ++ DSL_int_t nDevice = 0; ++ DSL_AutobootConfig_t sAutobootCfg; ++ DSL_AutobootControl_t sAutobootCtl; ++ ++ for (nDevice = 0; nDevice < DSL_CPE_DSL_ENTITIES; ++nDevice) ++ { + g_bWaitBeforeConfigWrite[nDevice] = DSL_TRUE; + g_bWaitBeforeLinkActivation[nDevice] = DSL_TRUE; + g_bWaitBeforeRestart[nDevice] = DSL_TRUE; @@ -54,29 +59,88 @@ start it again later, short of unloading and reloading the module. + DSL_CPE_CRLF, nDevice, sAutobootCfg.accessCtl.nReturn)); + } + - memset(&sAutobootCtl, 0, sizeof(DSL_AutobootControl_t)); -- sAutobootCtl.data.nCommand = DSL_AUTOBOOT_CTRL_STOP; ++ memset(&sAutobootCtl, 0, sizeof(DSL_AutobootControl_t)); + sAutobootCtl.data.nCommand = DSL_AUTOBOOT_CTRL_RESTART; - - nRet = (DSL_Error_t)DSL_CPE_Ioctl( - DSL_CPE_GetGlobalContext()->fd[nDevice], -@@ -7359,13 +7384,13 @@ DSL_CPE_STATIC DSL_void_t DSL_CPE_Termi - if (nRet < DSL_SUCCESS) - { - DSL_CCA_DEBUG(DSL_CCA_DBG_ERR, (DSL_CPE_PREFIX -- "Autoboot stop for device (%d) failed!, nRet = %d!" ++ ++ nRet = (DSL_Error_t)DSL_CPE_Ioctl( ++ DSL_CPE_GetGlobalContext()->fd[nDevice], ++ DSL_FIO_AUTOBOOT_CONTROL_SET, (DSL_int_t)&sAutobootCtl); ++ ++ if (nRet < DSL_SUCCESS) ++ { ++ DSL_CCA_DEBUG(DSL_CCA_DBG_ERR, (DSL_CPE_PREFIX + "Autoboot restart for device (%d) failed!, nRet = %d!" - DSL_CPE_CRLF, nDevice, sAutobootCtl.accessCtl.nReturn)); - } ++ DSL_CPE_CRLF, nDevice, sAutobootCtl.accessCtl.nReturn)); ++ } ++ } ++ ++ DSL_CCA_DEBUG(DSL_CCA_DBG_MSG, (DSL_CPE_PREFIX ++ "Connection shutdown finished." DSL_CPE_CRLF)); ++} ++ + #ifndef RTEMS + /** + Signal handler. +@@ -7327,6 +7379,8 @@ DSL_CPE_STATIC DSL_void_t DSL_CPE_CLI_Q + + DSL_CPE_STATIC DSL_void_t DSL_CPE_Interruption(void) + { ++ DSL_CPE_ShutdownConnection(); ++ + DSL_CPE_DaemonExit(); + + #ifdef INCLUDE_DSL_CPE_CLI_SUPPORT +@@ -7336,37 +7390,16 @@ DSL_CPE_STATIC DSL_void_t DSL_CPE_Inter + + DSL_CPE_STATIC DSL_void_t DSL_CPE_Termination(void) + { +- DSL_Error_t nRet = DSL_SUCCESS; +- DSL_int_t nDevice = 0; +- DSL_AutobootControl_t sAutobootCtl; + DSL_CPE_Control_Context_t *pCtrlCtx = DSL_NULL; + ++ DSL_CPE_ShutdownConnection(); ++ + pCtrlCtx = DSL_CPE_GetGlobalContext(); + if (pCtrlCtx != DSL_NULL) + { + pCtrlCtx->bEvtRun = DSL_FALSE; } - DSL_CCA_DEBUG(DSL_CCA_DBG_MSG, (DSL_CPE_PREFIX +- for (nDevice = 0; nDevice < DSL_CPE_DSL_ENTITIES; ++nDevice) +- { +- memset(&sAutobootCtl, 0, sizeof(DSL_AutobootControl_t)); +- sAutobootCtl.data.nCommand = DSL_AUTOBOOT_CTRL_STOP; +- +- nRet = (DSL_Error_t)DSL_CPE_Ioctl( +- DSL_CPE_GetGlobalContext()->fd[nDevice], +- DSL_FIO_AUTOBOOT_CONTROL_SET, (DSL_int_t)&sAutobootCtl); +- +- if (nRet < DSL_SUCCESS) +- { +- DSL_CCA_DEBUG(DSL_CCA_DBG_ERR, (DSL_CPE_PREFIX +- "Autoboot stop for device (%d) failed!, nRet = %d!" +- DSL_CPE_CRLF, nDevice, sAutobootCtl.accessCtl.nReturn)); +- } +- } +- +- DSL_CCA_DEBUG(DSL_CCA_DBG_MSG, (DSL_CPE_PREFIX - "Autoboot stop executed" DSL_CPE_CRLF)); -+ "Autoboot restart executed" DSL_CPE_CRLF)); - +- DSL_CPE_DaemonExit(); -@@ -8798,4 +8823,4 @@ DSL_CPE_STATIC DSL_Error_t DSL_CPE_Firmw + #ifdef INCLUDE_DSL_CPE_CLI_SUPPORT +@@ -8551,6 +8584,9 @@ void DSL_CPE_main(void) + DSL_CPE_STATIC DSL_Error_t DSL_CPE_Control_Exit (DSL_void_t * pContext) + { + dummy_console_t *pConsole = pContext; ++ ++ DSL_CPE_ShutdownConnection(); ++ + pConsole->bRun = DSL_FALSE; + return DSL_SUCCESS; + } +@@ -8798,4 +8834,4 @@ DSL_CPE_STATIC DSL_Error_t DSL_CPE_Firmw pDecimal)); return nErrCode; diff --git a/package/network/config/ltq-vdsl-vr11-app/patches/300-ubus.patch b/package/network/config/ltq-vdsl-vr11-app/patches/300-ubus.patch index fc0dd70bc1b7..1fe1eac1e8ab 100644 --- a/package/network/config/ltq-vdsl-vr11-app/patches/300-ubus.patch +++ b/package/network/config/ltq-vdsl-vr11-app/patches/300-ubus.patch @@ -10,7 +10,7 @@ DSL_char_t *g_sFirmwareName1 = DSL_NULL; DSL_FirmwareFeatures_t g_nFwFeatures1 = {DSL_FW_XDSLMODE_CLEANED, DSL_FW_XDSLFEATURE_CLEANED, DSL_FW_XDSLFEATURE_CLEANED}; -@@ -7831,6 +7834,8 @@ DSL_int_t dsl_cpe_daemon ( +@@ -7839,6 +7842,8 @@ DSL_int_t dsl_cpe_daemon ( #endif /* defined(INCLUDE_DSL_JSON_PARSING) && (INCLUDE_DSL_JSON_PARSING == 1) */ #endif /* RTEMS*/ @@ -19,7 +19,7 @@ /* Open DSL_CPE_MAX_DSL_ENTITIES devices*/ for (nDevice = 0; nDevice < DSL_CPE_DSL_ENTITIES; nDevice++) { -@@ -8367,6 +8372,7 @@ DSL_int_t dsl_cpe_daemon ( +@@ -8375,6 +8380,7 @@ DSL_int_t dsl_cpe_daemon ( #endif /* INCLUDE_DSL_CPE_CLI_SUPPORT */ DSL_CPE_CONTROL_EXIT: From patchwork Fri Jul 12 13:49:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Hoffmann X-Patchwork-Id: 1959915 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=Q8y1UrIt; 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=d2qRuhd7; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WLF1D5yBBz20MX for ; Sat, 13 Jul 2024 00:52:00 +1000 (AEST) 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=O4fbg5Nf6OMpvVr8kL8ghvqxjpKe2FkcR4CDMIvCNBw=; b=Q8y1UrItnf3L4x ToYGge1Ut031ec74NYQRi+kL4iKa5SMVbiOnFrtm2wHQPrHtvcNfNtpw9ccCSq7FiFxyySY27XAkf 6xpZl/4ro7zvHdma9mk3ori27lGR258qRY9ZgdPjZ+CuHBvUnq+sH4vx0RPkMP8O0pI9txf1SlucW VIWBV4G4YsFFmJ51EhZ09g0qkhpe09l1zFOzvAzccwovsiEeUJ2z0EpkQkemYK9bYP5+OSizvDBtd +BuXLDtZlu1XcfhHjp7fIkpHp8PU/h+x+BsgmP3NswGbclCguAdSPBTuh3kUwPKtaZEy58iDIdJ6c 9sEpXnUQHPf1jMAinFmA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sSHbY-00000000O1d-31Kl; Fri, 12 Jul 2024 14:50:36 +0000 Received: from srv5.3e8.eu ([2a03:4000:28:8d0::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sSHbV-00000000Nzl-48of for openwrt-devel@lists.openwrt.org; Fri, 12 Jul 2024 14:50:35 +0000 Received: from localhost.localdomain (p200300c6cf02cba0ae21e636d180025d.dip0.t-ipconnect.de [IPv6:2003:c6:cf02:cba0:ae21:e636:d180:25d]) (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 srv5.3e8.eu (Postfix) with ESMTPSA id B0868120B77; Fri, 12 Jul 2024 16:49:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=3e8.eu; s=mail20211217; t=1720795773; 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=tOkgA4J+YeguPaUXN2hKy/mrQ3OV6E7bzRxQDGY1jU4=; b=d2qRuhd7QnTyT+/sRTzLVfntYE+aMXgW4KNRgyj220FIAJy8bdbeDD60qo1U2KJI7j1Dqo JiXLmOpkJmCLazCMp0hCM1lZvHCJZtdv5ClpWOCois/YGM7kRguUOlAfLSAxUBTZ37rQOZ 1z0VgNk9E+UskkrvnbD8Z313ISA4C+rBpzZlQvMAu5YNuZVMYOiGsoyr15BmiESTRtXffi WjMq0TFHH3euuRhj1w0hy7Z2OK7Lb5UkMqNzqmwi23zBQAykZeZWW4zi5AR00lRx4fa9TP G560a1ozQ9BuAOdRa7HoUDcMrcplzaiAwSwL359bnY8S7zL+cyIPmbtwuvK/IQ== From: Jan Hoffmann To: openwrt-devel@lists.openwrt.org Cc: Jan Hoffmann Subject: [PATCH 5/5] ltq-vdsl-vr11-app: perform orderly shutdown on exit Date: Fri, 12 Jul 2024 15:49:53 +0200 Message-ID: <20240712144801.1192493-6-jan@3e8.eu> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240712144801.1192493-1-jan@3e8.eu> References: <20240712144801.1192493-1-jan@3e8.eu> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240712_075034_223869_E018A5E7 X-CRM114-Status: GOOD ( 16.49 ) X-Spam-Score: -2.1 (--) 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: Try to do a clean disconnection via L3 request before the connection is stopped. Because this might take up to 6 seconds (the driver does 3 attempts with a timeout of 2 seconds each), a termination timeout needs to be defined in the init script. Content analysis details: (-2.1 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_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 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 Try to do a clean disconnection via L3 request before the connection is stopped. Because this might take up to 6 seconds (the driver does 3 attempts with a timeout of 2 seconds each), a termination timeout needs to be defined in the init script. Signed-off-by: Jan Hoffmann --- .../network/config/ltq-vdsl-vr11-app/Makefile | 2 +- .../ltq-vdsl-vr11-app/files/dsl_control | 1 + .../patches/201-orderly-shutdown.patch | 73 +++++++++++++++++++ .../ltq-vdsl-vr11-app/patches/300-ubus.patch | 4 +- 4 files changed, 77 insertions(+), 3 deletions(-) create mode 100644 package/network/config/ltq-vdsl-vr11-app/patches/201-orderly-shutdown.patch diff --git a/package/network/config/ltq-vdsl-vr11-app/Makefile b/package/network/config/ltq-vdsl-vr11-app/Makefile index e56e90f99642..f1782db285c0 100644 --- a/package/network/config/ltq-vdsl-vr11-app/Makefile +++ b/package/network/config/ltq-vdsl-vr11-app/Makefile @@ -9,7 +9,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=ltq-vdsl-vr11-app PKG_VERSION:=4.23.1 -PKG_RELEASE:=4 +PKG_RELEASE:=5 PKG_BASE_NAME:=dsl_cpe_control UGW_VERSION=8.5.2.10 diff --git a/package/network/config/ltq-vdsl-vr11-app/files/dsl_control b/package/network/config/ltq-vdsl-vr11-app/files/dsl_control index d960a7726181..8d85cfd5fb40 100644 --- a/package/network/config/ltq-vdsl-vr11-app/files/dsl_control +++ b/package/network/config/ltq-vdsl-vr11-app/files/dsl_control @@ -254,6 +254,7 @@ start_service() { ${mode} \ ${tc_layer} \ $autoboot + procd_set_param term_timeout 10 procd_close_instance } diff --git a/package/network/config/ltq-vdsl-vr11-app/patches/201-orderly-shutdown.patch b/package/network/config/ltq-vdsl-vr11-app/patches/201-orderly-shutdown.patch new file mode 100644 index 000000000000..eabeaaedcb9a --- /dev/null +++ b/package/network/config/ltq-vdsl-vr11-app/patches/201-orderly-shutdown.patch @@ -0,0 +1,73 @@ +Try to perform an orderly shutdown via L3 request before the connection +is stopped on exit. + +--- a/src/dsl_cpe_control.c ++++ b/src/dsl_cpe_control.c +@@ -7252,15 +7252,58 @@ static DSL_boolean_t DSL_CPE_DebugAndTes + #endif /* defined(DSL_DEBUG_TOOL_INTERFACE) || defined(INCLUDE_DSL_CPE_DTI_SUPPORT) */ + #endif /* defined(INCLUDE_DSL_JSON_PARSING) && (INCLUDE_DSL_JSON_PARSING == 1) */ + ++DSL_CPE_STATIC DSL_void_t DSL_CPE_EnableConnection(void) ++{ ++ DSL_Error_t nRet = DSL_SUCCESS; ++ DSL_int_t nDevice = 0; ++ DSL_G997_PowerManagementStateForcedTrigger_t sPowerManagementStateForcedTrigger; ++ ++ for (nDevice = 0; nDevice < DSL_CPE_DSL_ENTITIES; ++nDevice) ++ { ++ memset(&sPowerManagementStateForcedTrigger, 0x0, ++ sizeof(DSL_G997_PowerManagementStateForcedTrigger_t)); ++ sPowerManagementStateForcedTrigger.data.nPowerManagementState = DSL_G997_PMSF_L3_TO_L0; ++ ++ nRet = (DSL_Error_t)DSL_CPE_Ioctl( ++ DSL_CPE_GetGlobalContext()->fd[nDevice], ++ DSL_FIO_G997_POWER_MANAGEMENT_STATE_FORCED_TRIGGER, ++ (DSL_int_t)&sPowerManagementStateForcedTrigger); ++ ++ if (nRet < DSL_SUCCESS) ++ { ++ DSL_CCA_DEBUG(DSL_CCA_DBG_ERR, (DSL_CPE_PREFIX ++ "Transition to L0 state (%d) failed!, nRet = %d!" ++ DSL_CPE_CRLF, nDevice, sPowerManagementStateForcedTrigger.accessCtl.nReturn)); ++ } ++ } ++} ++ + DSL_CPE_STATIC DSL_void_t DSL_CPE_ShutdownConnection(void) + { + DSL_Error_t nRet = DSL_SUCCESS; + DSL_int_t nDevice = 0; ++ DSL_G997_PowerManagementStateForcedTrigger_t sPowerManagementStateForcedTrigger; + DSL_AutobootConfig_t sAutobootCfg; + DSL_AutobootControl_t sAutobootCtl; + + for (nDevice = 0; nDevice < DSL_CPE_DSL_ENTITIES; ++nDevice) + { ++ memset(&sPowerManagementStateForcedTrigger, 0x0, ++ sizeof(DSL_G997_PowerManagementStateForcedTrigger_t)); ++ sPowerManagementStateForcedTrigger.data.nPowerManagementState = DSL_G997_PMSF_LX_TO_L3; ++ ++ nRet = (DSL_Error_t)DSL_CPE_Ioctl( ++ DSL_CPE_GetGlobalContext()->fd[nDevice], ++ DSL_FIO_G997_POWER_MANAGEMENT_STATE_FORCED_TRIGGER, ++ (DSL_int_t)&sPowerManagementStateForcedTrigger); ++ ++ if (nRet < DSL_SUCCESS) ++ { ++ DSL_CCA_DEBUG(DSL_CCA_DBG_ERR, (DSL_CPE_PREFIX ++ "Transition to L3 state (%d) failed!, nRet = %d!" ++ DSL_CPE_CRLF, nDevice, sPowerManagementStateForcedTrigger.accessCtl.nReturn)); ++ } ++ + g_bWaitBeforeConfigWrite[nDevice] = DSL_TRUE; + g_bWaitBeforeLinkActivation[nDevice] = DSL_TRUE; + g_bWaitBeforeRestart[nDevice] = DSL_TRUE; +@@ -8318,6 +8361,8 @@ DSL_int_t dsl_cpe_daemon ( + #endif /* defined(INCLUDE_DSL_JSON_PARSING) && (INCLUDE_DSL_JSON_PARSING == 1) */ + } + ++ DSL_CPE_EnableConnection(); ++ + #ifdef INCLUDE_DSL_CPE_CLI_SUPPORT + #ifndef DSL_CPE_REMOVE_PIPE_SUPPORT + if (DSL_CPE_Pipe_Init (pCtrlCtx) == DSL_ERROR) diff --git a/package/network/config/ltq-vdsl-vr11-app/patches/300-ubus.patch b/package/network/config/ltq-vdsl-vr11-app/patches/300-ubus.patch index 1fe1eac1e8ab..0f2007cdbac9 100644 --- a/package/network/config/ltq-vdsl-vr11-app/patches/300-ubus.patch +++ b/package/network/config/ltq-vdsl-vr11-app/patches/300-ubus.patch @@ -10,7 +10,7 @@ DSL_char_t *g_sFirmwareName1 = DSL_NULL; DSL_FirmwareFeatures_t g_nFwFeatures1 = {DSL_FW_XDSLMODE_CLEANED, DSL_FW_XDSLFEATURE_CLEANED, DSL_FW_XDSLFEATURE_CLEANED}; -@@ -7839,6 +7842,8 @@ DSL_int_t dsl_cpe_daemon ( +@@ -7882,6 +7885,8 @@ DSL_int_t dsl_cpe_daemon ( #endif /* defined(INCLUDE_DSL_JSON_PARSING) && (INCLUDE_DSL_JSON_PARSING == 1) */ #endif /* RTEMS*/ @@ -19,7 +19,7 @@ /* Open DSL_CPE_MAX_DSL_ENTITIES devices*/ for (nDevice = 0; nDevice < DSL_CPE_DSL_ENTITIES; nDevice++) { -@@ -8375,6 +8380,7 @@ DSL_int_t dsl_cpe_daemon ( +@@ -8420,6 +8425,7 @@ DSL_int_t dsl_cpe_daemon ( #endif /* INCLUDE_DSL_CPE_CLI_SUPPORT */ DSL_CPE_CONTROL_EXIT: