Re: Correct Network Scanner Syntax? (a question)

From: abel deuring (a.deuring@satzbau-gmbh.de)
Date: Sun May 28 2000 - 13:36:30 PDT

  • Next message: Robert Schwebel: "Re: Announcing new driver"

     
    John Fremlin wrote:
     
    >abel deuring <a.deuring@satzbau-gmbh.de> writes:
    >
    >> > Hmm. I don't know if Oliver added anything to my version, but here is
    >> > what I sent him (relative to sane-cvs). The patch to
    >> > sanei/sanei_scsi.c should not be necessary if sane is setup properly,
    >> > and is probably incorrect wrt other sane backends.
    >
    >[...]
    >
    >> If this patch to sanei_scsi.c works for your setup (Microtek USB
    >> scanner, if my memory is right), it's fine. But it might break the
    >> memory management for other backends which use the function
    >> sanei_scsi_open. Most backends open the device file for scanner access
    >
    >To clarify:
    >
    >The patch is *only* included because I couldn't be bothered to read
    >the docs to find the correct fix for the fact that my kernel sg buffer
    >size is smaller than that which SANE expects.
     
    Right. Sorry, I missed the point you mentioned above, that the patch to
    sanei_scsi.c is not in every case necessary.
     
    >I suppose that the USB scanner will work OK with any SCSI buffer size,
    >though this is untested and the blighters at microtek can't be
    >bothered to give us the docs, and Oliver can't get it to work at all
    >on his setup, so whether they work on any system except mine is open
    >to question. ;-)
     
    Yes and no. As Oliver wrote in his response to your mail, the USB/SCSI
    converter or driver (or however it is called) limits the buffer size to
    32 kB, because it does not support scatter/gather. We can live with this
    limit, but since the Microtek backend uses sanei_scsi_open, users must
    either set SANE_SG_BUFFERSIZE, or if they install Sane from the sources,
    they must use the configure option --enable-scsibuffersize in order to
    get a "SCSI via USB" scanner running.
                                
    What I tried to point out is, that this inconvenience of a "special
    SCSI/USB configuration" (what a big word for an environment variable...)
    can be avoided, if a backend uses sanei_scsi_open_extended instead of
    sanei_scsi_open. Using the latter function, a backend can easily adapt
    to any available buffer size. This way, things would be a little bit
    easier for a Linux newbie to get his/her SCSI-over-USB scanner working.
     
    Abel

    --
    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 : Sun May 28 2000 - 13:56:50 PDT