Mustek/Request-sense problems -> Solution?

Thomas Blume (mblum1@nightshift.uni-paderborn.de)
Thu, 8 May 1997 01:50:01 +0200

Hello,

while experimenting with MFS-1200SP (1.02)/ Adaptec 1542C / Linux 2.0.29 /
sane-0.56 I noticed some problems with the sense checking in
mustek.c.

Since I could not start any scan because of sense errors (0x8),
I had to walk through the code.

In mustek.c request_sense is called explicitly after some commands as
indicated in Mustek's Control-Flow document. As far as I understand
the SCSI drafts (SCSI-1, SCSI-2) the sense data are valid only for a
limited number of cases, e.g. the command prior to request_sense returns
CHECK_CONDITION. These cases are handled already by the low-level
drivers in the kernel, so the additional request_sense issued by
mustek.c cannot be guaranteed to retrieve valid sense data.

At least with the above mentioned combo scanning (NOT color scanning)
works perfectly after inserting a dummy routine instead of
request_sense.

Maybe a function for parsing sense data should be hooked directly to
sanei_scsi_cmd, or the valid bit of sense data should be checked.

Please fix me if I'm wrong, but since it works for me now, I suspect,
that the additional request_sense was in fact the source for my
problems.

Hope, this helps,

Thomas

-- 
Thomas Blume                          <mblum1@hrz.uni-paderborn.de>
Technische Chemie und Chemische Verfahrenstechnik, UNI-GH-Paderborn
Tel.: +49 5251 602598                          Fax: +49 5251 603244

--
Source code, list archive, and docs: http://www.azstarnet.com/~axplinux/sane/
To unsubscribe: mail -s unsubscribe sane-devel-request@listserv.azstarnet.com