Re: no SG__BIG_BUF in kernel 2.2.12

Douglas Gilbert (dgilbert@interlog.com)
Thu, 25 Nov 1999 23:09:07 -0500

joakim verona wrote:
>
> I've been trying now and then for some time to get my snapscan 300 to
> work.
> with the latest developer snapshot i had partial success, i could at
> least do a preview scan with xscanimage, but when i try to do a full
> scan it hangs after scanning a fraction of the image.
>
> so i've read some of the advice on the list and was going to try to
> increase the SG_BIG_BUF parameter in sg.h. But there seems to be no such
> parameter in kernel 2.2.12!
>
> is SG_BIG_BUF still applicable, or what?

According to the Linux Cross Reference (site lxr.linux.no) in
Linux kernel 2.2.12 in /usr/src/linux/include/scsi/sg.h
on line 231 is:
#define SG_BIG_BUFF SG_DEF_RESERVED_SIZE

Note the different spelling. Backing up to line 226 is:
#define SG_DEF_RESERVED_SIZE SG_SCATTER_SZ

Now assuming you have a reasonable SCSI controller then you
can try changing that to:
#define SG_DEF_RESERVED_SIZE (SG_SCATTER_SZ * 4)

and then build the the sg driver into the kernel. This way
if SANE reads /proc/sys/kernel/sg-big-buff it will find
131072. [If you build sg as a module that file is not
there and I think SANE assumes a buffer size of 32768.]

Next, if you haven't already, go to Kevin Charter's web
site (see recent newsgroup postings by him) and get a
new Snapscan backend.

Before you rebuild SANE, try:
diff /usr/src/linux/include/scsi/sg.h /usr/include/scsi/sg.h

If they are different then:
cp /usr/src/linux/include/scsi/sg.h /usr/include/scsi/sg.h
[This glitch is brought to you by glibc library maintainers.]

See if that makes a difference.

Doug Gilbert

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