The C Source, Patches and (shudder!) Bugs
Post Reply
lkundrak
Posts: 24
Joined: 22 Jun 2016, 14:17

usb-modeswitch-data 20160612 breaks module loading

Post by lkundrak » 24 Jul 2016, 11:21

Hi.

For some modems the device IDs are still missing in the Linux source.

The ChangeLog says this:

Code: Select all

20160612:
...
    "NoDriverLoading" parameter removed from all configs, with respect
    to removed feature in usb-modeswitch 2.4.0
However the quick look at usb-modeswitch 2.4.0 reveals the option is still there and it was even nor removed from the usb-modeswitch-data 20160612 files.

However, what was removed was the UDev rule to do the binding:

Code: Select all

# Adds the device ID to the "option" driver after a warm boot
# in cases when the device is yet unknown to the driver; checked
# against a list of known modems, or else no action
ATTR{bInterfaceClass}=="ff", ATTR{bInterfaceNumber}=="00", ATTRS{bNumConfigurations}=="*", RUN+="usb_modeswitch --driver-bind %p %s{idVendor} %s{idProduct} %E{PRODUCT}"
It was not removed from the gen-rules.tcl though. Therefore the generated rules file no longer corresponds tu what is shipped in the tarball.

What was the desired intent here? How should the distribution maintainers handle this? Is the driver binding feature/hack being removed?

Thanks
Lubo

lkundrak
Posts: 24
Joined: 22 Jun 2016, 14:17

Re: usb-modeswitch-data 20160612 breaks module loading

Post by lkundrak » 24 Jul 2016, 16:10

Ok, I get it now. I didn't read the ChangeLog before; sorry for that.

Nevertheless, the usb-modeswitch-data is still a bit chaotic: NoDriverLoading has not been removed contrary to what ChangeLog claims and the generated rule file still tries to bind the drivers. That perhaps still needs fixing.

Also, there probably still are devices without proper aliases in Linux kernel drivers. At least one of my devices was not recognized (patch sent) and by the quick look at the device list I suspect there are more (e.g. 0408:ea16 and 0408:ea26 -- can't test them as I don't have the hardware). Those are going to fail silently now.

I'm wondering if a warning message could be produced if there are interfaces with no driver bound after the mode switch, so that users could report those and the driver could be fixed?

Lubo

LOM
Posts: 1404
Joined: 11 Jul 2012, 15:14
Location: Koh Samui, TH

Re: usb-modeswitch-data 20160612 breaks module loading

Post by LOM » 25 Jul 2016, 05:02

lkundrak wrote: Nevertheless, the usb-modeswitch-data is still a bit chaotic: NoDriverLoading has not been removed contrary to what ChangeLog claims and the generated rule file still tries to bind the drivers. That perhaps still needs fixing.
It is only a matter of cleaning up old code, probably forgotten by Josh during a late night package production session..

lkundrak wrote: Also, there probably still are devices without proper aliases in Linux kernel drivers. At least one of my devices was not recognized (patch sent)
So you recognized this because usb_modeswitch does no longer mask the lack of real driver support. Good! 8)

lkundrak wrote: and by the quick look at the device list I suspect there are more (e.g. 0408:ea16 and 0408:ea26 -- can't test them as I don't have the hardware). Those are going to fail silently now.
Yes, so users who want to have them supported must do something to get them supported, usb_modeswitch is a mode switching tool and not a driver loading tool.

lkundrak wrote: I'm wondering if a warning message could be produced if there are interfaces with no driver bound after the mode switch, so that users could report those and the driver could be fixed?

There is often interfaces which should be excluded from serial driver binding so it is not possible to check that all interfaces has a driver attached, you can not automate this unless you have a database of interface numbers by usb id.
There was a warning message in the past when usb_modeswitch had loaded the option driver and used the new_id function for binding the driver. The result was not more devices being reported to linux maintainers for driver support, most users didn't care to do that because of the "it is working for me, why care" syndrome.
The few reported cases were mostly false positives due to detection timing errors.

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Re: usb-modeswitch-data 20160612 breaks module loading

Post by Josh » 25 Jul 2016, 09:06

I'll issue a bugfix release of the data package, with some proper clean-up.

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Re: usb-modeswitch-data 20160612 breaks module loading

Post by Josh » 25 Jul 2016, 09:14

Regarding the module loading - there were cases reported by Dan Williams (Network Manager, modemmanager) where the module loading of usb_modeswitch interfered with the kernel module loading.

For serial modems that are not yet explicitely supported by the "option" driver, the manual remedy is relatively easy to apply: load the module, add the modem ID through the "new_id" interface.

Should be no problem for the mostly professional users of those stable but dated 'enterprise' distributions.

Recent modems on the other hand tend to move away from serial ports anyway.

LOM
Posts: 1404
Joined: 11 Jul 2012, 15:14
Location: Koh Samui, TH

Re: usb-modeswitch-data 20160612 breaks module loading

Post by LOM » 25 Jul 2016, 09:33

Josh wrote:I'll issue a bugfix release of the data package, with some proper clean-up.
I have a long long list of devices to add and a few corrections of present ones, can we include those at the same time?

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Re: usb-modeswitch-data 20160612 breaks module loading

Post by Josh » 25 Jul 2016, 11:38

LOM wrote:I have a long long list of devices to add and a few corrections of present ones, can we include those at the same time?
Sure!

Post Reply