[sane-devel] Additional SCSI status?

Dave Close dclose@anim.dreamworks.com
Mon, 13 May 2002 13:53:51 -0700


I am dealing with a scanner that seems to return some of its status
outside the SCSI sense byte area. sanei_scsi reports this information
via DBG but doesn't provide it to the sense handler. The data is in the
SCSI header, which is physically adjacent to and preceding the sense
bytes in sanei_scsi.c, so I can get to it with some C tricks. But, of
course, those tricks could fail in a future SANE version. Is there a
better recommended solution?

Here's the kind of debug output I'm seeing.

[sanei_scsi] sanei_scsi_req_wait: read 64 bytes
[sanei_scsi] sanei_scsi_req_wait: SCSI command complained: Success
[sanei_scsi] sense buffer: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[sanei_scsi] target status: 02 host status: 0000 driver status: 0018
[mybackend] sense=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

The fourth line above shows target status and driver status. This
information does not appear to be available to the sense handler. If
sanei_scsi knows enough to call the sense handler in this case, and it
does, it should provide all the relevant data.
-- 
Dave Close                    Dreamworks SKG, Animation Technology
+1 818 695 6962               Glendale California 91201-3007
dclose@anim.dreamworks.com    http://www.dreamworks.com/