USB-LAN Bug, How to fix

Debug logread -e netifd

Sat Apr 20 11:11:13 2024 daemon.err netifd[7610]: device_set_present(955): Network device 'eth1' is now present
Sat Apr 20 11:11:13 2024 daemon.err netifd[7610]: device_claim(694): Claim Network device eth1, new active count: 1
Sat Apr 20 11:11:13 2024 daemon.err netifd[7610]: device_set_present(955): Network device 'eth1' is no longer present
Sat Apr 20 11:11:13 2024 daemon.err netifd[7610]: device_release(735): Release Network device eth1, new active count: 0
Sat Apr 20 11:11:13 2024 daemon.err netifd[7610]: device_set_present(955): Network device 'eth1' is now present
Sat Apr 20 11:11:13 2024 daemon.err netifd[7610]: device_claim(694): Claim Network device eth1, new active count: 1
Sat Apr 20 11:11:13 2024 daemon.notice netifd: Network device 'eth1' link is up
Sat Apr 20 11:11:13 2024 daemon.err netifd[7610]: device_claim(718): claim Network device eth1 failed: -1
Sat Apr 20 11:11:13 2024 daemon.notice netifd: Network device 'eth1' link is down

dmesg

[ 1202.914306] usb 2-2: new SuperSpeed USB device number 6 using xhci_hcd
[ 1202.948004] cdc_ether 2-2:2.0 eth1: register 'cdc_ether' at usb-0000:00:14.0-2, CDC Ethernet Device, 28:ee:52:05:2c:d7
[ 1202.949911] cdc_ether 2-2:2.0 eth1: unregister 'cdc_ether' usb-0000:00:14.0-2, CDC Ethernet Device
[ 1202.950119] br-lan: port 1(eth1) entered blocking state
[ 1202.951135] br-lan: port 1(eth1) entered disabled state
[ 1202.951709] device eth1 entered promiscuous mode
[ 1202.952149] br-lan: port 1(eth1) entered blocking state
[ 1202.952611] br-lan: port 1(eth1) entered forwarding state
[ 1202.953767] br-lan: port 1(eth1) entered disabled state
[ 1202.954330] device eth1 left promiscuous mode
[ 1202.954704] br-lan: port 1(eth1) entered disabled state
[ 1203.274718] r8152-cfgselector 2-2: reset SuperSpeed USB device number 6 using xhci_hcd
[ 1203.333262] r8152 2-2:1.0: load rtl8153a-3 v2 02/07/20 successfully
[ 1203.376263] r8152 2-2:1.0 eth1: v1.12.13

How to fix usb-lan adapter not automatically up unless service network restart

Uncheck "bring up on boot", do ifup manually?


config interface 'loopback'
	option device 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix 'auto'
	option packet_steering '1'

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'eth1'
	list ports 'vlan.13'
	list ports 'vlan.22'

config device
	option vid '22'
	option ifname 'eth0'
	option name 'vlan.22'
	option type '8021q'

config device
	option vid '13'
	option ifname 'eth0'
	option name 'vlan.13'
	option type '8021q'

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option ipaddr '192.168.1.1'
	option netmask '255.255.255.0'

here's my network config, if i unplug and plug usb-lan from usb port. usblan or eth1 not automatically up or add to bridge port, and if i execute 'ubus call network restart;' and 'service nework restart' it work perfectly. but if i do reboot the bug still the same.

if i remove list port vlan.13 and vlan.22 it works 100%

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'eth1'
	list ports 'vlan.13'
	list ports 'vlan.22'

this config works on v22.03.5