On Thu, 18 Mar 2004, Alan Stern wrote:

> > Hotplug would be the only interesting one running at the same time.
> 
> Of course!  Just put the clues together, Watson!
> 
>      1. Problem is caused by control messages, but strace shows iscan
>       only uses bulk messages.
> 
>      2. You observe an excessive amount of hotplug activity.

I call it excessive because I wonder if it's correct to feed a hotplug
event just because $USER_SPACE_PROGRAM has decided to open a
/proc/bus/usb/MMM/NNN device.

>      3. No such problems exist under 2.4.

Well, 2.4 is not 100% stable, I've had it lock up with vuescan (the one
that works for 2.6 most of the time) three hours ago as well.

> Conclusion: the hotplug programs are submitting the control requests and 
> confusing the scanner.

Might be.

> What version of the hotplug package do you have installed?

2002_08_26-22 (as shipped with SuSE Linux 8.2)

To answer further questions, I changed /etc/hotplug/usb.usermap adding
this line:

epson_scanner 0x0003 0x04b8 0x0110 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 
0x00000000

And /etc/hotplug/usb/epson_scanner is:

------------------------------------------------------------------------
#! /bin/sh

if [ "$ACTION" = add ] && [ -f "$DEVICE" ] ; then
        chown root.trusted "$DEVICE"
        chmod 0660 "$DEVICE"
fi
------------------------------------------------------------------------
(Yes I know that [(1) supports the -a option -- it's just an old habit
of using && and separate [(1) commands instead.)

This works with 2.6 but not 2.4 (it never gets executed under 2.4, but I
run chmod 0666 /proc/bus/usb/003/002 manually on 2.4 before trying to
scan).

> I'll have to look more deeply to see why it's starting up so many times 
> and why it's using timeouts that are way too short.  In the meantime, you 
> could simply try disabling hotplug entirely.  See if that doesn't fix the 
> problem.

I'll try replacing /sbin/hotplug by /bin/true and also updating the
hotplug package.

> > > Attached are versions of the patch for both 2.6 and 2.4.  It will be 
> > > interesting to compare the results.
> > 
> > I wonder if it will really be interesting.
> > 
> > Linux 2.4 produces no more proc_control: logs after starting iscan, but
> > I have successfully done a preview and then a full scan in 400 dpi of an
> > ISO-A4 sheet - this should amount to c. 46 MB data through USB 1.1.
> > 
> > I'm gzipping the logs as they are 50 kByte each and gain >= 90%.
> 
> Clearly there's a difference between when the two kernels generate hotplug 
> events.  I'll look into that too.

For sure, 2.4 has severely lacking coldplug support, as mentioned above.
Might of course be that a newer hotplug package fixes _that_, I've never
bothered much. sudo chmod 0666 /proc/bus/usb/003/002
happens to be in my shell's history. :)

> In any case, the control requests being submitted by the hotplug program 
> are completely unnecessary.  They are asking the scanner to transmit data 
> which the kernel already knows and makes available through sysfs.

Seems as though scanners were not necessarily multi-tasking devices ;)

-- 
Matthias Andree

Encrypt your mail: my GnuPG key ID is 0x052E7D95


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to