Re: device driver automatic load/unload]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 31 Jul 2009, Viral Mehta wrote:

> >> And my answer to this question is this is where modules.usbmap is used 
> >> and also when I connect USB device to my machine, some policy agents 
> >> reads modules.usbmap file and extracts information and must be calling 
> >> usbcore function. Then in turn usbcore will load/probe appropriate 
> >> device driver and NOT usbcore itself goes through list and decides about 
> >> which driver to load.
> >>     
> >
> > No, it is userspace that does this determination, not the kernel itself.
> > A combination of udev and modprobe does the work.
> >   
> If so, I strongly feel that below line from Documentation/hotplug.txt 
> should be removed/changed.
> 
> "When the USB subsystem knows about a driver's device ID table, it's 
> used when choosing drivers to probe()..."
> 
> The word "USB subsystem" creates confusion. It gives me a sense that 
> everything is happening BY usb subsytem FROM looking at driver's device 
> ID table and which is not true as discussed.

Unfortunately, quite a lot of the material in
Documentation/usb/hotplug.txt is sadly out of date.  However the
sentence you quoted is not.

The sentence is accurate.  "USB subsystem" refers to part of the
kernel; there is no USB subsystem in userspace.  Furthermore the udev
and modprobe programs don't choose drivers to _probe_; they choose
drivers to _load_.  The decision about which drivers to probe is made
entirely by the USB subsystem in the kernel, based on the drivers'
device ID tables.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux