Skip to contentSkip to conversation

Want to use hotplug

DISCUSSION Karl F. Larsen 2 participants 2 messages Nov 18, 2002 – Nov 21, 2002

lore
Share & tools
lore
#0 lore raw

I'm working on documentation for installing a scanner in Linux
and now that almost all scanners are USB port users we now need to load the scanner module and two hex numbers to the kernel as we boot up. I am doing it with insmod and /etc/modules.conf.

I'm told hotplug is easier and better, but I don't know how to
do it.

Signature · 12 lines
               - Karl Larsen k5di Las Cruces,NM Az ScQRPions -



-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing 
your web site with SSL, click here to get a FREE TRIAL of a Thawte 
Server Certificate: http://www.gothawte.com/rd524.html
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
#1 lore raw
Quoted 7 lines · Karl F. Larsen

I'm working on documentation for installing a scanner in Linux
and now that almost all scanners are USB port users we now need to load the scanner module and two hex numbers to the kernel as we boot up. I am doing it with insmod and /etc/modules.conf.

I'm told hotplug is easier and better, but I don't know how to
do it.Hmm, let's see. There are two basic ways you might be working:

- kernel driver. /etc/modules.conf would have the product and vendor ids as module parameters.

- user mode driver. how do those get set up? (this seems to be the direction for future scanner support.)

In both cases you'd likely create /etc/hotplug/usb/scanner.usermap to list the product and vendor ID for the scanners you're interested in. The 2.5 kernel driver doesn't have a MODULE_DEVICE_TABLE in the driver, which complicates things especially if you've got more than one kind of scanner But presumably you know how to deal with that issue if you're documenting current practice.

I'd basically expect some /etc/hotplug/usb/scanner shell script to do whatever magic is needed to let the user mode code know about the scanner. It might use the $REMOVER mechanism, which you'll see in /etc/hotplug/usb.agent, and ensure that specific usbfs device ($DEVICE) is accessible (chown/chmod) and published (symlink killed by $REMOVER?) to the user mode driver.

You can see http://linux-hotplug.sourceforge.net/?selected=usb
for background, some of which may help you.

- Dave

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel