Udev and hotplug in testing

John McSwain jmcswain at infoave.net
Tue Aug 10 10:36:01 PDT 2004

Gerard Beekmans wrote:
> On Tue, 2004-08-10 at 08:58, John McSwain wrote:
>> Kevin and others, is the above true and valid?
> It sounds good to me. I agree with the others that we should be
> careful with mentioning the hotplug package as to prevent unnecessary
> questions.
Here is a change.  Not sure it is entirely correct (first sentence
second paragraph) though:
Handling hotpluggable/dynamic devices
When you plug in a device, e.g. a USB MP3 player, the kernel recognizes
that the device is now connected and generates a hotplug event. If the
driver is already loaded (either because it was compiled into the
kernel, or it was loaded via the S05modules bootscript) udev will simply
be called upon to create the relevant device node according to the sysfs
data available in /sys.  If the driver is an available module, but
currently unloaded, then plugging the device in will not cause anything
to happen except for  a hotplug event from the bus driver notifying
userspace that a new device has been plugged in (but not attached to a
driver, since none is loaded).

On systems that have many hotpluggable/dynamic devices it is neither
practical nor prudent to have all the drivers compiled into the kernel
or loaded as modules all the time.  If you are building such a system
you will need to investigate the Hotplug package (see
http://linux-hotplug.sourceforge.net/ ).  If the hotplug package  is not
installed and active when a hotplug event occurs without its driver
loaded it will be ignored by userspace. No driver will be loaded and the
device will not be functional. If the hotplug package is installed and
active, it will respond to this hotplug event by causing the proper
driver module to get loaded. Once the module is loaded the same process
will happen as if the driver had already been loaded.

John McSwain

More information about the lfs-dev mailing list