David Brownell wrote:
>
> > > Or were you talking about extracting the device information from the
> > > module?
> >
> > Exactly.
>
> That can be done, but it seems like a lot more coding than just
> providing shell scripts for each driver.
I don't see how shell scripts can provide this functionality?
> Eventually, it'd make
> more sense not to compile specific device IDs into drivers.
Why?
Adding support for a device in a driver will at least force you to recompile
the driver, so you do not create extra work. It would also automatically
update your bindings when you upgrade the driver.
> > Modules can then be loaded by that userlevel daemon or the kernel
> > itself. (I think the userspace solution has greater flexibility though.)
>
> And lower overall cost too. The userspace code (and tables) need only
> be loaded when they're really needed. If I enable KUSBD, I've paid a
> miniscule cost in code space, but I can plug in any of my USB devices
> and know their drivers will be loaded automatically.
>
> > This limits adding a driver to copying a file in a modules/*/ directory
> > and running depmod.
>
> Then there's the question of what plugging it in will do to the rest
> of the system ... a new printer should maybe tell CUPS about itself,
> for example. It'll probably want to have an /etc/usb/config/* script
> run after it's loaded, and maybe some application code (demos, etc).
true, but what I meant to suggest was that you don't have to adjust config
files of the deamon to let it know which driver to load. It can figure that
out itself.
You will still have to configure the rest of the system to use the
driver/device, but that can be covered by the shell scripts.
Just to avoid confusion, I don't want to replace the scripts with some data in
the module, that would create more work and not to mention a headache ;-).
Only the device-driver binding data belongs there. A driver probe()s for a
specific (set of) device(s), so it already carries the data implicitly. I
would just export this data from the module directly to the daemon. It would
at least reduce chances of confusion and errors.
J.
--
________
/---------------------------------\ /--------------------\
| Johan Verrept \ / Alcatel |
| Software Development Engineer \ / De Villermontstr 38|
| xDSL Customer Premises Equipment \/ B-2550 Kontich |
| http://www.alcateldsl.com/ ALC/\TEL Belgium |
| mailto:[EMAIL PROTECTED] Phone: +32 3 450 3506 |
\-------------------------------------------------------------/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]