USB controller enumeration on APU3 is random since the update to kernel 6.6

Florian Eckert fe at dev.tdt.de
Wed Jul 17 04:10:10 PDT 2024


Hello Dev´s,

I hope someone can help me here. I have noticed since the
kernel update in the master branch of OpenWrt to 6.6 that
the enumeration of the USB host controllers is suddenly
randomly.

This has been encountered on the APU3 board from PCengine[1].

That wasn't the case with the 5.15 kernel before, or I didn't
notice it. I also don't know if it must have fixed paths
so that the USB host controllers always have the same path.

Boot1
lrwxrwxrwx    1 root     root             0 Jul 17 12:43 usb1 -> 
../../../devices/pci0000:00/0000:00:13.0/usb1
lrwxrwxrwx    1 root     root             0 Jul 17 12:43 usb2 -> 
../../../devices/pci0000:00/0000:00:12.0/usb2
lrwxrwxrwx    1 root     root             0 Jul 17 12:43 usb3 -> 
../../../devices/pci0000:00/0000:00:10.0/usb3
lrwxrwxrwx    1 root     root             0 Jul 17 12:43 usb4 -> 
../../../devices/pci0000:00/0000:00:10.0/usb4

Boot2
lrwxrwxrwx    1 root     root             0 Jul 17 12:56 usb1 -> 
../../../devices/pci0000:00/0000:00:12.0/usb1
lrwxrwxrwx    1 root     root             0 Jul 17 12:56 usb2 -> 
../../../devices/pci0000:00/0000:00:13.0/usb2
lrwxrwxrwx    1 root     root             0 Jul 17 12:56 usb3 -> 
../../../devices/pci0000:00/0000:00:10.0/usb3
lrwxrwxrwx    1 root     root             0 Jul 17 12:56 usb4 -> 
../../../devices/pci0000:00/0000:00:10.0/usb4

As you can see the usb1 and usb2 are swapped!

The problem now is that the ModemManager is using the syspath
to reference the modem in the uci configuration [2]. If the modem's
syspath is now random, the system can no longer find the modem and
cannot establish a connection.

1. Does anyone have the same problem?
2. Is the path of usb<x> randomly intentional?
3. Can I somehow force the path across a restart?

Best regards

Florian


[1] https://pcengines.ch/apu3d4.htm
[2] 
https://github.com/openwrt/packages/blob/master/net/modemmanager/files/lib/netifd/proto/modemmanager.sh#L444





More information about the openwrt-devel mailing list