[sane-devel] sane, 2.6 + hotplug scripts

Bertrik Sikken bertrik@zonnet.nl
Fri, 23 Apr 2004 18:17:26 +0200

Oliver Schwartz wrote:

> Hash: SHA1
> Hi,
> On Friday 23 April 2004 14.38, Jago Pearce wrote:
>>- recompiled sane with libusb support
>>- added hotplugging support to the kernel
>>- copied tools/hotplug/libsane.usermap and libusbscanner to
>>- verified my scanner (acer640U) is in libsane.usermap
>>- ran /etc/init.d/hotplug restart
>>With the presence of libsane.usermap in /etc/hotplug/usb/ that
>>start up scripts go crazy
>>outputting stff to the screen. /proc/bus/usb/ permissions remain as
> the hotplug handling changed significantly from kernel 2.4 to 2.6, if 
> I read the documentation correctly it even changed from 2.5 to 2.6. 
> If you upgrade your kernel to 2.6 you should definitely upgrade the 
> hotplug package as well.
> I've seen strange things happen on my machine as well with old hotplug 
> scripts (Suse 8.2, upgraded to Suse kernel 2.6.5, 
> hotplug-2002-08-26). It seems that the hotplug script re-detects the 
> scanner after each scan. This sometimes causes the frontend to hang 
> when starting a new scan. I have a feeling that this also accounts 
> for some of the other problems people have using SANE on 2.6.

I've seen that a call to the libusb function usb_set_configuration
causes a new hotplug 'add' event.
Perhaps this accounts for some of the script crazyness?