Linux modules question
andrew.jorgensen at gmail.com
Thu Mar 9 20:43:36 MST 2006
On 3/9/06, Charles Curley <charlescurley at charlescurley.com> wrote:
> On Thu, Mar 09, 2006 at 08:34:33AM -0700, Andrew Jorgensen wrote:
> > I have one of those USB phone handsets. It's a usb-audio device and
> > an HID device (with an LCD display even ;-).
> > So the question is: What gives? Presuming I want the generic driver
> > to also be present (for other devices) is there no way around this?
> > Who's fault is it? udev? the kernel? I'm using Ubuntu Dapper
> > (development). They don't use hotplug anymore, only udev.
> It's udev's issue. udev is very poorly documented, alas.
> Basically you need to cobble together a definition for your device,
> and set udev to load it under certain circumstances, i.e. when the
> device is inserted into the USB plug.
> You put that definition ahead of the generic definitions so it is
> examined first. And you do that by how you name the file.
> If another HID device is inserted, your definition (being narrow
> enough to only fit your device) fails, and udev continues on to find
> the generic HID device. No worries.
I'll give this a try. That will mean learning udev I suppose... I
wonder if that's really the way to fix it though. It looks like the
already-loaded usbhid module grabs the device before udev or anyone
else even has a chance. I don't know enough about the kernel to know
what the process is. Is it possible that there is something wrong
with the way the yealink module was written?
I've been noticing also that whatever loads modules is loading all the
modules that claim to support the device. For example I have a Prism
II wifi card, when I insert it both the orinoco_cs and the hostap_cs
drivers get loaded. The orinoco_cs driver wins, perhaps because it
was loaded first. Seems like a waste of time and resources to load
both. I'll probably submit a bug report to the Ubuntu devs about
How does the kernel know what driver to associate with what device?
More information about the PLUG