|
|
Subscribe / Log in / New account

Dynamic USB device IDs

The market for USB devices is certainly dynamic; new gadgets are released at a high rate. Unfortunately, Linux kernels and their associated drivers are not always updated quite as quickly. The result can be that the kernel fails to recognize and drive a new gadget, even though existing drivers may be entirely capable of doing the job. The driver simply does not know that the device is one it can handle, so the kernel does not bind the two together.

Greg Kroah-Hartman has posted a simple patch which should help fix this situation. With the patch in place, each USB driver gets a new sysfs attribute (new_id). If a system administrator writes two values (the vendor and product ID numbers reported by the device) to that attribute, those numbers form a new device ID associated with the driver. Immediately after the write, the driver will recognize the device, and everybody will be happy. No changes to the drivers themselves are necessary. Of course, one could create confusion by associating a device with an inappropriate driver, but a bit of attention should suffice to avoid that problem.

This patch came out a bit late for 2.6.15, so it is more likely to show up in 2.6.16 or thereafter.

Index entries for this article
KernelDevice drivers
KernelUSB


to post comments

Dynamic USB device IDs

Posted Nov 23, 2005 11:42 UTC (Wed) by jcm (subscriber, #18262) [Link] (2 responses)

It'd be nice to see more of this kind of thing happening. Projects like DKMS already strive to make it easier to have devices detected and "just work" but this (semi obvious) patch helps more advanced users and admins to quickly get a device just installed. Perhaps this needs a userspace helper to allow a user to do this graphically.

Jon.

Dynamic USB device IDs

Posted Nov 24, 2005 13:45 UTC (Thu) by hadess (subscriber, #24252) [Link] (1 responses)

No. The point is to make the driver work "right now". It's something that you can already do with XFree96/X.org (using the DeviceID option IIRC), and with some kernel drivers (mainly storage ones).
Having the driver work straight away means that you can test it without recompiling a kernel. Then you should drop a mail for the ID to be added properly. It's just a work-around.

Dynamic USB device IDs

Posted Nov 24, 2005 14:09 UTC (Thu) by jcm (subscriber, #18262) [Link]

I understand. My point is that there's nothing to stop DKMS or some other project from using this new API to facilitate getting devices to work either.

Sure, we all recompile our kernels every 10 minutes, but in the real world where there are a million people stuck on some $version of a distro, it'd be real nice if we could have it work with newer devices with such a simple hack rather than have them jump through too many hoops.

The average user isn't going to drop a new device id table entry to lkml :-)

Jon.


Copyright © 2005, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds