Microtek E6 - mode_sense_1 problem

Randall Hopper (rhh@ct.picker.com)
Tue, 5 May 1998 20:59:25 -0400

--huq684BweRXVnRxX
Content-Type: text/plain; charset=us-ascii

Hi. Just got my new Microtek E6 up-n-scanning with an ASUS SC-200
(NCR 53C810) using SANE 0.72 on FreeBSD 3.0-current. Thanks for your work
on SANE and the Microtek back-end!

However, I did have to make one odd patch to get it to work for me
(attached). It's a hack at best. The problem here is that mode_sense_1()
in the Microtek backend always trips:

May 5 20:38:42 stealth /kernel: uk0: extraneous data discarded.
May 5 20:38:42 stealth /kernel: uk0: COMMAND FAILED (9 0) @f0551400.

errors from the NCR driver, and that SCSI command ioctl returns SCCMD_TIMEOUT.
SANE then translates this to a BUSY and the app bails.

As a work-around, if I patch the Microtek backend to bypass
mode_sense_1(), such as by forcing it to think my E6 doesn't do mode1 (the
patch), then I can scan nice looking previews and images via xscanimage
with no problems.

Being new to SCSI internals, I'm not exactly sure where to go toward
nailing down (and first identifying) the "real" issue here. I don't know
if it's a sanei_scsi BSD issue, microtek backend issue, or a NCR SCSI
driver issue.

Any suggestions, pointers, or just flat-out speculation would be
appreciated. :-) If more info is needed, just let me know.

Randall Hopper
rhh@ct.picker.com

--huq684BweRXVnRxX
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="sane0.72-mtek-e6.patch"

--- microtek.c.ORIG Tue May 5 20:28:56 1998
+++ microtek.c Tue May 5 20:28:59 1998
@@ -1275,7 +1275,7 @@
mi->xfer_format_select = (SANE_Byte)(result[68] & 0x01);
mi->color_sequence = (SANE_Byte)(result[69] & 0x7f);
mi->does_3pass = (SANE_Byte)(result[69] & 0x80);
- mi->does_mode1 = (SANE_Byte)(result[71] & 0x01);
+ mi->does_mode1 = 0;

/* XXXXXXXX */
mi->contrast_vals = (SANE_Int)(result[72]);

--huq684BweRXVnRxX--

--
Source code, list archive, and docs: http://www.mostang.com/sane/
To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com