Re: My $0.02 on devd and devfs

Benny Amorsen (bamorsen@netvision.dk)
12 Oct 1999 22:40:24 +0200


>>>>> "dp" == david parsons <orc@pell.portland.or.us> writes:

dp> In article
dp> <linux.kernel.199910120618.DAA04453@sleipnir.valparaiso.cl>, Horst
dp> von Brand <vonbrand@sleipnir.valparaiso.cl> wrote:

HvB>> Nope. devd is notified when the device shows up.

dp> How?

dp> If /dev/printer/0 will be a PC-style parallel port, and I've
dp> built the driver as a module, the device has shown up when the
dp> machine is built, but the driver is sitting there waiting for kmod
dp> to drag it into core.

Modern busses can tell which hardware is currently connected without
speculatively loading drivers. PCMCIA, USB, and PCI are examples. I
thought that modern devices connecting to the parallel port supported
that too, but I might be wrong of course.

dp> If the file /dev/printer/0 doesn't exist, I can't open it and
dp> can't tell kmod to load the driver.

It could be created at device detection time -- that is right after
the device is connected.

dp> So what I need to do is either discard modules altogether or
dp> do a speculative load of every driver module in the system at
dp> bootup so that I can generate the appropriate detect messages for
dp> devd to populate /dev. If I have to jump through all of these
dp> hoops, what do I gain over just populating /dev with every
dp> possible device?

You just populate it with the devices from /proc/bus/*.

Benny

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/