public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/2] r8152: Add support for the RTL8157 5Gbit USB Ethernet chip
@ 2026-03-17 18:07 Birger Koblitz
  2026-03-17 18:07 ` [PATCH net-next v2 1/2] r8152: Add support for 5Gbit Link Speeds and EEE Birger Koblitz
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Birger Koblitz @ 2026-03-17 18:07 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni
  Cc: linux-usb, netdev, linux-kernel, Birger Koblitz

Add support for the RTL8157, which is a 5GBit USB-Ethernet adapter
chip in the RTL815x family of chips.

The RTL8157 uses a different frame descriptor format, and different
SRAM/ADV access methods, plus offers 5GBit/s Ethernet, so support for these
features is added in addition to chip initialization and configuration.

The module was tested with an OEM RTL8157 USB adapter:
[25758.328238] usb 4-1: new SuperSpeed Plus Gen 2x1 USB device number 2 using xhci_hcd
[25758.345565] usb 4-1: New USB device found, idVendor=0bda, idProduct=8157, bcdDevice=30.00
[25758.345585] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=7
[25758.345593] usb 4-1: Product: USB 10/100/1G/2.5G/5G LAN
[25758.345599] usb 4-1: Manufacturer: Realtek
[25758.345605] usb 4-1: SerialNumber: 000300E04C68xxxx
[25758.534241] r8152-cfgselector 4-1: reset SuperSpeed Plus Gen 2x1 USB device number 2 using xhci_hcd
[25758.603511] r8152 4-1:1.0: skip request firmware
[25758.653351] r8152 4-1:1.0 eth0: v1.12.13
[25758.689271] r8152 4-1:1.0 enx00e04c68xxxx: renamed from eth0
[25763.271682] r8152 4-1:1.0 enx00e04c68xxxx: carrier on

The RTL8157 adapter was tested against an AQC107 PCIe-card supporting
10GBit/s and an RTL8126 5Gbit PCIe-card supporting 5GBit/s for
performance, link speed and EEE negotiation. Using USB3.2 Gen 1 with
the RTL8157 USB adapter and running iperf3 against the AQC107 PCIe
card resulted in 3.47 Gbits/sec, whereas using USB3.2 Gen2 resulted
in 4.70 Gbits/sec, speeds against the RTL8126-card were the same.

As the code integrates the RTL8157-specific code with existing RTL8156 code
in order to improve code maintainability (instead of adding RTL8157-specific
functions duplicaing most of the RTL8156 code), regression tests were done
with an Edimax EU-4307 V1.0 USB-Ethernet adapter with RTL8156.

The code is based on the out-of-tree r8152 driver published by Realtek under
the GPL.

This patch is on top of linux-next as the code re-uses the 2.5 Gbit EEE
recently added in r8152.c.

Signed-off-by: Birger Koblitz <mail@birger-koblitz.de>
---
Changes in v2:
- Fixed missing initialization of ret value in wait_cmd_ready()
- Combine all parts with RTL8157-specific code to avoid undefined functions
- Link to v1: https://lore.kernel.org/r/20260314-rtl8157_next-v1-0-9ba77b428afd@birger-koblitz.de

---
Birger Koblitz (2):
      r8152: Add support for 5Gbit Link Speeds and EEE
      r8152: Add support for the RTL8157 hardware

 drivers/net/usb/r8152.c | 1092 ++++++++++++++++++++++++++++++++++++-----------
 1 file changed, 845 insertions(+), 247 deletions(-)
---
base-commit: 5c9e55fecf9365890c64f14761a80f9413a3b1d1
change-id: 20260314-rtl8157_next-ae18683eb4fa

Best regards,
-- 
Birger Koblitz <mail@birger-koblitz.de>


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

end of thread, other threads:[~2026-03-20  8:28 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-17 18:07 [PATCH net-next v2 0/2] r8152: Add support for the RTL8157 5Gbit USB Ethernet chip Birger Koblitz
2026-03-17 18:07 ` [PATCH net-next v2 1/2] r8152: Add support for 5Gbit Link Speeds and EEE Birger Koblitz
2026-03-19 16:29   ` Andrew Lunn
2026-03-19 16:51     ` Birger Koblitz
2026-03-19 16:51   ` Simon Horman
2026-03-20  5:29     ` Birger Koblitz
2026-03-20  8:28       ` Simon Horman
2026-03-19 21:43   ` Aleksander Jan Bajkowski
2026-03-19 22:46     ` Andrew Lunn
2026-03-19 23:12       ` Aleksander Jan Bajkowski
2026-03-17 18:07 ` [PATCH net-next v2 2/2] r8152: Add support for the RTL8157 hardware Birger Koblitz
2026-03-19 16:42   ` Andrew Lunn
2026-03-19 17:27     ` Birger Koblitz
2026-03-19 16:51   ` Simon Horman
2026-03-20  7:15     ` Birger Koblitz
2026-03-19 15:53 ` [PATCH net-next v2 0/2] r8152: Add support for the RTL8157 5Gbit USB Ethernet chip Andrew Lunn
2026-03-19 16:31   ` Birger Koblitz

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