[sane-devel] SCSI problems with a DMC

Andrew Kuchling akuchlin@mems-exchange.org
Tue, 29 Oct 2002 13:44:57 -0500


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?

--amk                                                             (www.amk.ca)
Destiny? Isn't that just a fancy name for blind chance?
      -- Peri, in "Mindwarp"