[sane-devel] SCSI problems with a DMC

abel deuring a.deuring@satzbau-gmbh.de
Tue, 29 Oct 2002 21:13:29 +0100


Andrew Kuchling wrote:
> On Tue, Oct 29, 2002 at 06:14:33PM +0100, abel deuring wrote:
> 
>>Sounds like a bug in sanei_scsi.c . Try
>>
>>             if ( (req->sgdata.cdb.hdr.result != 0) ||
>>                 ((req->sgdata.cdb.hdr.sense_buffer[0] & 0x7f) != 0)
>>                  && (req->sgdata.cdb.hdr.driver_status & DRIVER_SENSE)
>>                 )
> 
> 
> Thanks for the suggestion.  This lets it complete a scan, though
> scanimage reports "WARNING: read more data than announced by backend
> (1446606/1441800)" and I can't verify whether the output is correct.
> (It outputs an all-black screen, but that might be reasonable output
> depending on the state of the microscope connected to the machine.)
> 
> 
>>(This won't work with _really_ old SG drivers -- a proper fix would
>>require another #ifdef HAVE_SG_TARGET_STATUS. I think)
> 
> 
> This is with 2.2.18pre21 (a Debian potato installation).
> 
> 
>>I am not sure, if this will really fix your problem though: The sense
>>buffer looks, hmm, "reasonable" -- but the driver status claims that no
>>sense data is available. I don't know, why the Linux SCSI drivers return
>>valid looking sense data but do not signal this in driver_status...
> 
> 
> This bug showed up a little while ago, and nothing on the machine had
> changed as far as I know; this makes me suspicious of it being either
> a SANE or a Linux bug.  Could this perhaps be caused by a
> starting-to-go-bad SCSI connector, adapter, cable, or some other
> component?

Looking onto the sense data from your last mail:

 > [sanei_scsi] sense buffer: 70 00 04 00 00 00 00 0a 00 00 00 00 80 00 
00 00

there seems to be something wrong. byte 2 is the sense key; value 4 
means a hardware error. The "additional sense code" (byte 12) value 0x80 
means "vendor specific", so I have no idea what this means...

So the sense buffer indicates some sort of hardware failure of the 
camera -- but OTOH I am not sure, if this data is valid. It is a bit 
confusing to have an absolutely reasonable looking sense buffer, while 
the Linux drivers claim in their flags that no sense data is available 
(driver_status & DRIVER_SENSE == 0)...

Abel