mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Birger Koblitz <mail@birger-koblitz.de>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	linux-usb@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v2 1/2] r8152: Add support for 5Gbit Link Speeds and EEE
Date: Thu, 19 Mar 2026 17:29:28 +0100	[thread overview]
Message-ID: <9efbf132-f367-487b-aa66-8a9610d91d2d@lunn.ch> (raw)
In-Reply-To: <20260317-rtl8157_next-v2-1-10ea1fa488d1@birger-koblitz.de>

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@birger-koblitz.de>
> ---
>  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

  reply	other threads:[~2026-03-19 16:29 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9efbf132-f367-487b-aa66-8a9610d91d2d@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mail@birger-koblitz.de \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®