[sane-devel] Re: Avision backend

Rene Rebe rene.rebe@gmx.net
Thu, 17 Jan 2002 21:13:18 +0100 (CET)


From: abel deuring <adeuring@gmx.net>
Subject: Re: [sane-devel] Re: Avision backend
Date: Thu, 17 Jan 2002 20:34:55 +0100

> Rene Rebe wrote:
> 
> > > > - hpusbscsi+sane+avision will not handle large transfers. It is necessary to
> > > > use a large SANE_SG_BUFFERSIZE. Is it easy to fix?
> > >
> > > use sanei_scsi_open_extended instead of sanei_scsi_open. The former
> > > function has one more parameter, the buffer size. On return, you should
> > > check, if you got the buffer size you wanted. If
> > > sanei_scsi_open_extended returns a too small value for your purposes,
> > > you can call an appropriate DBG statement and return an error to the
> > > caller.
> > 
> > Ok. The only problem we have is: that the calibration data seems to
> > get rather big (200kB - 400kB?) and it _seems_ that it has to be
> > transfered with one SCSI command. (From the windows-log they seem to
> > be also using a single command ...). I'm not such a SCSI freak - so is
> > it possible to devide a SCSI command into single small ones?
> 
> Theoretically, it should be possible to read/write data in smaller
> chunks. OTOH, I remeber that Oliver Rauch increased the default SCSI
> buffer size for, uuuhhh, was it Irix?, because some Umax scanner wants
> to read or write something like calibration data in exactly one block.

Hm. It seem that the Avision scanner want to transfer the data in one
chunck too ... - I'll have a look on the win-driver trace again ...

> But anyway, my point regarding sanei_scsi_open_extended was that this
> function gives you better control over the buffer size, at least under
> Linux. So, if the scanner allows to read/write the calibration data with
> more than command, you can easily adjust the number of required commands
> -- and if the scanner needs exactly SCSI command for the data, you can
> avoid the usage of environment variable SANE_SG_BUFFERSIZE. Before the
> Linux SG driver allowed to set the buffer size at run time, and before I
> had set the default Sane buffer size to 128 kB, we had quite a few
> questions on the meiling list, how to adjust the buffer size. So, if you
> set the proper buffer size without using SANE_SG_BUFFERSIZE, you make
> like easier for many users and you avoid some questions.

I'll try to play with this, too. Thanks.

> Abel
> _______________________________________________
> Sane-devel mailing list
> Sane-devel@www.mostang.com
> http://www.mostang.com/mailman/listinfo/sane-devel
> 

k33p h4ck1n6
  René

-- 
René Rebe (Registered Linux user: #248718 <http://counter.li.org>)

eMail:    rene.rebe@gmx.net
          rene@rocklinux.org

Homepage: http://drocklinux.dyndns.org/rene/

Anyone sending unwanted advertising e-mail to this address will be
charged $25 for network traffic and computing time. By extracting my
address from this message or its header, you agree to these terms.