From patchwork Sun Jan 12 01:02:17 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Ryazanov X-Patchwork-Id: 2033236 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=AQdCVBE9; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=XP+Ufah1; 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 4YVxwj1dMJz1yPD for ; Sun, 12 Jan 2025 12:03:49 +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=6Bat/q6a/UfXsY8u4Vx7o+rYKg1jQp2ZUEekwwSrQE0=; b=AQdCVBE9dGp/s+ 53eI0SVjN/JACgN4TbRzaYOIt2THNdwL85hA/VSe3fMQkSzWFi8eDyJ/gpI/yFSMx/axrswmsq2c5 fziqgH+WZJY5gqCOgnQ69TavBRPJ8EZUnzqwhi3b3ftT7PNHECMSgGxx3qWm5ngxQ9IcQpXhk2bsj V+V9xN7yg/PhoAN4Ob7GS4rM1NApluWfGF+PJROnBp18TA8Aks7qK5WbPVRp6XOR5+hX+x6rasLIK aa9mg2cq/uEjP7TyGBtUonisfe+6np/2DJ7t3mgY7+m+0a8y2V8Qin2BHR5enBqJuhkr3nrTwbvcs WnhjXW7PPSlAXjHt3/iQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tWmNC-00000001oY9-028y; Sun, 12 Jan 2025 01:02:38 +0000 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tWmN9-00000001oX1-20i2 for openwrt-devel@lists.openwrt.org; Sun, 12 Jan 2025 01:02:36 +0000 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-385e27c75f4so2259984f8f.2 for ; Sat, 11 Jan 2025 17:02:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736643754; x=1737248554; darn=lists.openwrt.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PENSizWca+AV6fo4xU1eGOCnSEWWUUPX60DrTfBOlHE=; b=XP+Ufah1WWh0ayybFnMoAVU8GgCpXQXr1FGCVi2g33fAGwnjKejBsJVzOEpZNliQKJ LQWyd9BEbLTUO5Y7WJES+ojl7RufxOxsrQe7h2U5OP1C1w4fAYojcx1OTWZloIWc/lz8 rVvP8ltU1qwBq2nS4nZ5PZF3uTVKHei718QkQ82ORLWKj6SY3RLdUI0X5a8Q5A6VwhU8 kJlyac3fu9lOODhwh5Y8tRDKLxm7IpdQ2Hsr7FXtuFw8Oah3Pra9Wa7Qw7ucDLr6yyfE 0uy5SSGxrtD+0Ny4Hk4+B+9q7oXeZwjQPGxo9bzDy3yOL0mSI3busZSRkNGGyM4ap5At cP6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736643754; x=1737248554; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PENSizWca+AV6fo4xU1eGOCnSEWWUUPX60DrTfBOlHE=; b=A8g0HRhUuNPPFL6Y65T7OH8npy47ekLGZ5rcu2QFfdfTcgmb7NsFoqKiUceVjc6A38 uh7LTKCMPd0ODYXdx1QTzyfbSKHISnSdNkVuyh0hv+Pxjxqd05eQa3tEpHryXnwRQeHD WVOadZ+usASG/Cef2xBorlCes13ITqMDb0WziSpID9/t363T8S9Th6Vt+vodAj30RELM F/JOLw8TzR5NILEUH+6dOLPVg1W3gMHF4HlK7AfRBCqRAIx2g96ZuIPETrRPvopI07qL FeTBAlgAw3ZCPiDBcOHl2EKdGViFNsqT/3tSCim/B4pHxKrIrsGowzvmJNT634RLZSzY wyuQ== X-Gm-Message-State: AOJu0YxcBstB83Fu4r4J8DxdY5SeNB/7KUJvSXnIUh/rEEUtE5jq/uiX tyuNv3KfRbfDiIUsEepYKT+Ly6Nvs35rs7osermPaEdB4pg3jKGdhE4y0A== X-Gm-Gg: ASbGncsVW5KSMn1fokc1dvZimPGi19ZqeYwk+20TLW/3NiZ1OL7g8Dyqj9c6z81pT8H 7irhxDh6QxQi9K5/CDMnYRBOfr9qTLMlqxemMZCaLEZ9z+vuk/ESiE/hShx0KkCP8YAOgtVWpUE Tb9GG8cdmJWdubh+ek409UINDaS6DwfvlN2bKL0jaidpP6QXSmNZXpyF3tggup/bXi9LNu2S1Ac lren2sux2ePtGoFAfxqDXyAJBFCIie165ERe6F283gyM2lW4Shg/F1Y+iNJnMBqRCzd X-Google-Smtp-Source: AGHT+IEdjMCy4rtiQefyjzIrW+5KsIB3t+FIb2DE602kdx71pOj1VaUsXGd5SuQAL1qU30yo0DFyPA== X-Received: by 2002:adf:b1db:0:b0:38a:2658:bbc7 with SMTP id ffacd0b85a97d-38a8730cef4mr9369615f8f.29.1736643753659; Sat, 11 Jan 2025 17:02:33 -0800 (PST) Received: from localhost.localdomain ([69.6.8.124]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436e9d8fb99sm97996305e9.3.2025.01.11.17.02.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Jan 2025 17:02:33 -0800 (PST) From: Sergey Ryazanov To: Daniel Golle Cc: OpenWrt Development List , Andre Heider , Jan Hoffmann , Martin Schiller Subject: [PATCH v2 1/4] kernel: vrx518_tc: fix RX desc phys to virt mapping Date: Sun, 12 Jan 2025 03:02:17 +0200 Message-ID: <20250112010220.21317-2-ryazanov.s.a@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250112010220.21317-1-ryazanov.s.a@gmail.com> References: <20250112010220.21317-1-ryazanov.s.a@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250111_170235_544261_F6976436 X-CRM114-Status: GOOD ( 16.18 ) X-Spam-Score: -1.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: It looks like VRX518 returns phys addr of data buffer in the 'data_ptr' field of the RX descriptor and an actual data offset within the buffer in the 'byte_off' field. In order to map the phys address [...] Content analysis details: (-1.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:42c listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender 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_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 -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [ryazanov.s.a(at)gmail.com] 1.0 FREEMAIL_REPLY From and body contain different freemails 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 It looks like VRX518 returns phys addr of data buffer in the 'data_ptr' field of the RX descriptor and an actual data offset within the buffer in the 'byte_off' field. In order to map the phys address back to virtual we need the original phys address of the allocated buffer. In the same driver applies offset to phys address before the mapping, what leads to WARN_ON triggering in plat_mem_virt() function with subsequent kernel panic: WARNING: CPU: 0 PID: 0 at .../sw_plat.c:764 0xbf306cd0 [vrx518_tc@8af9f5d0+0x25000] ... Unable to handle kernel NULL pointer dereference at virtual address 00000000 pgd = aff5701e [00000000] *pgd=00000000 Internal error: Oops: 5 [#1] SMP ARM Noticed in ATM mode, when chip always returns byte_off = 4. In order to fix the issue, pass the phys address to plat_mem_virt() as is and apply byte_off later on mapped virtual address when copying RXed data into the skb. Run tested with FRITZ!Box 7530 on both ADSL and VDSL (thanks Jan) links. Fixes: 474bbe23b7 ("kernel: add Intel/Lantiq VRX518 TC driver") Tested-by: Jan Hoffmann # VDSL link Reported-and-tested-by: nebibigon93@yandex.ru # ADSL link Signed-off-by: Sergey Ryazanov --- package/kernel/lantiq/vrx518_tc/patches/200-swplat.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/kernel/lantiq/vrx518_tc/patches/200-swplat.patch b/package/kernel/lantiq/vrx518_tc/patches/200-swplat.patch index edc97998b7..0d97ec4d5f 100644 --- a/package/kernel/lantiq/vrx518_tc/patches/200-swplat.patch +++ b/package/kernel/lantiq/vrx518_tc/patches/200-swplat.patch @@ -855,7 +855,7 @@ This replaces it by a basic working implementation. - continue; + + // this seems to be a pointer to a DS PKT buffer -+ phyaddr = desc->data_ptr + desc->byte_off; ++ phyaddr = desc->data_ptr; + ptr = plat_mem_virt(phyaddr); + + len = desc->data_len; @@ -871,7 +871,7 @@ This replaces it by a basic working implementation. - ring_idx_inc(rxout, idx); + + dst = skb_put(skb, len); -+ memcpy(dst, ptr, len); ++ memcpy(dst, ptr + desc->byte_off, len); + + priv->tc_ops.recv(g_plat_priv->netdev, skb); + From patchwork Sun Jan 12 01:02:18 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Ryazanov X-Patchwork-Id: 2033235 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=G606JcT8; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=OmK0Q4Oo; 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 4YVxwg5mnrz1yPD for ; Sun, 12 Jan 2025 12:03:47 +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=hUVDjJ6tVklurCtWriG17hPaT+Jq13ibGOPUIqgphQ4=; b=G606JcT8TwmLdR o1BBFiqOoQNTv/G1DREEdUL4UwVYGClzaUwNfKdl04HT6MkNV8ui1QmKvpjq3iHiJs+gfFFIzoBvE ory6yEJyyaydjTRe4OS9K4SB5NVzu4IQQ7z5ZZqLjbA8A+XXpynShOCQJ4xK+LTIfe8Jlu6Ebjd/u sJJ/6aVAhZw2VMtwyzhSfmY5Gqs2iZcp00+ZV9IwzMQRkAjIsL2RDkfeFX+J/lhTfpnjx57vGabfy VlZhMFo65bUs3EVS5byez361zyA19Pa57oHNR+fFHrRvnToA+Ryg1q6Kqq9d8EqIWBL/jCnKvq7B5 0pglOfb49R10msafSgKQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tWmNF-00000001oaQ-0Rxq; Sun, 12 Jan 2025 01:02:41 +0000 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tWmNA-00000001oXf-3hBv for openwrt-devel@lists.openwrt.org; Sun, 12 Jan 2025 01:02:39 +0000 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-385ddcfc97bso2748955f8f.1 for ; Sat, 11 Jan 2025 17:02:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736643755; x=1737248555; darn=lists.openwrt.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4CGIX+1yjTWIBnKwZ2y5X/bgTwnEo140X9euQCutdUE=; b=OmK0Q4OoDMhfwfC7mt7b2kX5k5c5mnfnsWo3K2ST/s+T2SfVJlY1XL6H8VdJaGLWDn G5511On3Q6mOvMf/V+1BYPHRe3gm4zGCknLMWqe3PI00TWByHz5QkB/zelCX0IoKvtUA ALCvsszVsdXu/7h3jLqO/ELQB0RN5GBv/DAkH5UHnNdNsdPj3gjE1TAIx5GRMDcPUEUH PQo5POPUtYAeAb1XE2vPadF5DF84wh+LAt1i2gEWQgER8dQMyunVJ058l3KFml4u3NDi hLSLKG1eHCtgFKwdGFFS56rSnJCSx3lx9bvLQrAryBUUNpRohWkX4QFgqS+fb4AYN1Og 9Vzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736643755; x=1737248555; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4CGIX+1yjTWIBnKwZ2y5X/bgTwnEo140X9euQCutdUE=; b=kQk/p9CJUoA2RzIB7+vHDSIn3riuBChaC0xZsH28vv7iRQpHRqG1kLPb4LniN7ROw+ 4oR1xdWholf71Q0zsmSJNiNp11ph5Mjh+OAt/U2BIwiugiRfDEFrvgvcXvK6C70V8Kjb vKzxYccLAoyTS4hUas3xCu9YzRyrF8ijaJjQyYRbIqQKmdjnR7kKpdaxrA28ruDZFW6i KijGnAES3xfmoX6rraKanUloDvljenHidlzx6ZjCL4AmQqe4LKuRGAPYnf0fc0EyWmUO DZnCCJvnyBlAkNriHyGDGfRgvzlJwR3x6WVfYRVAFXsu+J/gfzBsvAusNPJjVqiFsQIz DY4A== X-Gm-Message-State: AOJu0Yyb/PqhB1nCd2PRKYvgSkk4gESa+88Te7t2nPb9axlWxDCAsNYu M5Y6IXi2iCbcMv3jmxOuU9HpDTKiZJKnTlzIIvCXRtEYnquCCC/1 X-Gm-Gg: ASbGncv64ZvMeJg1VxBr/LoYk8wuT5U1PpUyyWZNqpwtLzC6Mbh+vDWji5qkD2iCQG/ XUpWC5MlT/E51t7z+NvvQNu8MyliI9mqFH78UNSokwFoa6X8ZkJM3jFQXl94+nahfbEROscRFM0 S6cl8bEpMsUM6R29EbxEAJYjVO6abUUjpKy+pU4ORVV6qsyq9GPEcNeI+xSqHU1cE/wCI4Ifoqo BvzXKlAnvVj793YZ9YytyVGZKdFLbhQ4t87lpeSvxagkm1Ookt/diDy2J4/KMkwHNPT X-Google-Smtp-Source: AGHT+IGtYi20L52jbeInht+PYL8/JOReFLkA+ZYfaFPrQtWT1z8SeEHMqTEWv6V5JoVkWNPtrQ2/tA== X-Received: by 2002:a5d:598d:0:b0:38a:624b:e7fe with SMTP id ffacd0b85a97d-38a872d121bmr13446110f8f.7.1736643755119; Sat, 11 Jan 2025 17:02:35 -0800 (PST) Received: from localhost.localdomain ([69.6.8.124]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436e9d8fb99sm97996305e9.3.2025.01.11.17.02.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Jan 2025 17:02:34 -0800 (PST) From: Sergey Ryazanov To: Daniel Golle Cc: OpenWrt Development List , Andre Heider , Jan Hoffmann , Martin Schiller Subject: [PATCH v2 2/4] kernel: vrx518_tc: fix ADSL/ATM operation Date: Sun, 12 Jan 2025 03:02:18 +0200 Message-ID: <20250112010220.21317-3-ryazanov.s.a@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250112010220.21317-1-ryazanov.s.a@gmail.com> References: <20250112010220.21317-1-ryazanov.s.a@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250111_170236_911252_E5E41FEF X-CRM114-Status: GOOD ( 19.28 ) X-Spam-Score: -1.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: ATM TC layer have some issues which effectively prevent VRX518 from being used as ADSL modem. Specifically, there one crash during the ATM layer configuration and wrong PVC ID selection on packet rece [...] Content analysis details: (-1.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:435 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender 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_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 -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [ryazanov.s.a(at)gmail.com] 1.0 FREEMAIL_REPLY From and body contain different freemails 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 ATM TC layer have some issues which effectively prevent VRX518 from being used as ADSL modem. Specifically, there one crash during the ATM layer configuration and wrong PVC ID selection on packet receiving what breaks RX path. Fix both of the issues. Make subif iface registration optional to prevent the crash (see more details in the new patch) and update the hardcoded PVC ID to match the first allocated channel. Run tested with FRITZ!Box 7530. Fixes: 474bbe23b7 ("kernel: add Intel/Lantiq VRX518 TC driver") Reported-and-tested-by: nebibigon93@yandex.ru Signed-off-by: Sergey Ryazanov --- .../lantiq/vrx518_tc/patches/100-compat.patch | 2 +- ...tm_tc-fix-crash-on-subif_reg-absence.patch | 75 +++++++++++++++++++ 2 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 package/kernel/lantiq/vrx518_tc/patches/207-dcdp-atm_tc-fix-crash-on-subif_reg-absence.patch diff --git a/package/kernel/lantiq/vrx518_tc/patches/100-compat.patch b/package/kernel/lantiq/vrx518_tc/patches/100-compat.patch index d04c1ed5df..81e32369ba 100644 --- a/package/kernel/lantiq/vrx518_tc/patches/100-compat.patch +++ b/package/kernel/lantiq/vrx518_tc/patches/100-compat.patch @@ -166,7 +166,7 @@ - return (skb->DW0 >> 3) & 0xF; +// return (skb->DW0 >> 3) & 0xF; -+ return 1; ++ return 0; /* We use only one connection for now, so return the first connection id */ } static int atm_get_qid_by_vcc(struct net_device *dev, struct sk_buff *skb, diff --git a/package/kernel/lantiq/vrx518_tc/patches/207-dcdp-atm_tc-fix-crash-on-subif_reg-absence.patch b/package/kernel/lantiq/vrx518_tc/patches/207-dcdp-atm_tc-fix-crash-on-subif_reg-absence.patch new file mode 100644 index 0000000000..87456424c3 --- /dev/null +++ b/package/kernel/lantiq/vrx518_tc/patches/207-dcdp-atm_tc-fix-crash-on-subif_reg-absence.patch @@ -0,0 +1,75 @@ +From: Sergey Ryazanov +Date: Fri, 10 Jan 2025 00:57:27 +0000 +Subject: [PATCH] vrx518_tc: atm_tc: fix crash on subif_reg absence + +VRX518 (sw_plat) platform does not provid the subif_reg/subif_unreg ops +in the same time ATM TC layer unconditionally calls them, what leads to +the kernel crash on the atm_hook_mpoa_setup hook invocation from the ATM +stack: + + vrx518_tc:mpoa_setup_sync : sync: conn: 0, vpi: 0, vci: 35, mpoa_type: 0, mpoa_mode: 0 + Unable to handle kernel NULL pointer dereference at virtual address 00000000 + +Subif registration is optional and PTM TC do this only when the +corresponding ops are defined. Do the same for ATM TC and call +subif_reg/subif_unreg only if they are not NULL. + +While at it, move subif related data preparation under the 'if' block +in order to group and isolate that aux code. + +Run tested with FRITZ!Box 7530. + +Signed-off-by: Sergey Ryazanov +--- +--- a/dcdp/atm_tc.c ++++ b/dcdp/atm_tc.c +@@ -1232,8 +1232,9 @@ static void ppe_close(struct atm_vcc *vc + validate_oam_htu_entry(priv, 0); + spin_unlock_bh(&priv->atm_lock); + +- priv->tc_priv->tc_ops.subif_unreg(dev, (!dev) ? dev_name : dev->name, +- priv->conn[cid].subif_id, 0); ++ if (priv->tc_priv->tc_ops.subif_unreg) ++ priv->tc_priv->tc_ops.subif_unreg(dev, (!dev) ? dev_name : dev->name, ++ priv->conn[cid].subif_id, 0); + + memset(conn, 0, sizeof(*conn)); + +@@ -2791,24 +2792,26 @@ static void mpoa_setup_sync(struct atm_p + struct wtx_queue_config_t tx_qcfg; + struct uni_cell_header *cell_header; + struct atm_vcc *vcc; +- struct net_device *dev; +- char dev_name[32]; + + tc_dbg(priv->tc_priv, MSG_INIT, + "sync: conn: %d, vpi: %d, vci: %d, mpoa_type: %d, mpoa_mode: %d\n", + conn, priv->conn[conn].vcc->vpi, priv->conn[conn].vcc->vci, + priv->conn[conn].mpoa_type, priv->conn[conn].mpoa_mode); + +- dev = priv->conn[conn].dev; ++ if (priv->tc_priv->tc_ops.subif_reg) { ++ struct net_device *dev; ++ char dev_name[32]; ++ ++ dev = priv->conn[conn].dev; ++ if (!dev) ++ sprintf(dev_name, "atm_%d%d", ++ priv->conn[conn].vcc->vpi, priv->conn[conn].vcc->vci); + +- if (!dev) +- sprintf(dev_name, "atm_%d%d", +- priv->conn[conn].vcc->vpi, priv->conn[conn].vcc->vci); +- +- priv->tc_priv->tc_ops.subif_reg(dev, (!dev) ? dev_name : dev->name, +- &priv->conn[conn].subif_id, 0); +- tc_dbg(priv->tc_priv, MSG_INIT, +- "conn[%d]subif_id[%x]", conn, priv->conn[conn].subif_id); ++ priv->tc_priv->tc_ops.subif_reg(dev, !dev ? dev_name : dev->name, ++ &priv->conn[conn].subif_id, 0); ++ tc_dbg(priv->tc_priv, MSG_INIT, ++ "conn[%d]subif_id[%x]", conn, priv->conn[conn].subif_id); ++ } + vcc = priv->conn[conn].vcc; + + /* set htu entry */ From patchwork Sun Jan 12 01:02:19 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Ryazanov X-Patchwork-Id: 2033237 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=TURMWX+K; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=VqtMLUoR; 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 4YVxwr1sKPz1yPD for ; Sun, 12 Jan 2025 12:03:56 +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=8gNZquxk6zQtrI3qdQnLHz+jEWUenupByIkvIiYFGrM=; b=TURMWX+KiB4xYL ujNoKXKeB1iY3kiikr7DySybFRfHZtTlzSIR6tJPMhpZPcQlHv3th6clzdsgCnJhI+5dtr8WV2IOp TlotmEdQUZPwrEKmYCTuCg5GfyEnFaQVmtitmTcFp9xiNKHB1NVNseFJCT5X64DZdz9DRbtsqzezg TndmZd+LBTZbzPVbdGl3lMNWMnMcUJ6SHeVw3ZVC5ux2JcDH26FrP4U64hV9/4HRf8OI1T2Gfde+n jjSUeJ+9BffTa0IRSDaIVhgaGMBsOWs/yOVJW2P2f+tsiKLlQmF0gW1XScaMghM3haaQRbDVN7wte G023CFjwCyjUC96+RKoA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tWmNG-00000001oax-13tT; Sun, 12 Jan 2025 01:02:42 +0000 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tWmND-00000001oYK-18aF for openwrt-devel@lists.openwrt.org; Sun, 12 Jan 2025 01:02:40 +0000 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-385d7b4da2bso2749494f8f.1 for ; Sat, 11 Jan 2025 17:02:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736643758; x=1737248558; darn=lists.openwrt.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hj2Mc36Jcl/0A+c7e/NSWpTjyKSMGOK2ZlJxHi9XOKI=; b=VqtMLUoRcCEGTJ630cTEggfvq1xJIobJpuiLXckUmpQLDoXZVqELERJsqM+xkTWjeR xbUy26a9fJHoVVScDYg/roav/21VKcIBxM+aZNQ3qt6aK/0wOG2EFmLzGBiV772D98YW xT7+qTtpJ2Dz/1IMAbeh0f93CjOcDUD5ycXdlkjG49smsZCWS3jytMoMLdpm5+HKPWZY CmRCSLjd/JbmK/RzWsdQlOez2rPz1EXvA87A4C7vFT+1NjDTRJ2ujIEs4h5P5FkTOwF2 F9Fk64NvsxTEnIVXEmOXj+0iXaaPS9qQuvpAUW218C6bn+o9RCOIPUZumV0q28B6rbcF Madw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736643758; x=1737248558; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hj2Mc36Jcl/0A+c7e/NSWpTjyKSMGOK2ZlJxHi9XOKI=; b=Ptf49iS8aDpdXcN2iAjpvO/g521/mLskScKqjbmBVkHPST2tajpEPoFXzjHBca6sDQ LLLXVYnoIVL5e1TRfotP7WmDgn8HX/C7+T3VCSE6ojq9cNiIWXNIyHzXtoSPBjTT/wLP eyhNjjL9qel5Ce6lbO2rXgldu/lRt/V5juO+lX8iowi5J72xhCdrEpl9f3KXUnRKCT/B DP7jsTOXoXnoA+OR9KyxgDWhvLJNmxGlbRHfhk/qgmRDNzoBioOfkec7cXk9n8wGENLU LAE6kqN3y9lpKcv2nsN5XYJwdf3FBXnhzYa30Sw3oHYJ+MS3p7/9cBfJ5i15pBb26RUW pDWw== X-Gm-Message-State: AOJu0YwVOy1k/PWu2LZZ2oHpUIswjZCYedRiLFflhX9ECeNnqq6K96Ye D0ZgjPco9JZMZMeC0FagXi8xvQmHdYUdCbKcLN1Ss3uuCVRSuMP8ewJEFA== X-Gm-Gg: ASbGncslh+3M6sEHaBiSZplEs18ba6g6CQGuEtKQSKGDiCmuHzw3o6Oy9ikRHJjjDbm deFVy42QiFiUwH+0qq1cLhNY2bv55PTAu/P5uSRbX6e2XZYwIffTaGO9yHYYTxKLYZVbCRBxJf2 wNTFa4ESQTMDnzeRj0VhsYwhr67F6A52mkkXPDukL2Lx6r18WxuUfbe0XIumB9vOAoAK/OaJdyL aSPF4AnFV3H+FpRzJFqPMC2DWIqEsqy8ljH6PC2oUD7WWIfsnnQ5R7PuzCM43jDnKX1 X-Google-Smtp-Source: AGHT+IF3YwNC8hOAimS3l5glBvqTVlK5DJD0L6s/64cgxiIA2emJj0Hxfx0rWmhtGJF5BkxowACH3g== X-Received: by 2002:a05:6000:1863:b0:38a:9c1b:df69 with SMTP id ffacd0b85a97d-38a9c1be0ccmr5321032f8f.31.1736643757333; Sat, 11 Jan 2025 17:02:37 -0800 (PST) Received: from localhost.localdomain ([69.6.8.124]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436e9d8fb99sm97996305e9.3.2025.01.11.17.02.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Jan 2025 17:02:36 -0800 (PST) From: Sergey Ryazanov To: Daniel Golle Cc: OpenWrt Development List , Andre Heider , Jan Hoffmann , Martin Schiller Subject: [PATCH v2 3/4] ipq40xx: fix compatibility with linux-atm tools Date: Sun, 12 Jan 2025 03:02:19 +0200 Message-ID: <20250112010220.21317-4-ryazanov.s.a@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250112010220.21317-1-ryazanov.s.a@gmail.com> References: <20250112010220.21317-1-ryazanov.s.a@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250111_170239_320288_578C6BE0 X-CRM114-Status: GOOD ( 28.09 ) X-Spam-Score: -1.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: atm_qos struct should be the same both for user and kernel spaces. Via the __SO_ENCODE() macro it is used to define the SO_ATMQOS socket IOC. During the VRX518 support introduction, the atm_trafprm sturct nested into the atm_qos stucture was update with newer fields that are referenced by the ATM TC layer of the VRX518 TC driver. These new [...] Content analysis details: (-1.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:433 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender 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_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 -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [ryazanov.s.a(at)gmail.com] 1.0 FREEMAIL_REPLY From and body contain different freemails 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 atm_qos struct should be the same both for user and kernel spaces. Via the __SO_ENCODE() macro it is used to define the SO_ATMQOS socket IOC. During the VRX518 support introduction, the atm_trafprm sturct nested into the atm_qos stucture was update with newer fields that are referenced by the ATM TC layer of the VRX518 TC driver. These new fields are intended to communicate information for extra traffic classes supported by the driver. But we are still using vanila kernel headers to build the toolchain. Due to the atm.h header incoherency br2684ctl from linux-atm tools is incapable to configure an ATM bridge netdev: br2684ctl: Interface "dsl0" created sucessfully br2684ctl: Communicating over ATM 0.1.2, encapsulation: LLC br2684ctl: setsockopt SO_ATMQOS 22 <-- EINVAL errno br2684ctl: Fatal: failed to connect on socket; File descriptor in bad state There are two options to fix this incoherency. (a) update the header file in the toolchain to build linux-atm against updated atm_trafprm and atm_qos structures, or (b) revert atm_trafprm changes. Since there are no actual user space users of the extra ATM QoS traffic classes, just remove new fields from the atm_trafprm structure and disable the corresponding functionality in the VRX518 TC driver. Actually the new fields were just commented out and a comment was placed next to them explaining who is referencing these fields and why they are disabled for now. Run tested with FRITZ!Box 7530. Fixes: cfd42a0098 ("ipq40xx: add Intel/Lantiq ATM hacks") Reported-and-tested-by: nebibigon93@yandex.ru Signed-off-by: Sergey Ryazanov --- .../101-disable-extra-atm-qos-classes.patch | 66 +++++++++++++++++++ .../lantiq/vrx518_tc/patches/200-swplat.patch | 12 ++-- .../lantiq/vrx518_tc/patches/202-napi.patch | 4 +- ...-dcdp-atm_tc-fix-compilation-warning.patch | 6 +- ...tm_tc-fix-crash-on-subif_reg-absence.patch | 4 +- .../patches-6.6/998-lantiq-atm-hacks.patch | 8 ++- 6 files changed, 86 insertions(+), 14 deletions(-) create mode 100644 package/kernel/lantiq/vrx518_tc/patches/101-disable-extra-atm-qos-classes.patch diff --git a/package/kernel/lantiq/vrx518_tc/patches/101-disable-extra-atm-qos-classes.patch b/package/kernel/lantiq/vrx518_tc/patches/101-disable-extra-atm-qos-classes.patch new file mode 100644 index 0000000000..159cf1d082 --- /dev/null +++ b/package/kernel/lantiq/vrx518_tc/patches/101-disable-extra-atm-qos-classes.patch @@ -0,0 +1,66 @@ +Extra ATM traffic classes requires atm_qos struct extension what either +requires atm.h header update in the toolchain or breaks backward +compatibility with linux-atm tools due to usage of __SO_ENCODE macro +depending on the structure size. So just disable this unused +functionality to keep atm_qos struct intact and keep compatibility. + +Signed-off-by: Sergey Ryazanov +-- +--- a/dcdp/atm_tc.c ++++ b/dcdp/atm_tc.c +@@ -500,6 +500,15 @@ static void set_qsb(struct atm_priv *pri + /* Sustained Cell Rate (SCR) Leaky Bucket Shaper VBR.0/VBR.1 */ + if (qos->txtp.traffic_class == ATM_VBR_RT || + qos->txtp.traffic_class == ATM_VBR_NRT) { ++#if 1 ++ /* Unconditionally disable shaper since there are no real users ++ * and corresponding extra atm_qos fields break backward ++ * compatibility with linux-atm tools, so these extra fields ++ * were removed. ++ */ ++ q_vbr_parm_tbl.bit.taus = 0; ++ q_vbr_parm_tbl.bit.ts = 0; ++#else + if (qos->txtp.scr == 0) { + /* disable shaper */ + q_vbr_parm_tbl.bit.taus = 0; +@@ -530,6 +539,7 @@ static void set_qsb(struct atm_priv *pri + else + q_vbr_parm_tbl.bit.taus = tmp; + } ++#endif + } else { + q_vbr_parm_tbl.bit.taus = 0; + q_vbr_parm_tbl.bit.ts = 0; +@@ -1068,9 +1078,11 @@ static int ppe_open(struct atm_vcc *vcc) + || (vcc->qos.txtp.traffic_class == ATM_VBR_RT && + vcc->qos.txtp.max_pcr > + (port->tx_max_cell_rate - port->tx_used_cell_rate)) ++#if 0 /* Disabled to keep atm_qos struct untouched */ + || (vcc->qos.txtp.traffic_class == ATM_VBR_NRT && + vcc->qos.txtp.scr > + (port->tx_max_cell_rate - port->tx_used_cell_rate)) ++#endif + || (vcc->qos.txtp.traffic_class == ATM_UBR_PLUS && + vcc->qos.txtp.min_pcr > + (port->tx_max_cell_rate - port->tx_used_cell_rate))) { +@@ -1132,7 +1144,9 @@ static int ppe_open(struct atm_vcc *vcc) + port->tx_used_cell_rate += vcc->qos.txtp.max_pcr; + break; + case ATM_VBR_NRT: ++#if 0 /* Disabled to keep atm_qos struct untouched */ + port->tx_used_cell_rate += vcc->qos.txtp.scr; ++#endif + break; + case ATM_UBR_PLUS: + port->tx_used_cell_rate += vcc->qos.txtp.min_pcr; +@@ -1226,7 +1240,9 @@ static void ppe_close(struct atm_vcc *vc + port->tx_used_cell_rate -= vcc->qos.txtp.max_pcr; + break; + case ATM_VBR_NRT: ++#if 0 /* Disabled to keep atm_qos struct untouched */ + port->tx_used_cell_rate -= vcc->qos.txtp.scr; ++#endif + break; + case ATM_UBR_PLUS: + port->tx_used_cell_rate -= vcc->qos.txtp.min_pcr; diff --git a/package/kernel/lantiq/vrx518_tc/patches/200-swplat.patch b/package/kernel/lantiq/vrx518_tc/patches/200-swplat.patch index 0d97ec4d5f..cff48a29ef 100644 --- a/package/kernel/lantiq/vrx518_tc/patches/200-swplat.patch +++ b/package/kernel/lantiq/vrx518_tc/patches/200-swplat.patch @@ -3,7 +3,7 @@ This replaces it by a basic working implementation. --- a/dcdp/atm_tc.c +++ b/dcdp/atm_tc.c -@@ -603,7 +603,11 @@ static void atm_aca_init(struct atm_priv +@@ -613,7 +613,11 @@ static void atm_aca_init(struct atm_priv cfg = &priv->tc_priv->cfg; txin = ¶m.aca_txin; @@ -15,7 +15,7 @@ This replaces it by a basic working implementation. txin->hd_size_in_dw = cfg->txin.soc_desc_dwsz; txin->pd_desc_base = SB_XBAR_ADDR(__ACA_TX_IN_PD_LIST_BASE); txin->pd_desc_num = __ACA_TX_IN_PD_LIST_NUM; -@@ -625,7 +629,11 @@ static void atm_aca_init(struct atm_priv +@@ -635,7 +639,11 @@ static void atm_aca_init(struct atm_priv txin->soc_cmlt_cnt_addr); txout = ¶m.aca_txout; @@ -27,7 +27,7 @@ This replaces it by a basic working implementation. txout->hd_size_in_dw = cfg->txout.soc_desc_dwsz; txout->pd_desc_base = SB_XBAR_ADDR(__ACA_TX_OUT_PD_LIST_BASE); txout->pd_desc_num = __ACA_TX_OUT_PD_LIST_NUM; -@@ -647,7 +655,11 @@ static void atm_aca_init(struct atm_priv +@@ -657,7 +665,11 @@ static void atm_aca_init(struct atm_priv txout->soc_cmlt_cnt_addr); rxout = ¶m.aca_rxout; @@ -39,7 +39,7 @@ This replaces it by a basic working implementation. rxout->hd_size_in_dw = cfg->rxout.soc_desc_dwsz; rxout->pd_desc_base = SB_XBAR_ADDR(__ACA_RX_OUT_PD_LIST_BASE); rxout->pd_desc_num = __ACA_RX_OUT_PD_LIST_NUM; -@@ -669,7 +681,11 @@ static void atm_aca_init(struct atm_priv +@@ -679,7 +691,11 @@ static void atm_aca_init(struct atm_priv rxout->soc_cmlt_cnt_addr); rxin = ¶m.aca_rxin; @@ -51,7 +51,7 @@ This replaces it by a basic working implementation. rxin->hd_size_in_dw = cfg->rxin.soc_desc_dwsz; rxin->pd_desc_base = SB_XBAR_ADDR(__RX_IN_PD_DES_LIST_BASE); rxin->pd_desc_num = __ACA_RX_IN_PD_LIST_NUM; -@@ -1261,7 +1277,7 @@ static int ppe_ioctl(struct atm_dev *dev +@@ -1277,7 +1293,7 @@ static int ppe_ioctl(struct atm_dev *dev static int ppe_send(struct atm_vcc *vcc, struct sk_buff *skb) { int ret, qid, mpoa_pt, mpoa_type, vid; @@ -60,7 +60,7 @@ This replaces it by a basic working implementation. struct atm_priv *priv; if (!vcc) { -@@ -1327,12 +1343,14 @@ static int ppe_send(struct atm_vcc *vcc, +@@ -1343,12 +1359,14 @@ static int ppe_send(struct atm_vcc *vcc, tc_dbg(priv->tc_priv, MSG_TX, "vid: 0x%x, qid: 0x%x\n", vid, qid); diff --git a/package/kernel/lantiq/vrx518_tc/patches/202-napi.patch b/package/kernel/lantiq/vrx518_tc/patches/202-napi.patch index 266beba1a7..7869293394 100644 --- a/package/kernel/lantiq/vrx518_tc/patches/202-napi.patch +++ b/package/kernel/lantiq/vrx518_tc/patches/202-napi.patch @@ -296,7 +296,7 @@ priv->tc_ops.umt_start = plat_umt_start; --- a/dcdp/atm_tc.c +++ b/dcdp/atm_tc.c -@@ -3650,7 +3650,7 @@ static void atm_aca_ring_config_init(str +@@ -3666,7 +3666,7 @@ static void atm_aca_ring_config_init(str static int atm_ring_init(struct atm_priv *priv) { atm_aca_ring_config_init(priv); @@ -305,7 +305,7 @@ } static int atm_init(struct tc_priv *tcpriv, u32 ep_id) -@@ -4020,7 +4020,7 @@ void atm_tc_unload(void) +@@ -4036,7 +4036,7 @@ void atm_tc_unload(void) /* unregister device */ if (priv->tc_priv->tc_ops.dev_unreg != NULL) priv->tc_priv->tc_ops.dev_unreg(NULL, diff --git a/package/kernel/lantiq/vrx518_tc/patches/204-dcdp-atm_tc-fix-compilation-warning.patch b/package/kernel/lantiq/vrx518_tc/patches/204-dcdp-atm_tc-fix-compilation-warning.patch index bf2d82e2b5..505cd6184d 100644 --- a/package/kernel/lantiq/vrx518_tc/patches/204-dcdp-atm_tc-fix-compilation-warning.patch +++ b/package/kernel/lantiq/vrx518_tc/patches/204-dcdp-atm_tc-fix-compilation-warning.patch @@ -1,6 +1,6 @@ --- a/dcdp/atm_tc.c +++ b/dcdp/atm_tc.c -@@ -746,7 +746,8 @@ static void atm_aca_init(struct atm_priv +@@ -756,7 +756,8 @@ static void atm_aca_init(struct atm_priv ACA_TXOUT_EN | ACA_RXIN_EN | ACA_RXOUT_EN, 1); } @@ -10,7 +10,7 @@ { struct tm nowtm; char tmbuf[64]; -@@ -765,7 +766,8 @@ static int print_datetime(char *buffer, +@@ -775,7 +776,8 @@ static int print_datetime(char *buffer, nowtm.tm_hour, nowtm.tm_min, nowtm.tm_sec); @@ -20,7 +20,7 @@ return 0; } -@@ -967,7 +969,7 @@ void show_atm_pvc(struct seq_file *seq, +@@ -977,7 +979,7 @@ void show_atm_pvc(struct seq_file *seq, char buf[64]; seq_printf(seq, "\tNet device: %s\n", pvc->dev->name); diff --git a/package/kernel/lantiq/vrx518_tc/patches/207-dcdp-atm_tc-fix-crash-on-subif_reg-absence.patch b/package/kernel/lantiq/vrx518_tc/patches/207-dcdp-atm_tc-fix-crash-on-subif_reg-absence.patch index 87456424c3..deee3f3ed3 100644 --- a/package/kernel/lantiq/vrx518_tc/patches/207-dcdp-atm_tc-fix-crash-on-subif_reg-absence.patch +++ b/package/kernel/lantiq/vrx518_tc/patches/207-dcdp-atm_tc-fix-crash-on-subif_reg-absence.patch @@ -23,7 +23,7 @@ Signed-off-by: Sergey Ryazanov --- --- a/dcdp/atm_tc.c +++ b/dcdp/atm_tc.c -@@ -1232,8 +1232,9 @@ static void ppe_close(struct atm_vcc *vc +@@ -1246,8 +1246,9 @@ static void ppe_close(struct atm_vcc *vc validate_oam_htu_entry(priv, 0); spin_unlock_bh(&priv->atm_lock); @@ -35,7 +35,7 @@ Signed-off-by: Sergey Ryazanov memset(conn, 0, sizeof(*conn)); -@@ -2791,24 +2792,26 @@ static void mpoa_setup_sync(struct atm_p +@@ -2807,24 +2808,26 @@ static void mpoa_setup_sync(struct atm_p struct wtx_queue_config_t tx_qcfg; struct uni_cell_header *cell_header; struct atm_vcc *vcc; diff --git a/target/linux/ipq40xx/patches-6.6/998-lantiq-atm-hacks.patch b/target/linux/ipq40xx/patches-6.6/998-lantiq-atm-hacks.patch index c15a4b3ae3..09417c05a4 100644 --- a/target/linux/ipq40xx/patches-6.6/998-lantiq-atm-hacks.patch +++ b/target/linux/ipq40xx/patches-6.6/998-lantiq-atm-hacks.patch @@ -20,13 +20,19 @@ Signed-off-by: John Crispin struct atm_trafprm { unsigned char traffic_class; /* traffic class (ATM_UBR, ...) */ int max_pcr; /* maximum PCR in cells per second */ -@@ -155,6 +161,9 @@ struct atm_trafprm { +@@ -155,6 +161,15 @@ struct atm_trafprm { unsigned int adtf :10; /* ACR Decrease Time Factor (10-bit) */ unsigned int cdf :3; /* Cutoff Decrease Factor (3-bit) */ unsigned int spare :9; /* spare bits */ ++#if 0 ++ /* Used only by Lantiq VRX518 TC driver. No actual users, but break ++ * compatibility with linux-atm tools. So commented out to avoid the ++ * struct size change. ++ */ + int scr; /* sustained rate in cells per second */ + int mbs; /* maximum burst size (MBS) in cells */ + int cdv; /* Cell delay variation */ ++#endif }; struct atm_qos { From patchwork Sun Jan 12 01:02:20 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Ryazanov X-Patchwork-Id: 2033234 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=DRYQBvg9; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=lsNtIR8O; 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 4YVxwf4JKPz1yPL for ; Sun, 12 Jan 2025 12:03:46 +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=U1D2dedzHC1AJvRniOK6HKRrcfKDBA3E+IJtoGVf1ts=; b=DRYQBvg9Smtxvd PoNBTzdqJJoOtb2WIJQ9pOZy1g9QZKS378tRFFmlUdv1g55bKCayZHmaJeVQq54OzirVqXnBg+5Xy BPd1kBluCBf3myXdkna4CN1jLWxd80hkv9vyN25tJKEChonOhJBfdC7uDSTRzvXXpjiPmkW31uTWb R22HZq9RUBDF0JF8mkxKAKhCGlFi1Et3r7L77uLmduPOYdGzK0BdtTKMlaeVAY/hbIW8/PtbthgLj gYgvBIFgMFQATzX1KebzwiLQlBRT4TrGA7HhO1xckMszd0WsTdfh3SKE3wf2IxVvondgiHmq6p3j7 QJ9DAGI2dfATeCf+/Cqw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tWmNI-00000001oba-2DjK; Sun, 12 Jan 2025 01:02:44 +0000 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tWmNF-00000001oaL-3aKX for openwrt-devel@lists.openwrt.org; Sun, 12 Jan 2025 01:02:42 +0000 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-385e3621518so1704811f8f.1 for ; Sat, 11 Jan 2025 17:02:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736643760; x=1737248560; darn=lists.openwrt.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SKm6nmv3idiP7gQrqed7N/oNZLvlsaFPdydtBSK1w9w=; b=lsNtIR8OHX+2qULKIkWLL6Tg+8+h53HyanVhB4PZcVsR14gL2WwBEW+QW9k27uXnOU Kyph+spYVt8/UYq/u3BTiVRle7bxF4tGQUdxaIeJdyIfLpSsuUwz5ij74D+8Nhg9U9Pi o+/aIHSHkg3kPthZ/nh8IP3Go/avieUiuDjXCCOFU8MvkKSTMuhwQZLtilZDhT4kC4bs SmCdhQF6q/7cqRUiqcuc7uLGHbClvltKYFQhzBwUdUgtygEYWYCwZuJAdRrP/FqcU6jZ XLx0q9XQ7rs2FH4eWxxyPskIKak48jtznQyswwn/vgcYjiNwXTYh7SnM6PNeCnH6FxxG 5B/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736643760; x=1737248560; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SKm6nmv3idiP7gQrqed7N/oNZLvlsaFPdydtBSK1w9w=; b=IDyjPRwkdq2x2ofY5qRzO+ValWm7A2j80FOS8UcfrO3mXOLdhymubD+mj/etaPaVE/ YgZGNS3akxeT7ps/sYmw6tdpp1ymx8Gy+EP3nvRLJmbiFIzCmksODsE6F3tegLTdEHGw EbQcNysOZCGA5qDBS+wXBH5oJoesxMwAgif4hKMIATo47EDfl/67dlu93k5peH7flLPM mtvFyyxe5FwEkauhIzqFPM55ZRrDh3XKJKHTQ0GAHRmiGaYC1GB5vlJ/0AkvdhYNrOyS v9rt19reXY+L7bzuAMC4cN3jNWY897B0M84/oe+VUxiIbXi6UJjTQvIqdAFFnzdYs+/R NnWg== X-Gm-Message-State: AOJu0Yy3atVyEs3McvST1pUe/qzVNrXFXobgXNdqwpkxl8y7sSQuIgdt w4zGMjMLrpSwZrqFONm3zhx1ANHmtPcXrKMID+/U5/lls1fSIG+O X-Gm-Gg: ASbGncvHQChh44XZ3Ojh3KZ0CNdgxykAEvOpWV+c6HLaPS9MCJFLkw/YUeWHWtfYBA0 b5ZGy9miCySHvEZhYUNLYs8qgC0FnXYv89DVSxMDvCc3cztl3kaXwKzshno/K+VjdwZ8HI5BvMR dnh9M6Y0P69kZ2KPLTNDScaCIWhWRo+eBd76K3tJ73jZqK1Fwdzi5SpCpthuSVroCqBPwoDFwyW jC2AOrNSMAF3FAYPaL4bNt2aIcBmTtk8j/V368/+M6TuQp5iT9gvgCor+NkcdvLeuM/ X-Google-Smtp-Source: AGHT+IFZpifCW/HUsdAi5j6m6bNu88+/1JN02kI8wV/H9vq7wNsqfgUL0e8nCPql/WdWjSEE/ew8lQ== X-Received: by 2002:a05:6000:4011:b0:38a:418e:1177 with SMTP id ffacd0b85a97d-38a872f68e7mr11939554f8f.11.1736643760246; Sat, 11 Jan 2025 17:02:40 -0800 (PST) Received: from localhost.localdomain ([69.6.8.124]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436e9d8fb99sm97996305e9.3.2025.01.11.17.02.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Jan 2025 17:02:39 -0800 (PST) From: Sergey Ryazanov To: Daniel Golle Cc: OpenWrt Development List , Andre Heider , Jan Hoffmann , Martin Schiller Subject: [PATCH v2 4/4] kernel: vrx518_tc: bump PKG_RELEASE Date: Sun, 12 Jan 2025 03:02:20 +0200 Message-ID: <20250112010220.21317-5-ryazanov.s.a@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250112010220.21317-1-ryazanov.s.a@gmail.com> References: <20250112010220.21317-1-ryazanov.s.a@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250111_170241_898080_3700D906 X-CRM114-Status: GOOD ( 10.44 ) 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: Bump PKG_RELEASE after the previous fixes. Signed-off-by: Sergey Ryazanov --- package/kernel/lantiq/vrx518_tc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/lantiq/vrx518_tc/Makefile b/package/kernel/lantiq/vrx518_tc/Makefile index a5718d9d5b..d92c6d1c63 100644 --- a/package/kernel/lantiq/vrx518_tc/Makefile +++ b/package/kernel [...] Content analysis details: (-2.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:436 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender 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_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 -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [ryazanov.s.a(at)gmail.com] 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 Bump PKG_RELEASE after the previous fixes. Signed-off-by: Sergey Ryazanov --- package/kernel/lantiq/vrx518_tc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/lantiq/vrx518_tc/Makefile b/package/kernel/lantiq/vrx518_tc/Makefile index a5718d9d5b..d92c6d1c63 100644 --- a/package/kernel/lantiq/vrx518_tc/Makefile +++ b/package/kernel/lantiq/vrx518_tc/Makefile @@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=vrx518_tc PKG_VERSION:=1.5.12.4 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_BASE_NAME:=vrx518_tc_drv UGW_VERSION=8.5.2.10