From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796168198; b=zgaqgxAERjGg3P96uWYJb1BEShUVn98e4eCrap3aiZCAcrlNol/mohZ+chJBcewdwNp1 EWuWYX//RP8wAresnEFiZBVGdqUjo6psUBkd2AzOuEHbz61ucIzh7Sx4Qtz2FEm/ZBCXj doiosEVlwDRFlDvi4DOqHznzgqe8NhVqFdwaULgErdF61Qj5WrqaU/wXDgIdkhVLCCvn5 N0ur45OQpCKvfDlU9mWbb1H02hkrQmjnEE9hvGSmkpnf2GSfHddPCEqX2NNVfOTC8en+a ScZVVTNgSf7CoP63CjJTLBm2LSI2uk4RWUmrVMR0eC2IYdpO2CQujbCEYG/FjlOoV+w== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796168198; h=Received:DKIM-Signature:Received:From:Subject:Date:Message-Id: MIME-Version:Content-Type:Content-Transfer-Encoding:X-B4-Tracking: X-Change-ID:To:Cc:X-Mailer:X-Developer-Signature:X-Developer-Key: X-Endpoint-Received:X-Original-From:Reply-To; bh=BKWRUkmaAj0c9ogzp/Ik3xFs7lk5rL2LBuFOSoo8Qds=; b=yf9ohFmkDkWvwUfbReURaD+ebu2rxavCUucIpNyrD50VY9164G+5skKmJROUC5vNmxTX KjDZVbnfV4gtE/QBBlqQmO9KV2bwo2wBM9tuB7NBqJCyRnAPJbfSCbK5zAtbOKqBzgILU D3B857qx9g9U5R/8oF7uUImnA/HrDL26cd4a6QCqnAYijTB1Q3aRy/AWROCJbw8An42uP tJ/cOrfXI/AJJ7Z/QN+PEk/kvV2VTMLRJQJPaP+Dqt66gC9A2vt7AONNrSnjBuqon4LTR FblJqzhVmAEDSjY5rb+91CPrTq7f4ABoLkExLUGSGkwglUS2IE4q1WueSjdLv0q8lqA== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=GBKvL0pf; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A78C9606A330; Tue, 1 Dec 2026 23:36:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=GBKvL0pf Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1796168198; b=FwTYktjxYqK84H9TIyTOVMjqPoEmNXdCOoXhN6kJGYwNQSr3hqMo6cHGIEblYmROnlId 5KQblKAk5DgBnHoQo4fHGIVsi5aoFMzUmOuK1BWQ26Dl6x5Or5vSUTONVqaIsgn3RNmv1 xzSXS3+gRSKTCpr+KEq7GQuNZa2FbzqdVIJ0Kjpw5CvHwWzzHe7Nw9bKTRZ2Nw3LkCgkz So85lfP3n3xH5A1UQW9vChdb0mHn9F5uO+nnK8NPYYIgncY7d9nOD8IybLRVxOyzVE9dP gthvXGbApu98+GTV4RsEVm2Sx5EZlTMUIfle1jJLSCN8StQzIYOwFM65B1kH4riNKkA== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1796168198; h=DKIM-Signature:Received:From:Subject:Date:Message-Id:MIME-Version: Content-Type:Content-Transfer-Encoding:X-B4-Tracking:X-Change-ID:To: Cc:X-Mailer:X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To; bh=BKWRUkmaAj0c9ogzp/Ik3xFs7lk5rL2LBuFOSoo8Qds=; b=m5SAQzFPZfFkfFBo7Qxl8hsMYewj0V+2D8kszRulHiToRSiIy5bs+MvZ0jHXAdAde27s y8WTkPiejldNCKYLcm2OT2u+lUrGq3LRsNR84t+arLd0H+P3Kde1/50RTTvw+klAzRX7u n71WVGO8tcdvRASQHIVzhP3qVxqi9TFXjI/vEDRqne3zojkYRhpybmoxV8GUhtfzvR2YU mKTqaFDqN/HOk/nXI5mUiqj5Hs6Aajtt93ehYgz9cstb4rlW2+BHXPIuneY6r8mWyrb5L gjda8TuboIrCSNnkkQa/QArnZsEwY0VsukzjfWfZNOUAmmYJ5FnqkbNWY1VLyH0gKdA== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id 0EFD31F00897; Tue, 1 Dec 2026 23:36:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796168198; bh=BKWRUkmaAj0c9ogzp/Ik3xFs7lk5rL2LBuFOSoo8Qds=; h=From:Subject:Date:To:Cc:Reply-To; b=GBKvL0pfM3OHgBJjvb+WaGcmYKAf3Yh5oFNNv7iXYqOIjUYSh0ieRpQjcsS34J/LK 9+Xl0rObAzKdewGfr9zu4mkJ6MPtZMHxoCViuR4KXlvvMI3/lOXaEMqhxiN8nrP2e+ 8v0FPmjOWbVcy0BYwrR5XCTdcfv71mW5tTCxM3XddNRLlzjoUcY2E11H0ljKl/gHm8 ZQ4nVv6NuGKRzKsTaVu6n0GEyfAObwncd/HKngIPRqkNsOhf8/iGvD/D3ilfijtTM3 PgehCvp7xftRwtOpb+0yFnybEKx3CCzM8C9/JV6uKBUaGwfr3ctq7nS8/tqwk++kgu h0hF/Gw1/HH3A== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id 64E994F165; Tue, 1 Dec 2026 23:36:36 +0000 (UTC) From: Fil Dunsky via B4 Relay Subject: [PATCH net-next v6 0/3] Add Cortina Systems CS7542 network engine support Date: Wed, 02 Dec 2026 02:36:34 +0300 Message-Id: <20261202-b4-cs7542-ethernet-v6-0-a8c1905efa9f@gmail.com> X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAAAAAAAC/33Q207DMAwG4FeZck1QzkknhHgPxEXiOFsRbaHpq k3T3p20DK0aFZdW7M+/cyYZ+xoz2W7OpMexznXXlsI8bAjsfbtDWsdSE8GE4VxIGhSFbLUSFIc 99i0OVFfAdQxg0SIpg589pvo4o69kamjxOJC3n5d8CO8Iw2Ree3v8OpS9w3Ug+IwUuqaph+0mG F8lLxWg4s5CMFWUoJ3zKoSUQHLAstmliWowZz8H3m6ernmr37D5lKFr6Wgoo1rLCAoYV4a97Bp ffzyWfc9zwn2dh64/zf8x8jnQf6ePvHgpBo0ORNTM3byZG8WS0KuEKERk6CUYDNLqe0IuCbNKy OmqkiJKK5CHeE+oJWFXCVUI9Co6iAYT/3OIvhGC8VVCF4IBs1WqwAUelsTlcvkGAzaou2wCAAA = X-Change-ID: 20261123-b4-cs7542-ethernet-59c15dbc7e7e To: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Linus Walleij Cc: Philipp Zabel , Hans Ulli Kroll , Russell King , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1796168195; l=6329; i=filipp.dunsky@gmail.com; s=20260930; h=from:subject:message-id; bh=7+0ZeE8NPv6L2kOPIsoaiuGQCP9ZJynHrL2gSFv1oA8=; b=8wmB15BVQHqvxsqSRB89kebb+PZ1O1QhgfHJCTSIIJK1dnsZ7oxmGNSrj2Q3JseRij5dOh+cb 6YxZCYn6qWbDGq+KQuN5nun44+qiVuqMHA35RzgOm2TjzELVI5hKkjR X-Developer-Key: i=filipp.dunsky@gmail.com; a=ed25519; pk=JAYP8e2rJ54DHOmhNtXud8rl1igAaAXoOHxtJmVXI1g= X-Endpoint-Received: by B4 Relay for filipp.dunsky@gmail.com/20260930 with auth_id=1085 X-Original-From: Fil Dunsky Reply-To: filipp.dunsky@gmail.com Add the CS7542 CPU network datapath with phylink for three GMACs. Almond+ connects two GMACs to QCA8337 CPU ports handled by DSA. This series depends on the combined CS7542 global controls v6 series, posted separately against Linux v7.4-rc4. The consumer acquires the NI, FE, TM, SCH, QM, DMA and NI-XRAM reset controls exclusively. Board DTS support is separate. The verified 64 MiB no-map queue-manager reservation is required. NAND uses PIO; a separate SSP DMA consumer cannot run concurrently with the shared DMA reset domain. Use normal NAPI weight 64 and external-DDR QM/TM setup, with no module parameters. Support scatter-gather TX and multi-buffer RX, bounded initialization, tracked DMA ownership, shared NI register serialization and protective reset before freeing active mappings. No checksum/NAT offload or performance capability is added. The port byte counters previously wrapped at 4 GiB on 32-bit ARM. Use the network core's 64-bit per-CPU totals and preserve the existing error and drop counters. Load the low four MAC bytes as an unaligned little-endian word so the upper byte does not enter a signed shift. The driver compiles for ARM with warnings as errors. The new changes were checked on the host. Earlier combined-kernel Almond+ checks covered reset/probe/removal, LAN1 protected-data transfers and automatic watchdog return to normal OpenWrt. Separate earlier fixtures checked 600 UDP echoes, 20 ICMPv6 replies and 448 scatter-gather/jumbo frames. Protected-region hashes and flash layout matched; unrelated concurrent settings activity was excluded from any unchanged-settings claim. These observations predate the new retry/context fixes and are integration/functional checks, not throughput or offload results. --- Changes in v6: - Keep zero-budget NAPI polling limited to TX completions. - Link to v5: https://lore.kernel.org/r/20261201-b4-cs7542-ethernet-v5-0-0c079f9c8b1b@gmail.com Changes in v5: - Use the network core's 64-bit per-CPU packet and byte totals. - Pack the MAC register value with get_unaligned_le32(). - Update the global-controls dependency to v6. - Link to v4: https://lore.kernel.org/all/20261127-b4-cs7542-ethernet-v4-0-ea4d8cd6ef18@gmail.com/ Changes in v4: - Bound DMA-owned RX head polling and defer retries with the IRQ masked. - Schedule NAPI with bottom halves disabled from process context. - Link to v3: https://lore.kernel.org/all/20261126-b4-cs7542-ethernet-v3-0-5db5d372e1bd@gmail.com/ Changes in v3: - Include FCS in RX buffer recycling and retry transient descriptor ownership. - Validate the shared MAC prefix and reject sibling-clobbering changes. - Drop the RESET_CONTROLLER select from the Ethernet consumer. - Rely on reset provider error propagation instead of redundant status reads. - Use bulk deassert on bring-up; preserve all protective assertions on teardown. - Link to v2: https://patch.msgid.link/20261125-b4-cs7542-ethernet-v2-0-d0ea3c6eb375@gmail.com Changes in v2: - Use the common parent provider and all seven exclusive reset lines; remove the virtual reset child, duplicate provider and consumer hook. - Assert and verify every line without protective-assert rollback; retain active DMA allocations on any error and deassert in reverse order. - Use rgmii-id in the binding example for switch-inserted RX/TX delays. - Remove module parameters and unused internal-buffer mode; retain the previous default external-DDR initialization policy. - Use NAPI weight64, plain static MMIO helpers and goto-based open cleanup; retain the lock-protected publication and stopping gates. - Serialize shared NI RMW and stop on the first scheduler command error. - Keep MAC preflight before hardware cleanup registration and preserve a late NVMEM probe defer instead of replacing it with a random MAC. - Recycle bounded RX fragments also when the frame is dropped. - Poll already queued RX after open and retain safe closed-port TX reaping. - Review Sashiko 231860: existing NI/SCH/NAPI fixes address the older v1; temporary BM initialization bypass clearing follows the vendor sequence. - Link to v1: https://lore.kernel.org/all/20261123-b4-cs7542-ethernet-v1-0-fdb5e8c2d508@gmail.com/ To: Fil Dunsky To: Andrew Lunn To: "David S. Miller" To: Eric Dumazet To: Jakub Kicinski To: Paolo Abeni To: Rob Herring To: Krzysztof Kozlowski To: Conor Dooley To: Hans Ulli Kroll To: Linus Walleij To: Philipp Zabel To: Russell King Cc: netdev@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org --- Fil Dunsky (3): dt-bindings: net: Add Cortina CS7542 network engine net: cortina: Add CS7542 CPU network datapath MAINTAINERS: Add CS7542 network engine support .../bindings/net/cortina,cs7542-ethernet.yaml | 162 ++ MAINTAINERS | 7 + drivers/net/ethernet/cortina/Kconfig | 13 + drivers/net/ethernet/cortina/Makefile | 3 + drivers/net/ethernet/cortina/cs752x_fe.c | 477 +++++ drivers/net/ethernet/cortina/cs752x_ne.c | 1967 ++++++++++++++++++++ drivers/net/ethernet/cortina/cs752x_ne.h | 13 + drivers/net/ethernet/cortina/cs752x_sch_tm.c | 688 +++++++ 8 files changed, 3330 insertions(+) --- base-commit: b6a9fa34ce4187cb69d3c588a4bbffc31ce5db8f change-id: 20261123-b4-cs7542-ethernet-59c15dbc7e7e prerequisite-message-id: <20261129-cs7542-syscon-v6-0-553dc4c01460@gmail.com> prerequisite-patch-id: 27fe25055bcadb3c3fbc8b6788f31c2fb791df38 prerequisite-patch-id: ae69b5cca6f4604972300a89411bdca0ea19ab57 prerequisite-patch-id: 55dc4f1e91fc85340c4422438225f50fdf636799 prerequisite-patch-id: 66fccae72a8f951ac0ee182490e98543af29bd89 prerequisite-patch-id: 7fbe9405265ef3d1ec62811415a46c0061afd7c8 prerequisite-patch-id: 01ece2c91e080d5cae6af81944159373776484ca Best regards, -- Fil Dunsky