wansion
November 30, 2023, 4:44am
1
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
efahl
November 30, 2023, 4:47pm
2
wansion:
Duplex: Half
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
efahl
December 1, 2023, 1:43am
5
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.
openwrt:main
← mj22226:pr-r8152
opened 09:34PM - 26 Nov 23 UTC
Fixes several issues with rtl8156 USB adapters
```
OpenWrt:/# 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: 2500Mb/s
Duplex: Half
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: off
MDI-X: Unknown
Current message level: 0x00000007 (7)
drv probe link
Link detected: yes
```
Applying the patches :
```
OpenWrt:/# ethtool eth1
Settings for eth1:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
2500baseT/Full
Supported pause frame use: No
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
2500baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
2500baseT/Full
Link partner advertised pause frame use: No
Link partner advertised auto-negotiation: Yes
Link partner advertised FEC modes: Not reported
Speed: 2500Mb/s
Duplex: Full
Auto-negotiation: on
Port: MII
PHYAD: 32
Transceiver: internal
Supports Wake-on: pumbg
Wake-on: g
Current message level: 0x00007fff (32767)
drv probe link timer ifdown ifup rx_err tx_err tx_queued intr tx_done rx_status pktdata hw wol
Link detected: yes
```
1 Like
you can't, need to recompile the kmod, as a bare minimum.
2 Likes
efahl
December 1, 2023, 6:52pm
9
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.
efahl
December 3, 2023, 5:21pm
10
I see it got merged on main, so should show up in the next SNAPSHOT build. No backport appears to have been done yet...
bmork
December 3, 2023, 8:14pm
11
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
wansion
December 4, 2023, 1:29am
12
sounds good, just waiting for the next build.
Docop3
December 10, 2023, 8:13pm
13
Is the next build mean like the 23.05.3 .. to be like around feb-mar24 ?