Re: SANE and Linux kernel 2.4.0

From: Tim Waugh (twaugh@redhat.com)
Date: Tue Jan 09 2001 - 17:49:16 PST

  • Next message: Andrew Williams: "Re: help - hp 5300c"

    On Tue, Jan 09, 2001 at 04:03:36PM -0500, Douglas Gilbert wrote:

    > by timeouts ** resulting in scsi bus resets. Anyway the problem
    > seems to disappear with the recently released SANE 1.0.4 .
    > [The original report was based on SANE 1.0.3 and earlier.]

    In fact I was wrong when I said this. :-(

    > ** SANE's newer sg interface shortens the per command timeout
    > from 10 minutes to 10 seconds. Most other OSes have a timeout
    > value of 1 minute or more. I suspect 10 seconds may be too short.

    Using this patch the problem really did go away.

    Tim.
    */

    --- sane-backends-1.0.4/sanei/sanei_scsi.c.orig Wed Jan 10 01:41:09 2001
    +++ sane-backends-1.0.4/sanei/sanei_scsi.c Wed Jan 10 01:41:13 2001
    @@ -1890,7 +1890,7 @@
           (const void*) req->sgdata.sg3.hdr.cmdp = cmd;
           req->sgdata.sg3.hdr.sbp = &(req->sgdata.sg3.sense_buffer[0]);
           /* 10 seconds should be ok even for slow scanners */
    - req->sgdata.sg3.hdr.timeout = 10000;
    + req->sgdata.sg3.hdr.timeout = 10 * 60 * 1000;
           req->sgdata.sg3.hdr.flags = SG_FLAG_DIRECT_IO;
           req->sgdata.sg3.hdr.pack_id = pack_id++;
           req->sgdata.sg3.hdr.usr_ptr = 0;



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



    This archive was generated by hypermail 2b29 : Tue Jan 09 2001 - 17:27:27 PST