The C Source, Patches and (shudder!) Bugs
Post Reply
ncarrier
Posts: 36
Joined: 02 Nov 2011, 18:05

Regression for LG 2110TI with 20121109 udev rule

Post by ncarrier » 22 Nov 2012, 11:42

Hello,
Removing the 'S' from the matching no USB Ids in udev rule had an unsuspected side-effect introducing a regression of LG 2110TI dongle.

This dongle appears as a hub, to which is connected the modem and the mass storage, with each three having a different USB Ids pair. Hub and mass-storage having even a different vendor Id than that of the modem...

In the dispatcher, a dev_top variable is computed, which goes up one step from that of the device which triggered the rule.
Hence usb_modeswitch seems to try to talk to the hub rather than to the modem.

Overwriting dev_top with :

Code: Select all

set dev_top [lindex $argList 1]
before the devdir variable definition

Code: Select all

set devdir /sys/bus/usb/devices/$dev_top
fixes the regression for me.

One can also note that Adding back the 'S' to both ATTRS{idProduct} and ATTRS{idVendor} in the rule fixes the issue too, but must trigger on additional irrelevant event.

Removing the 'S' is a good idea for performance, but for what I understand, the devdir variable should stay to what udev gave us.

As you can see, I don't master usb_modeswitch's code yet, so I think you should come up with a far better patch than mine.

If you need additional information, I can borrow the dongle one more time and provide you any trace you think is necessary.

Post Reply