Re: problems increasing SG_BIG_BUFF

abel deuring (a.deuring@satzbau-gmbh.de)
Wed, 30 Jun 1999 17:44:03 +0200

Hi Rainer!
>
> Douglas Gilbert wrote:
> >
> > abel deuring wrote:
> > >
> > > Hi all!
> > >
> > >
> > > This suggests that most if not all scanner carriage stops can be avoided
> > > if consecutive reads commands are sent to the scanner as soon as
> > > possible after the data from the previous command has been read in.
> > >
> > > Doug, what do you think about adding ioctl-calls to the SG driver which
> > > implement queueing of asynchrounous SCSI commands?
> >
> > Abel,
> > Command queuing is already there but turned off by
> > default (because cdparanoia got upset when it found
> > it :-) ). It is demonstrated in a program called
> > sgq_dd512 (a "dd" variant) that can be found on
> > sg's home page in the utility tarball.
> >
> > See the SG_SET_COMMAND_Q ioctl(). I was not aware
> > that many scanners supported command queuing.
> >
> > Doug Gilbert
> >
> > --
> > Source code, list archive, and docs: http://www.mostang.com/sane/
> > To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com
>
> Does this mean, that I might just enable command queue tagging,
> recompile the kernel and possibly sane and it should work? If yes, where
> can I enable it?

Unfortunately it needs a little bit more work to benefit from SG command
queueing with Sane. At present, sanei_scsi.c has its own command queue
which is filled with a call to sanei_scsi_req_enter, and queued requests
are sent to the scanner if sanei_scsi_req_wait is called (this is a
somewhat oversimplified description -- it's some months ago that I had a
closer look into sanei_scsi.c)

Further, the backend for your scanner needs to make use of the functions
sanei_scsi_req_enter and sanei_scsi_req_wait instead of sanei_scsi_cmd.

Abel

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