[sane-devel] avision: Out of memory

Henning Meier-Geinitz henning at meier-geinitz.de
Thu Feb 6 08:44:32 GMT 2003


Hi,

On Thu, Feb 06, 2003 at 01:24:37AM +0100, Rene Rebe wrote:
> > Right. As I understand it, the 5370C uses some sort of USB/SCSI 
> > translation. sanei_scsi_req_enter2 (more precisely, the SG driver of the 
> > Linux kernel) can return "out of memory" errors. If a Sane frontend is 
> > run with SANE_DEBUG_SANEI_SCSI=255, a debug message like 
> > "sanei_scsi.issue: SG_BIG_BUF inconsistency?" should be printed. (which 
> > we should update, BTW. SG_BIG_BUF does not caused problems since quite 
> > some time.)
> > 
> > Anyway, the backend really should not try to send more data than 
> > suggested by sanei_scsi_max_request_size.
> 
> I have no choise, since there are firmware bugs, that do not allow to
> read the calibration data in several tiny chunks for (some Avision)
> USB devices ... - And this ever worked for me here ...

That's suspicious. I don't think you can ignore
sanei_scsi_max_request_size. If you send larger requests, it won't work.
But maybe I'm missing something here?

IIRC the default size is 128 kb on Linux (and may be lower on other
systems). So if the inquiry buffer size is bigger than that, it won't
work. You could use sanei_scsi_open_extended to set a bigger SCSI size. But you
still must check if the bigger size was accepted.

Maybe you set SANE_SG_BUFFERSIZE to a bigger value in your init
scripts? If SANE_DEBUG_SANEI_SCSI=255 is set, you should see the size
of your sg buffer.

Bye,
  Henning



More information about the sane-devel mailing list