Re: [PATCH net-next v2 1/2] r8152: Add support for 5Gbit Link Speeds and EEE

From: Birger Koblitz

Date: Fri Mar 20 2026 - 01:29:45 EST


Hi Simon, thanks a lot for reviewing this patch!

On 19/03/2026 5:51 pm, Simon Horman wrote:
The RTL8157 supports 5GBit Link speeds. Add support for this speed
in the setup and setting/getting through ethool. Also add 5GBit EEE.
^^^^^^
This isn't a bug, but there's a typo: 'ethool' should be 'ethtool'.
Will be fixed in v3.

When rtl8152_set_speed() sets tp->ups_info.speed_duplex = NWAY_5000M_FULL
and r8156_ups_en(enable=true) subsequently calls r8156_ups_flags(), the
switch falls through to the default case and no speed bits are set in the
UPS flags word.
Yes, this analysis is correct.


Is the UPS power management configuration incorrect for 5Gbit link speeds
without a case for NWAY_5000M_FULL in r8156_ups_flags()?
The out-of-tree driver also does not set any flags in USB_UPS_FLAGS in the 5000M case. Maybe this is an oversight in that driver, but according to my tests, the power management works. In any case, I would not be able to guess the correct register value with any confidence for the NWAY_5000M_FULL case: the bits are different from the speed bits in PLA_PHYSTATUS. The RTL8157 also has other differences in USB power management compared to previous generations, such as introducing register USB_U2P3_V2_CTRL. So, to the best of my knowledge, the proposed patch is correct.


This path is activated by the next commit in the series (58ba3b6c476d
'r8152: Add support for the RTL8157 hardware') which sets
support_5000full = 1.

[ ... ]