# Re: SANE and Mustek MFC-600S

Rogier Wolff (R.E.Wolff@BitWizard.nl)
Sun, 7 Sep 1997 08:59:11 +0200 (MET DST)

- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
- Next message: Rogier Wolff: "Re: Backtracking in color scanning"
- Previous message: Rogier Wolff: "Re: Backtracking in color scanning"
- In reply to: David Mosberger-Tang: "Re: SANE and Mustek MFC-600S"

David Mosberger-Tang wrote:
>
> I don't know what exactly the Windows driver does (in fact, I have
> never actually seen the Windows driver working since it doesn't work
> on my Alpha box...). I discussed the issue with a Mustek engineer a
> long time ago and he said backtracking for the MFC-06000CZ is
> unavoidable at high resolutions (probably because it has an internal
> buffer of 128KB only). If you're saying that the windows driver does
> not backtrack even at 600dpi in color mode, then this is obviously not
> the whole truth. It might be that using a larger kernel buffer (say
> 1MB) might get rid of the backtracking completely, but it would at
> least require some kernel hacking (also, I thought I read somewhere
> that single SCSI transfers are limited to 128KB, am I
> misremembering?).

Yes, 1Mb SCSI transfers work just fine. The "strip-height" option that
you added due to my request was to prevent such a transfer to take the
bus for more than 10 seconds in a row.....

I posted the patch to do this (the kernel hacking you mention :-) a few
days ago. Here it is again.

Roger.

-------------------------- sg_big_buf.patch ---------------------------
--- linux-2.0.28/include/scsi/sg.h Thu May 2 06:48:55 1996
+++ linux-2.0.28.posix6/include/scsi/sg.h Thu Jan 23 00:10:40 1997
@@ -36,6 +36,10 @@
#define SG_MAX_QUEUE 4 /* maximum outstanding request, arbitrary, may be
changed if sufficient DMA buffer room available */
+#if 0
#define SG_BIG_BUFF 32768
+#else
+#define SG_BIG_BUFF 0x100000
+#endif
#endif
--- linux-2.0.28/drivers/scsi/sg.c Sun Sep 1 08:15:33 1996
+++ linux-2.0.28.posix6/drivers/scsi/sg.c Thu Jan 23 00:12:52 1997
@@ -39,7 +39,11 @@
NULL, sg_attach, sg_detach};
#ifdef SG_BIG_BUFF
+#if SG_BIG_BUFF < 0x10000
static char *big_buff = NULL;
+#else
+static char big_buff[SG_BIG_BUFF];
+#endif
static struct wait_queue *big_wait; /* wait for buffer available */
static int big_inuse=0;
#endif
@@ -565,8 +569,10 @@
#endif
#ifdef SG_BIG_BUFF
+#if SG_BIG_BUFF < 0x10000
big_buff= (char *) scsi_init_malloc(SG_BIG_BUFF, GFP_ATOMIC | GFP_DMA);
#endif
+#endif
scsi_generics = (struct scsi_generic *)
scsi_init_malloc((sg_template.dev_noticed + SG_EXTRA_DEVS)
@@ -648,8 +654,10 @@
}
sg_template.dev_max = 0;
#ifdef SG_BIG_BUFF
+#if SG_BIG_BUFF < 0x10000
if(big_buff != NULL)
scsi_init_free(big_buff, SG_BIG_BUFF);
+#endif
#endif
}
#endif /* MODULE */

    --
    ** R.E.Wolff@BitWizard.nl ** +31-15-2137555 ** http://www.BitWizard.nl/ **
    Florida -- A 39 year old construction worker woke up this morning when a
    109-car freigt train drove over him. According to the police the man was
    drunk. The man himself claims he slipped while walking the dog. 080897

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

     Next message: Rogier Wolff: "Re: Backtracking in color scanning"
     Previous message: Rogier Wolff: "Re: Backtracking in color scanning"
     In reply to: David Mosberger-Tang: "Re: SANE and Mustek MFC-600S"