🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #22455

[PATCH net-next v2 0/3] net: cortina: Add CS7542 network engine support

#22455
From: Fil Dunsky via B4 Relay
Date: Wed, 25 Nov 2026 10:36
106 lines
16547 bytes
Add the CS7542 CPU network datapath with phylink for three GMACs.
Almond+ connects two GMACs to QCA8337 CPU ports handled by DSA. Use the
global reset controller's seven exclusive lines, including the shared
LSO/SSP DMA block. The reset provider binds to the existing syscon.

Apply the combined CS7542 global controls series to Linux v7.4-rc4
first. Its clock and reset patches describe the NI, FE, TM, SCH, QM,
DMA and NI-XRAM reset IDs. The board DTS is posted separately.

Use normal NAPI weight64 and the supported external-DDR QM/TM setup,
with no module parameters. Preserve scatter-gather TX, multi-buffer RX,
tracked DMA ownership and bounded initialization. Require the verified
64 MiB no-map queue-manager reservation; NAND uses PIO and a separate
SSP DMA consumer cannot run concurrently.

Attempt and check every protective assertion without rolling back
already asserted controls. Preserve the first reset error, and retain
all active DMA allocations if any line cannot be confirmed asserted.
Serialize shared NI register updates and stop scheduler initialization
on its first command failure before publishing DMA buffers.

Validation includes actual-source reset/cleanup/error models, shared NI
RMW interleavings and scheduler command failures, ARM builds and binding
examples.

A separate combined Almond+ Linux v7.4-rc4 RAM kernel with private
log-only instrumentation passed two network-engine probe/removal epochs.
The trace checked all seven reset lines and their readbacks. Twenty-nine
exclusive-acquisition negative tests returned -EBUSY in a private test
module; they are intentional test warnings, not ordinary driver activity.
The external host matched 600 UDP echoes (six payload sizes, 0..1400
bytes) and 20 ICMPv6 replies. A distinct CPU-port scatter-gather/jumbo
fixture completed 448 frames. These are separate trace, host functional
and fixture observations, not a throughput or hardware-offload result.
The composed kernel also contained PCIe/PHY and other board drivers;
this is not a standalone provider-only hardware test. Watchdog expiry
returned to normal firmware. Protected-region hashes and flash layout
matched. Concurrent unrelated settings activity is excluded from any
unchanged-settings claim.
No checksum/NAT offload or performance capability is added.

The additional MAC-deferral/unwind correction is tested separately on
the host with actual-source fault models, not on the board. The hardware
evidence above describes the preceding source revision; its successful
factory-address path and packet datapath are unchanged by this error-path
correction. Missing NVMEM now defers before registering reset cleanup;
a late defer is returned instead of assigning a random address.

Additional local review corrections are tested with focused actual-source
fault/ownership models and ARM compilation. They have not yet been run
on the board: count bounded RX fragments independently of delivery
eligibility, schedule an initial masked NAPI poll on open, and retain
completion reaping for outstanding TX while all ports are closed.
No hardware offload capability or packet-MAC rewrite is added.

Signed-off-by: Fil Dunsky <filipp.dunsky@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/

---
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      |  160 ++
 MAINTAINERS                                        |    7 +
 drivers/net/ethernet/cortina/Kconfig               |   14 +
 drivers/net/ethernet/cortina/Makefile              |    3 +
 drivers/net/ethernet/cortina/cs752x_fe.c           |  477 +++++
 drivers/net/ethernet/cortina/cs752x_ne.c           | 1869 ++++++++++++++++++++
 drivers/net/ethernet/cortina/cs752x_ne.h           |   13 +
 drivers/net/ethernet/cortina/cs752x_sch_tm.c       |  687 +++++++
 8 files changed, 3230 insertions(+)
---
base-commit: b6a9fa34ce4187cb69d3c588a4bbffc31ce5db8f
change-id: 20261123-b4-cs7542-ethernet-59c15dbc7e7e
prerequisite-message-id: <20261125-cs7542-syscon-v4-0-3337bb0d3b48@gmail.com>
prerequisite-patch-id: a9208276c628f8741a807d0e5c5945d4bf211c8a
prerequisite-patch-id: 65d46bb3caaa8518ee561f65d3f603ade396fff9
prerequisite-patch-id: a0ed5fbcfa308b16eaf265371a6697ad0aea6802
prerequisite-patch-id: bb8ffd99cb30e5a0b47881f6ba19a36329d5f4f2
prerequisite-patch-id: 7fbe9405265ef3d1ec62811415a46c0061afd7c8
prerequisite-patch-id: 01ece2c91e080d5cae6af81944159373776484ca

Best regards,
--  
Fil Dunsky <filipp.dunsky@gmail.com>
Technical Details
Message-ID: <20261125-b4-cs7542-ethernet-v2-0-d0ea3c6eb375@gmail.com>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.endofthelinebbs.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-371231-linux-kernel-netdev=dewy.ru

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.endofthelinebbs.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-371231-linux-kernel-netdev=dewy.ru
From: devnull+filipp.dunsky.gmail.com@kernel.org (Fil Dunsky via B4 Relay)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net-next v2 0/3] net: cortina: Add CS7542 network engine
 support
Date: Wed, 25 Nov 2026 13:36:30 +0300
Organization: Usenet Network
Message-ID: <20261125-b4-cs7542-ethernet-v2-0-d0ea3c6eb375@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="182943"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:Keo9uL1p1oqfU/JF146JJHKuJok= sha256:M6fDmrh38/Eg9v3qI3LD3gNr9U3qa2W/Ff/xagOfuOs=
	sha1:o2tAn2Yu3szBJN+eovhKeB3owhI= sha256:mj53Eh20fbA7eIDAVOUc85VMHo2CTS/jdHphUQmnVGs=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 7DFC0125E52; Wed, 25 Nov 2026 13:37:02 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.401
X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id aIrz2GtUD5gB;
	Wed, 25 Nov 2026 13:36:58 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-371231-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])
	by mail.dewy.ru (Postfix) with ESMTPS id D1387125E54; Wed, 25 Nov 2026 13:36:49 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sin.lore.kernel.org (Postfix) with ESMTP id 313DC2B9C2; Wed, 25 Nov 2026 10:36:46 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=3; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1795603004;
	b=cqOEVNunJU8HxZ1lKqiPwRVhVastEmyY/+43KtKyy3Y3Ley5jEMnNY7UXNXq+oOt8Ax+
	 JH3cGIpzaWqbFWrjCf7Ha0dpdW0GDexnFIqaJ66EfPn/buCWbgkjCD9RJfr6wUAIs7bET
	 2F2lRlao3WfgFsXH7SJmpB7kcYtU2t6Zif0HQbEIYT2poRWfLtbVii9oITFkjOE5k5a6H
	 pIQm+G2UthX4HI2Y79x42vpvMFnLwXIV3TqFFRL8TQCX0Ou0XZ3hPuTJk29q9cIWeuYkd
	 RsSlcp+GxxcEmwV+O4XToAHLaCVi/1dF7To4xQ/3FqcLn1lPcGrffGow/4dLpOZWbEw==
X-ARC-Message-Signature: i=3; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795603004;
	h=X-Original-To:Received:Received:DKIM-Signature:Received:From:Subject:
	 Date:Message-Id:X-Mailing-List:List-Id:List-Post:List-Help:
	 List-Subscribe:List-Unsubscribe:List-Owner:Precedence: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=4Omsk3aCF2GLKrO6+1yETWUmtvbvNI+t02oC5/uK2gs=;
	b=gejBBZGB1XqMEtt2IghbBksiOXFCWz8j2+YDiCy+68bmDW2ZNL2MhF9e8ASYBJn0f7z8
	 3hj7SGbmTCR4J0wj+RMoFYkLYgkMEo2UVDmjYasX6Z4b6kB9DujVGPM0BjAf8L4edf0yG
	 Rt/i7DcuGPYqCBMBM/dxlbO4f7+T1GZcd6zVW6jbTl09HPoxBPh2c50OoqLakTrDSPXM4
	 2t6juoegdvSGXE+Wz1bw7w69fZMhJ0oQpeu1nj1NE58xgBcGWtSfusGeuGk1sbfyTx7Q9
	 eXxRcLwigBwSOpgBuqVRs0laCN+8uhvijESQyfi7r/TCD4wWYhqf4PWO2WT4GfAaGrQ==
X-ARC-Authentication-Results: i=3; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=OyicAg7O;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 6F960606A687;
	Wed, 25 Nov 2026 10:36:44 +0000 (UTC)
X-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=OyicAg7O
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1795603003;
	b=AY0MaC6WpaapTsrOtGHXBfz6oke7JNkcHocXvaI69To+2LIKNXw2dOXM4/DTO+iOd+dT
	 g8GZN6Y1qnM9BX/pJXDz1oklNl6PTETw5ksqauXoVT/HnZCW+rlcxe7UKEkPI2WP5l2y9
	 YF27bdx6hiokd2tESnjaJuBDcI0nqxDt1g7jgVqVwercqlnsSTslzlfLHdD3n8vvXdiqx
	 I4SWseRqmtbmFXcpKOLBYDin197iMgURplh6rriatzM9B82su+PuNtSfHJLWJVwyej6o3
	 2goxIekT0HBKrQzg0vZLMn9fOGjTyEc+OFSi1RH5FOoxyjT4tS1K6PrYe0O9yzoL5GA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795603003;
	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=4Omsk3aCF2GLKrO6+1yETWUmtvbvNI+t02oC5/uK2gs=;
	b=bzzAi0gFO1o9K5AwLVPH4GW39Cf0j8zpY3BZQmGuehrcB3++Ewo1SB3uT6wL9Z6M+/TN
	 lDlbvVj4HTWdz/b57ZVKSFqmO6TllPwdWEojrTBdZHnR0jFG39qQh0bPtklmSW4U9u631
	 AcOVGVNfl18qISbsrmmXV7MGAU84D+BqIeSZc/eGYe02omXGVqDSat9a7ptyF2Q9C5X1b
	 Mn+Vd/fl4RVDHnaABdXqYrKsw4FJ5mmqMlAm9X6aqlsWl2uPWqsUaYDuQw95Vawht8JxA
	 fJaAa/9/RHwLO6TSSgvQ9JJKPajh+YkRGlym8cqCKVc5TKDjdsf/yAY8Q02XsFCvESQ==
X-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=OyicAg7O;
	arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18
X-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 8C19D606A32E;
	Wed, 25 Nov 2026 10:36:43 +0000 (UTC)
X-Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77
X-ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none;
	t=1795603003;
	b=V0lPG1WaMQXR9LznYbJTIv0uCl/Vl+6vysZ61Emg25Fgyzs7Ft1grufXt1Tl3CWguRJa
	 YB/Dnc7Ae0TRdwRW+EQ3ajjDWX6MC531AJ5je5mhqEbXnDhWVIw5hpL2qEqs9NliaddGi
	 R7hdrvlSnv1AcLCsOZuPCZVJT/TdlbiWBtPmxoAc8EH6JFex/N0SzbUXRTUYCSfpkAC8e
	 j53pQqbvVkVmQv7KPstyDo2IFaYL3xHejRcqRiQIurPOKkrCQeWtkd9LpFbhJTwZYi6BI
	 4NydwZr8scN0G64JRs+lGtPRVdjhXIt44gR3QT7+Ehy3KGuyKikkbUcmvvoth8kNYsg==
X-ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256;
	c=relaxed/relaxed; t=1795603003;
	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=4Omsk3aCF2GLKrO6+1yETWUmtvbvNI+t02oC5/uK2gs=;
	b=UdWw6SPtjpyafHohDQ4P+kEWSz0svn8uEdSjFqJ6oGE/XldZdiw8jzS1YorFlbAYt8+A
	 NyzbbOEGLzzXh/k8/KeGd4Z/E2mJIeAbkPtxRzIWWAJxsatq84aoEshwVpkOpEem/mNUT
	 btFte86vS6iAkdHoVgJA8pF5MtZzNtlfJyhz2ziFXIDewUHVDYqQb4Zx5fVYAY3P9Gjw3
	 UPWyA4QLuM6GuLyrLhBZD8SYV8cJPTCRP24FWSw4f8ob7NSXWhMMtLnMU3osBnYnzIv9L
	 46PMOSYLv4+EYud6VJ3fe/wZiZ8/XVOWnacpfdFM2Bz6mATCTlzpZzWL5gE1UrSCsnA==
X-ARC-Authentication-Results: i=1; smtp.kernel.org; 
	arc=none smtp.remote-ip=100.80.115.77
X-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 A5FCA1F000C6;
	Wed, 25 Nov 2026 10:36:32 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1795603003;
	bh=4Omsk3aCF2GLKrO6+1yETWUmtvbvNI+t02oC5/uK2gs=;
	h=From:Subject:Date:To:Cc:Reply-To;
	b=OyicAg7OvxFCey622RAph9RI5fpVKTraJAQ23MYwNUaTiQdW6QYHs1/SUJfsitTsQ
	 FlixvhJkZJKT6hFJSo5J6AcBYF0pIljP8bQ9PLWx4o4YzeSbEZnhY7BpcT5UMOFI6+
	 TP3PGt+oDdRdGw5ztjw0ZMdEUZXsqh7x6nI6bzYOCiKixPKM1+5YyHJVcSEe5WzHXX
	 rhHMK8TweAiLlkXHOgbKX95r0GpUQcrNeAUkM6XcRIOm9/oL5jk0L52u5dXRj/0ITN
	 /h0UKwvQsfdD+k/jADmfzT6uELq8Y2TzGMBNPSMXDqOV/I0XLvLReHgXdBGZ1pGm7d
	 KYNAYM0eKi4Sg==
X-Received: from nexus.subspace.kernel.org (localhost [IPv6:::1])
	by lkml.kernel.org (Postfix) with ESMTP id 18FA64CE4C;
	Wed, 25 Nov 2026 10:36:32 +0000 (UTC)
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-B4-Tracking: v=1; b=H4sIAAAAAAAC/32QTW6EMAxGr4KybiryBwFVVe9RzSJxnCHVAG2SQ
 TMacfcGSqWuurRsv+/ZD5IwBkykrx4k4hJSmKdS8KeKwGCmM9LgSk14zRvGuKBWUkitkpxiHjB
 OmKnqgClnocUWSVn8jOjDbYe+k21gwlsmp59OutoPhLwxj9mIX9eSm48FaxJSmMcx5L6yjem8E
 RJQMt2CbTonQGltpLXeg2CAJVn7DTViSmYX7quXw1f9yqZ7gnmii6Q1FUK01tZOWKnfzqMJl+e
 S97obDiHlOd73fyxsF/rv9IUVnndWoQbuVP2HR07run4DvRG3aGABAAA=
X-Change-ID: 20261123-b4-cs7542-ethernet-59c15dbc7e7e
X-Cc: Philipp Zabel <p.zabel@pengutronix.de>, 
 Hans Ulli Kroll <ulli.kroll@googlemail.com>, 
 Russell King <linux@armlinux.org.uk>, 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=1795602990; l=5902;
 i=filipp.dunsky@gmail.com; s=20260930; h=from:subject:message-id;
 bh=hzfTSEncl8+6lQFtXl+HvtjdqGsPTGMtg6pa3a7jny0=;
 b=0ioYPAfU7bBMgacGabqirz3qfnCgZP6w9zOFbJdu1Kz6Kej95t+FkeymnfMXfAz/EdfRpFL3+
 yYK4yjei4ysDY0MQsawJPbe6Bvbr62Lfl1aUGdsdkth6w2DdQOOVlh/
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 <filipp.dunsky@gmail.com>
X-Reply-To: filipp.dunsky@gmail.com