]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
r8152: Add support for the RTL8157 hardware
authorBirger Koblitz <mail@birger-koblitz.de>
Sat, 4 Apr 2026 07:57:43 +0000 (09:57 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 9 Apr 2026 10:16:46 +0000 (12:16 +0200)
commitfd3c7d080df53136c7e7e37f753fb7bd4640ca42
tree7f72a30611b21740e2b5cd3db9cf918b5774e77a
parentebe5fd2ed20af5ae176dd41dd4a85a3cdc738b8a
r8152: Add support for the RTL8157 hardware

The RTL8157 uses a different packet descriptor format compared to the
previous generation of chips. Add support for this format by adding a
descriptor format structure into the r8152 structure and corresponding
desc_ops functions which abstract the vlan-tag, tx/rx len and
tx/rx checksum algorithms.

Also, add support for the ADV indirect access interface of the RTL8157
and PHY setup.

For initialization of the RTL8157, combine the existing RTL8156B and
RTL8156 init functions and add RTL8157-specific functinality in order
to improve code readability and maintainability.
r8156_init() is now called with RTL_VER_10 and RTL_VER_11 for the RTL8156,
with RTL_VER_12, RTL_VER_13 and RTL_VER_15 for the RTL8156B and with
RTL_VER_16 for the RTL8157 and checks the version for chip-specific code.
Also add USB power control functions for the RTL8157.

Add support for the USB device ID of Realtek RTL8157-based adapters. Detect
the RTL8157 as RTL_VER_16 and set it up.

Signed-off-by: Birger Koblitz <mail@birger-koblitz.de>
Link: https://patch.msgid.link/20260404-rtl8157_next-v7-2-039121318f23@birger-koblitz.de
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/usb/r8152.c