Re: Microtek woes

Didier Carlier (
Tue, 10 Mar 1998 15:52:30 +0100 said:
> I've been looking into why the Microtek backend has suddenly started
> dying with sane-0.71....

With some scanners (the coolscan is one) the only way to check whether the
device is busy is to sent it the 'test unit ready' to which the reply is
'check condition'. You then issue the request sense command and the returned
sensed data contain codes saying that the scanner is busy. The request sense
is issued by the kernel itself, not by sane (or the backend).

In this case, the sanei_scsi_cmd did not return SANE_BUSY because although the
kernel does return sensed data, it does not return an error code.

The patch that was introduced in sane-0.71 fixes this by calling the backend
'sense handler' whenever sensed data is returned, even when the kernel didn't
return an error code.

This behaviour shows up on Linux and (I think) on SGI.

In short, if a scanner returns a 'check condition' to a 'test unit ready' when
it is busy, then the backend (sense handler) must be prepared to handle it.
This was not the case prior to sane-0.71.


Source code, list archive, and docs:
To unsubscribe: echo unsubscribe sane-devel | mail