[PATCH net-next v3 0/3] r8152: Add support for the RTL8159 10Gbit USB Ethernet chip
From: Birger Koblitz <hidden>
Date: 2026-05-02 04:50:57
Also in:
linux-usb, lkml
Add support for the RTL8159, which is a 10GBit USB-Ethernet adapter chip in the RTL815x family of chips. The RTL8159 re-uses the frame descriptor format and SRAM2 access introduced with the RTL8157 as well as most of the setup and PM logic of the RTL8157. The module was tested with a Lekuo DR59R11 USB-C 10GbE Ethernet Adapter: [ 2502.906947] usb 2-1: new SuperSpeed USB device number 3 using xhci_hcd [ 2502.927859] usb 2-1: New USB device found, idVendor=0bda, idProduct=815a, bcdDevice=30.00 [ 2502.927867] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=7 [ 2502.927871] usb 2-1: Product: USB 10/100/1G/2.5G/5G/10G LAN [ 2502.927873] usb 2-1: Manufacturer: Realtek [ 2502.927875] usb 2-1: SerialNumber: 000388C9B3B5XXXX [ 2503.063745] r8152-cfgselector 2-1: reset SuperSpeed USB device number 3 using xhci_hcd [ 2503.123876] r8152 2-1:1.0: Requesting firmware: rtl_nic/rtl8159-1.fw [ 2503.126267] r8152 2-1:1.0: PHY firmware installed 0 to be loaded: 20 [ 2503.156265] r8152 2-1:1.0: load rtl8159-1 v1 2026/01/01 successfully [ 2503.270729] r8152 2-1:1.0 eth0: v1.12.13 [ 2503.289349] r8152 2-1:1.0 enx88c9b3b5xxxx: renamed from eth0 [ 2507.777055] r8152 2-1:1.0 enx88c9b3b5xxxx: carrier on The RTL8159 adapter was tested against an AQC107 PCIe-card supporting 10GBit/s and an RTL8157 5Gbit USB-Ethernet adapter supporting 5GBit/s for performance, link speed and EEE negotiation. Using USB3.2 Gen 2 (20GBit) with the RTL8159 USB adapter and running iperf3 against the AQC107 PCIe card resulted in 8.96 Gbits/sec transfer speed. The code is based on the out-of-tree r8152 driver published by Realtek under the GPL. The RTL8159 requires firmware for the PHY in order to achieve a 10GBit link speed. Without firmware, only 5GBit were achieved. The firmware can be extracted from the out-of-tree r8152 driver-code where it is stored in the ram17 u8-array. Code is added to use the existing firmware upload mechanism of the driver for the RTL8157/9 PHY firmware code. The firmware will be submitted separately to linux-firmware. Signed-off-by: Birger Koblitz <redacted> --- Changes in v3: - Various references to RTL8157 in the commit description changed to RTL8159 - Fix incorrect use of OCP_EEE_ADV2 register for 10GBit - Fix various instances where a gate on RTL_VER_16 was not extended to RTL_VER_17, although RTL8159 needs the same code-path as RTL8157 - Explain use of 0x815a device-ID for RTL8159 in commit message - Extend poll-timeout for backup-restore to 20ms - Drop patch for IRQ mitigation - Link to v2: https://lore.kernel.org/r/20260429-rtl8159_net_next-v2-0-bab3cd4e4c66@birger-koblitz.de (local) Changes in v2: - Correct formatting of comments - Order case statement values correctly - Add error message when backup-restore fails - Correct commit message of support for firmware upload - Link to v1: https://lore.kernel.org/r/20260428-rtl8159_net_next-v1-0-52d03927b46f@birger-koblitz.de (local) --- Birger Koblitz (3): r8152: Add support for 10Gbit Link Speeds and EEE r8152: Add support for the RTL8159 chip r8152: Add firmware upload capability for RTL8157/RTL8159 drivers/net/usb/r8152.c | 340 +++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 321 insertions(+), 19 deletions(-) --- base-commit: 0f19519fdd22bc0f5429377da3a52327c5eee166 change-id: 20260427-rtl8159_net_next-4f778a614fa7 Best regards, -- Birger Koblitz [off-list ref]