Re: [PATCH net-next v2 1/2] r8152: Add support for 5Gbit Link Speeds and EEE
From: Andrew Lunn
Date: Thu Mar 19 2026 - 12:42:06 EST
On Tue, Mar 17, 2026 at 07:07:14PM +0100, Birger Koblitz wrote:
> The RTL8157 supports 5GBit Link speeds. Add support for this speed
> in the setup and setting/getting through ethool. Also add 5GBit EEE.
> Add functionality for setup and ethtool get/set methods.
>
> Signed-off-by: Birger Koblitz <mail@xxxxxxxxxxxxxxxxx>
> ---
> drivers/net/usb/r8152.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++---
> 1 file changed, 53 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
> index 3b6d4252d34c63ead8f11a120e212325a5f7d505..bab8e10e5f99afcb332e333c2739ed7509b03419 100644
> --- a/drivers/net/usb/r8152.c
> +++ b/drivers/net/usb/r8152.c
> @@ -604,6 +604,7 @@ enum spd_duplex {
> FORCE_100M_FULL,
> FORCE_1000M_FULL,
> NWAY_2500M_FULL,
> + NWAY_5000M_FULL,
> };
>
> /* OCP_ALDPS_CONFIG */
> @@ -725,6 +726,7 @@ enum spd_duplex {
> #define BP4_SUPER_ONLY 0x1578 /* RTL_VER_04 only */
>
> enum rtl_register_content {
> + _5000bps = BIT(12),
> _2500bps = BIT(10),
Any idea what bit 11 is for? There is not normally any speed between
2.5G and 5G.
> @@ -9934,6 +9979,11 @@ static int rtl8152_probe_once(struct usb_interface *intf,
> } else {
> tp->speed = SPEED_1000;
> }
> + if (tp->support_5000full &&
> + tp->udev->speed >= USB_SPEED_SUPER) {
> + tp->speed = SPEED_5000;
> + tp->advertising |= RTL_ADVERTISED_5000_FULL;
> + }
Let me check i understand this.
ethtool supported will indicate 5G, independent of the USB speed? But
it will only advertise 5G if the USB bus is USB 3.0 or higher, which
can do 5G. The user can however use ethtool to advertise 5G, for USB
2.0?
I suppose the question is, are there any link partners which do 2.5G
and/or 5G, but not 1G? I guess not.
Andrew