Issue of Realtek 8156b upgraded to 23.05.2

When I upgraded form 2203, the RTL 8156b`s status changed to HALF Duplex mode, and cannot be changed, Could anyone help me on this, thanks in advance.

below is the information.

root@OpenWrt:/lib/modules/5.15.137# uname -a
Linux OpenWrt 5.15.137 #0 SMP Tue Nov 14 13:38:11 2023 aarch64 GNU/Linux

root@OpenWrt:/lib/modules/5.15.137# ethtool eth1
Settings for eth1:
Supported ports: [ ]
Supported link modes: Not reported
Supported pause frame use: No
Supports auto-negotiation: No
Supported FEC modes: Not reported
Advertised link modes: Not reported
Advertised pause frame use: No
Advertised auto-negotiation: No
Advertised FEC modes: Not reported
Speed: 1000Mb/s
Duplex: Half
Auto-negotiation: off
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
MDI-X: Unknown
Current message level: 0x00000007 (7)
drv probe link
Link detected: yes

root@OpenWrt:/lib/modules/5.15.137# ethtool -s eth1 duplex full
netlink error: Not supported

root@OpenWrt:/lib/modules/5.15.137# modinfo r8152.ko
module: /lib/modules/5.15.137/r8152.ko
license: GPL
depends:
intree: Y
name: r8152
vermagic: 5.15.137 SMP mod_unload aarch64

1 Like

Could you have had a coincidental cable failure? In my experience, cables seem to be the major cause of this particular issue.

thanks for your share, but before upgrading, the NC and Cable were working well, I think this is a bug of 2305.

dmesg:
[ 1.699324] usb 2-2: New USB device found, idVendor=0bda, idProduct=8156, bcdDevice=31.00
[ 1.707520] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=7
[ 1.714675] usb 2-2: Product: USB 10/100/1G/2.5G LAN
[ 1.719677] usb 2-2: Manufacturer: Realtek
[ 1.723791] usb 2-2: SerialNumber: 001300E04C780293

Yeah, I should have looked harder at the ethtool output, where I'd expect something like this if the drivers were working.

        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
...

What do you see when you check the packages?

$ opkg info r8152-firmware
$ opkg info kmod-usb-net-rtl8152
1 Like

Hi efahl,
thanks for your support, here is the info:

root@OpenWrt:~# opkg info r8152-firmware
Package: r8152-firmware
Version: 20230804-1
Depends: libc
Status: install ok installed
Section: firmware
Architecture: aarch64_cortex-a72
Size: 11646
Filename: r8152-firmware_20230804-1_aarch64_cortex-a72.ipk
Description: RealTek RTL8152 firmware
Installed-Time: 1700904499

root@OpenWrt:~# opkg info kmod-usb-net-rtl8152
Package: kmod-usb-net-rtl8152
Version: 5.15.137-1
Depends: kernel (= 5.15.137-1-4d407d5f01a611de6825ef905c07d710), r8152-firmware, kmod-crypto-sha256, kmod-usb-net-cdc-ncm, kmod-usb-net
Status: install user installed
Section: kernel
Architecture: aarch64_cortex-a72
Size: 42507
Filename: kmod-usb-net-rtl8152_5.15.137-1_aarch64_cortex-a72.ipk
Description: Kernel module for USB-to-Ethernet Realtek 8152 USB2.0/3.0 convertors
Installed-Time: 1700904502

I found a topic on Github that seems could solve the problem, but i don't know how to apply the patch to the running binary OpenWrt system.

1 Like

you can't, need to recompile the kmod, as a bare minimum.

2 Likes

Yeah, looks like you've discovered the solution. Just need to keep poking at that PR to get it some exposure and hopefully it gets merged soon.

I see it got merged on main, so should show up in the next SNAPSHOT build. No backport appears to have been done yet...

Note that there are additional fixes coming up...

My simple approach ignored USB device authorization ( https://www.kernel.org/doc/Documentation/usb/authorization.txt ). Not sure if anyone is using that on OpenWrt, but in case you do then you'll want this fix from Douglas Anderson:

https://lore.kernel.org/all/20231201183113.343256-1-dianders@chromium.org/T/

1 Like

sounds good, just waiting for the next build.

Is the next build mean like the 23.05.3 .. to be like around feb-mar24 ?