Timing-patches (Mustek 600 II N)

Andreas Czechanowski (andreas@inspc44b.ins.uni-stuttgart.de)
Tue, 2 Mar 1999 17:31:52 +0100 (MET)

Hi !

The lines below are the "official" delays that are to be
introduced into the sanei-code to prevent hanging of the
Mustek 600 II N backend on a fast computer.

The diff was taken relative to 0.74, but I hope it is still
valid for 1.00+ also. Please include this into the next
official release for SANE. Thanks !

There is one more patch from Henning Meier-Geinitz <henningmg@gmx.de>
that I have still not yet tested -- sorry. It is from 14 Apr 1998
and can also be found in the mailing list archive. But it is
possible that it works for some scanners and breaks things for
other ones, so...

Regards, Andreas.

------------------------ cut here -------------------------
*** ./sanei/sanei_ab306.c.orig Tue Mar 3 03:13:25 1998
--- ./sanei/sanei_ab306.c Fri Aug 14 23:45:38 1998
***************
*** 195,200 ****
--- 195,201 ----
DBG(3, "ab306_write: waiting for scanner to be ready %02x\n",
ab306_inb (p, base + 1));
while ((ab306_inb (p, base + 1) & 0x20) == 0);
+ usleep(10000);

DBG(4, "ab306_write: writing data\n");
for (i = 0; i < len; ++i)
***************
*** 209,214 ****
--- 210,216 ----
DBG(3, "ab306_write: waiting for scanner to be NOT ready %02x\n",
ab306_inb (p, base + 1));
while ((ab306_inb (p, base + 1) & 0x20) != 0);
+ usleep(10000);

DBG(4, "ab306_write: reading ack\n");
cksum = ab306_cin (p);
***************
*** 390,395 ****
--- 392,401 ----
if (dst && *dst_size > 0)
{
int i, cksum = 0;
+
+ DBG(3, "sanei_ab306_cmd: waiting for scanner to be NOT ready %02x\n",
+ ab306_inb (p, p->base + 1));
+ while ((ab306_inb (p, p->base + 1) & 0x20) != 0);

for (i = 0; i < *dst_size; i++)
{
------------------------ cut here -------------------------

--
Dipl.-Ing. Andreas Czechanowski
andreas.czechanowski@ins.uni-stuttgart.de
Institut fuer Netzwerk- und Systemtheorie
Universitaet Stuttgart

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