Skip to content

Driver issue when using with r8157 / Wavlink 5G adapter #52

@rohityadavcloud

Description

@rohityadavcloud

When using Wavlink / r8157 adapter with Ubuntu 24.04.3 with Raspberry Pi5 with Linux kernel 6.8, the following is observed:

[   36.081296] usb 5-1: New USB device found, idVendor=0bda, idProduct=8157, bcdDevice=30.00
[   36.081310] usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=7
[   36.081313] usb 5-1: Product: USB 10/100/1G/2.5G/5G LAN
[   36.081316] usb 5-1: Manufacturer: Realtek
[   36.081318] usb 5-1: SerialNumber: 0003803F5DD27C25
[   36.343563] cdc_ncm 5-1:2.0: MAC-Address: 80:3f:5d:d2:7c:25
[   36.343579] cdc_ncm 5-1:2.0: setting rx_max = 16384
[   36.344186] cdc_ncm 5-1:2.0: setting tx_max = 16384
[   36.345190] cdc_ncm 5-1:2.0 eth1: register 'cdc_ncm' at usb-xhci-hcd.1-1, CDC NCM (NO ZLP), 80:3f:5d:d2:7c:25
[   36.417989] cdc_ncm 5-1:2.0 eth1: unregister 'cdc_ncm' usb-xhci-hcd.1-1, CDC NCM (NO ZLP)

[   40.603217] r8152 5-1:1.0 eth1: This product is covered by one or more of the following patents:
               		US6,570,884, US6,115,776, and US6,327,625.

[   85.246365] r8152 5-1:1.0 enx803f5dd27c25: Tx status -32
[   85.247028] r8152 5-1:1.0 enx803f5dd27c25: Tx status -71
[   85.247160] r8152 5-1:1.0 enx803f5dd27c25: Tx status -71
[   85.366595] r8152 5-1:1.0 enx803f5dd27c25: Tx status -71
[   85.366785] r8152 5-1:1.0 enx803f5dd27c25: Tx status -71
[   85.366930] r8152 5-1:1.0 enx803f5dd27c25: Tx status -71
[   85.367071] r8152 5-1:1.0 enx803f5dd27c25: Tx status -71
[   85.367211] r8152 5-1:1.0 enx803f5dd27c25: Tx status -71
[   85.501587] r8152 5-1:1.0 enx803f5dd27c25: Tx status -71
[   85.593515] r8152 5-1:1.0 enx803f5dd27c25: Tx status -71

[  338.140325] net_ratelimit: 31 callbacks suppressed
[  338.140349] r8152 5-1:1.0 enx803f5dd27c25: Tx status -71
[  338.142344] r8152 5-1:1.0 enx803f5dd27c25: Tx status -71
[  338.179297] r8152 5-1:1.0 enx803f5dd27c25: Tx status -71
[  338.187164] r8152 5-1:1.0 enx803f5dd27c25: Tx status -71
[  338.207491] r8152 5-1:1.0 enx803f5dd27c25: Tx status -71
[  338.329228] r8152 5-1:1.0 enx803f5dd27c25: Tx status -71
[  338.452638] r8152 5-1:1.0 enx803f5dd27c25: Tx status -71
[  338.476556] r8152 5-1:1.0 enx803f5dd27c25: Tx status -71
[  338.502683] r8152 5-1:1.0 enx803f5dd27c25: Tx status -71
[  338.520114] r8152 5-1:1.0 enx803f5dd27c25: Tx status -71
[  343.244537] net_ratelimit: 51 callbacks suppressed

The nic disconnected after every 30-odd seconds.

However, the same driver after upgrading to Ubuntu 25.04 on RPi5, with Linux kernel 6.14 (6.14.0-1012-raspi aarch64) seems to be working fine (uptime of more than a day) and working at full speed of 5000Mb/s.

root@cloudpi:/home/rohit# ethtool -i enx803f5dd27c25
driver: r8152
version: v2.20.1 (2025/05/13)
firmware-version:
expansion-rom-version:
bus-info: usb-xhci-hcd.0-1
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: no
supports-priv-flags: no

root@cloudpi:/home/rohit# ethtool  enx803f5dd27c25
Settings for enx803f5dd27c25:
	Supported ports: [ MII ]
	Supported link modes:   10baseT/Half 10baseT/Full
	                        100baseT/Half 100baseT/Full
	                        1000baseT/Full
	                        2500baseT/Full
	                        5000baseT/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
	                        5000baseT/Full
	Advertised pause frame use: No
	Advertised auto-negotiation: Yes
	Advertised FEC modes: Not reported
	Link partner advertised link modes:  100baseT/Half 100baseT/Full
	                                     1000baseT/Half 1000baseT/Full
	                                     10000baseT/Full
	                                     2500baseT/Full
	                                     5000baseT/Full
	Link partner advertised pause frame use: No
	Link partner advertised auto-negotiation: Yes
	Link partner advertised FEC modes: Not reported
	Speed: 5000Mb/s
	Duplex: Full
	Auto-negotiation: on
	Port: MII
	PHYAD: 20
	Transceiver: internal
	Supports Wake-on: pumbg
	Wake-on: d
        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

The only additional workaround I had to use was to turn off sg:

root@cloudpi:/home/rohit# cat /etc/networkd-dispatcher/routable.d/post-up.sh
#!/bin/sh
/usr/sbin/ethtool -K enx803f5dd27c25 sg off

Does the drive need anything to manage RX/TX buffers better out of the box?

root@cloudpi:/home/rohit# ethtool -g  enx803f5dd27c25
Ring parameters for enx803f5dd27c25:
Pre-set maximums:
RX:			4096
RX Mini:		n/a
RX Jumbo:		n/a
TX:			n/a
TX push buff len:	n/a
Current hardware settings:
RX:			100
RX Mini:		n/a
RX Jumbo:		n/a
TX:			n/a
RX Buf Len:		n/a
CQE Size:		n/a
TX Push:		off
RX Push:		off
TX push buff len:	n/a
TCP data split:		n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions