[sane-devel] Out of memory in sanei_scsi_cmd [was: "Annoying Out of MEmory Error..."]

Oliver Schwartz Oliver.Schwartz at gmx.de
Sun Sep 24 12:10:02 UTC 2006


Hi Abel,

> > As far as I can tell I'm issuing a sanei_scsi_cmd with a send
> > buffer of ten bytes and a receive buffer of 130176 bytes. Both
> > should fit into the SCSI buffer of 131072 bytes easily.
>
> is 130176 a typo, or does the backend really wants to read 4 bytes
> more than reserved? (or do I misunderstand something?) I could not
> find the the number 130176 anywhere else.

No, it's not a typo, it's just a bit tricky to read :-) The buffer 
size is 131072 bytes, not 130172 bytes, so it's bigger than the 
requested 130176 bytes. I fell into the same trap when I first looked 
at the numbers :-)

The 130176 bytes are taken from the snapscan source code and some part 
of the log which was missing in my mail, it's the effective buffer 
size rounded up to the next 128 bytes boundary:

> [snapscan] inquiry: effective buffer size = 130101 bytes, 37 lines


> This point aside, I don't have a really good hint, except that I
> have the impression that the Linux atp870u driver is not the best
> piece of code in the kernel. Maintainance of the driver was, at
> least some time ago, a bit unclear. Moreover, another user recently
> reported problems with this driver on the list; he could use his
> scanner fine after replacing the adapter with a properly supported
> one.

Ok, I didn't know that. I'll try on linux-scsi and recommend another 
SCSI controller to the user reporting the bug.

Thanks a lot for your input,

Oliver



More information about the sane-devel mailing list