USB controller enumeration on APU3 is random since the update to kernel 6.6
Florian Eckert
fe at dev.tdt.de
Wed Jul 17 05:29:10 PDT 2024
Hello Felix,
thanks for your reply.
>> 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?
>
> I think the most likely cause is more parallelization in device probe
> in order to speed up boot time. Not sure if there is a way to make it
> deterministic, but even if there is, it might still change across
> kernel upgrades.
I have already thought that this is probably due to when the device is
ready and then the driver is loaded to speed up the load time during
boot.
> In my opinion, the best course of action is to just deal with it by
> changing the code to no longer rely on usbX names. Better make it
> depend on the sysfs path, similar to wifi-device path handling in the
> wireless config.
I am already using the sysfs path, but if the usbX name changes then
also the
sysfs path changes as well! See the devices I have attached '->'. Or am
I
misunderstanding you?
Boot 1:
root at G3-10940 /sys/bus/usb/devices # ls -la | grep usb
lrwxrwxrwx 1 root root 0 Jul 17 12:56 1-0:1.0 ->
../../../devices/pci0000:00/0000:00:12.0/usb1/1-0:1.0
lrwxrwxrwx 1 root root 0 Jul 17 12:56 1-1 ->
../../../devices/pci0000:00/0000:00:12.0/usb1/1-1
lrwxrwxrwx 1 root root 0 Jul 17 12:56 1-1.2 ->
../../../devices/pci0000:00/0000:00:12.0/usb1/1-1/1-1.2
lrwxrwxrwx 1 root root 0 Jul 17 12:56 1-1.2:1.0 ->
../../../devices/pci0000:00/0000:00:12.0/usb1/1-1/1-1.2/1-1.2:1.0
lrwxrwxrwx 1 root root 0 Jul 17 12:56 1-1:1.0 ->
../../../devices/pci0000:00/0000:00:12.0/usb1/1-1/1-1:1.0
lrwxrwxrwx 1 root root 0 Jul 17 12:56 2-0:1.0 ->
../../../devices/pci0000:00/0000:00:13.0/usb2/2-0:1.0
lrwxrwxrwx 1 root root 0 Jul 17 12:56 2-1 ->
../../../devices/pci0000:00/0000:00:13.0/usb2/2-1
lrwxrwxrwx 1 root root 0 Jul 17 12:56 2-1.3 ->
../../../devices/pci0000:00/0000:00:13.0/usb2/2-1/2-1.3
-> lrwxrwxrwx 1 root root 0 Jul 17 12:56 2-1.3:1.0 ->
../../../devices/pci0000:00/0000:00:13.0/usb2/2-1/2-1.3/2-1.3:1.0
-> lrwxrwxrwx 1 root root 0 Jul 17 12:56 2-1.3:1.1 ->
../../../devices/pci0000:00/0000:00:13.0/usb2/2-1/2-1.3/2-1.3:1.1
-> lrwxrwxrwx 1 root root 0 Jul 17 12:56 2-1.3:1.2 ->
../../../devices/pci0000:00/0000:00:13.0/usb2/2-1/2-1.3/2-1.3:1.2
-> lrwxrwxrwx 1 root root 0 Jul 17 12:56 2-1.3:1.3 ->
../../../devices/pci0000:00/0000:00:13.0/usb2/2-1/2-1.3/2-1.3:1.3
lrwxrwxrwx 1 root root 0 Jul 17 12:56 2-1.3:1.4 ->
../../../devices/pci0000:00/0000:00:13.0/usb2/2-1/2-1.3/2-1.3:1.4
lrwxrwxrwx 1 root root 0 Jul 17 12:56 2-1:1.0 ->
../../../devices/pci0000:00/0000:00:13.0/usb2/2-1/2-1:1.0
lrwxrwxrwx 1 root root 0 Jul 17 12:56 3-0:1.0 ->
../../../devices/pci0000:00/0000:00:10.0/usb3/3-0:1.0
lrwxrwxrwx 1 root root 0 Jul 17 12:56 4-0:1.0 ->
../../../devices/pci0000:00/0000:00:10.0/usb4/4-0:1.0
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
Boot 2:
root at G3-10940 /sys/bus/usb/devices # ls -la | grep usb
lrwxrwxrwx 1 root root 0 Jul 17 12:43 1-0:1.0 ->
../../../devices/pci0000:00/0000:00:13.0/usb1/1-0:1.0
lrwxrwxrwx 1 root root 0 Jul 17 12:43 1-1 ->
../../../devices/pci0000:00/0000:00:13.0/usb1/1-1
lrwxrwxrwx 1 root root 0 Jul 17 12:43 1-1.3 ->
../../../devices/pci0000:00/0000:00:13.0/usb1/1-1/1-1.3
-> lrwxrwxrwx 1 root root 0 Jul 17 12:43 1-1.3:1.0 ->
../../../devices/pci0000:00/0000:00:13.0/usb1/1-1/1-1.3/1-1.3:1.0
-> lrwxrwxrwx 1 root root 0 Jul 17 12:43 1-1.3:1.1 ->
../../../devices/pci0000:00/0000:00:13.0/usb1/1-1/1-1.3/1-1.3:1.1
-> lrwxrwxrwx 1 root root 0 Jul 17 12:43 1-1.3:1.2 ->
../../../devices/pci0000:00/0000:00:13.0/usb1/1-1/1-1.3/1-1.3:1.2
-> lrwxrwxrwx 1 root root 0 Jul 17 12:43 1-1.3:1.3 ->
../../../devices/pci0000:00/0000:00:13.0/usb1/1-1/1-1.3/1-1.3:1.3
lrwxrwxrwx 1 root root 0 Jul 17 12:43 1-1.3:1.4 ->
../../../devices/pci0000:00/0000:00:13.0/usb1/1-1/1-1.3/1-1.3:1.4
lrwxrwxrwx 1 root root 0 Jul 17 12:43 1-1:1.0 ->
../../../devices/pci0000:00/0000:00:13.0/usb1/1-1/1-1:1.0
lrwxrwxrwx 1 root root 0 Jul 17 12:43 2-0:1.0 ->
../../../devices/pci0000:00/0000:00:12.0/usb2/2-0:1.0
lrwxrwxrwx 1 root root 0 Jul 17 12:43 2-1 ->
../../../devices/pci0000:00/0000:00:12.0/usb2/2-1
lrwxrwxrwx 1 root root 0 Jul 17 12:43 2-1.2 ->
../../../devices/pci0000:00/0000:00:12.0/usb2/2-1/2-1.2
lrwxrwxrwx 1 root root 0 Jul 17 12:43 2-1.2:1.0 ->
../../../devices/pci0000:00/0000:00:12.0/usb2/2-1/2-1.2/2-1.2:1.0
lrwxrwxrwx 1 root root 0 Jul 17 12:43 2-1:1.0 ->
../../../devices/pci0000:00/0000:00:12.0/usb2/2-1/2-1:1.0
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
Best regards
Florian
More information about the openwrt-devel
mailing list