mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net-next v5 0/3] Add Cortina Systems CS7542 network engine support
@ 2026-11-30 22:07 Fil Dunsky via B4 Relay
  2026-11-30 22:07 ` [PATCH net-next v5 1/3] dt-bindings: net: Add Cortina CS7542 network engine Fil Dunsky via B4 Relay
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Fil Dunsky via B4 Relay @ 2026-11-30 22:07 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Fil Dunsky, Linus Walleij
  Cc: Philipp Zabel, Hans Ulli Kroll, Russell King, devicetree,
	linux-arm-kernel, netdev, linux-kernel

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 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/

---
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           | 1964 ++++++++++++++++++++
 drivers/net/ethernet/cortina/cs752x_ne.h           |   13 +
 drivers/net/ethernet/cortina/cs752x_sch_tm.c       |  688 +++++++
 8 files changed, 3327 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 <filipp.dunsky@gmail.com>



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-30 22:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-30 22:07 [PATCH net-next v5 0/3] Add Cortina Systems CS7542 network engine support Fil Dunsky via B4 Relay
2026-11-30 22:07 ` [PATCH net-next v5 1/3] dt-bindings: net: Add Cortina CS7542 network engine Fil Dunsky via B4 Relay
2026-11-30 22:07 ` [PATCH net-next v5 2/3] net: cortina: Add CS7542 CPU network datapath Fil Dunsky via B4 Relay
2026-11-30 22:07 ` [PATCH net-next v5 3/3] MAINTAINERS: Add CS7542 network engine support Fil Dunsky via B4 Relay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®