On Sat, 3 Jan 1998, Henning Meier-Geinitz wrote:
> > ---> scanner produces some noise (about one second), after that
> > nothing happens, the light ist still turned on, xscanimage
> > doesnt't react anymore, cpu usage is near 100%, --> ctrl-c
100% cpu means the backend hangs in a loop and waits for some
status to change (by reading from I/O port again and again...)
> I tried to do some debugging and set SANE_DEBUG_SANEI_AB306. If I use
> a value of 4 or higher I can use the scanner, if its 3 or lower, the
> driver hangs. Some Output with SANE_DEBUG_SANEI_AB306=3:
Really loks like a timing problem ! Have you tried to use xscanimage
as "normal" user ? If you do so, make sure to make /dev/port accessable
for read and write to the user.
Background: I/O via /dev/port is very much slower than by direct
inb/outb assembler inline instructions (but these can only be used
if the program is executed by root or is run with the SUID bit set).
> [...]
> [sanei_ab306] ab306_write: waiting for scanner to be ready 14
> [sanei_ab306] ab306_write: waiting for scanner to be NOT ready b4
> [sanei_ab306] ab306_write: waiting for scanner to be ready 14
> [sanei_ab306] ab306_write: waiting for scanner to be NOT ready b4
> [sanei_ab306] ab306_write: waiting for scanner to be ready 14
> [sanei_ab306] ab306_write: waiting for scanner to be NOT ready b4
> ---> nothing happens, cpu-usage 100%
Probably this is when the backend wants to do the inquiry
(reading scanner type, firmware revision etc)
> Strange, isn't it? Perhaps a timing problem in sanei_ab306?
I'll have a look at it as I have the time. It is possible that
the hardware handshaking drops some status changes or asynchronously
always got what it wanted, without respect to the correct order of
events.
Regards,
Andreas.
-- Source code, list archive, and docs: http://www.mostang.com/sane/ To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com