Re: Linux Sense buffer (was: sane 0.71 and microtek E3)

David Mosberger-Tang (David.Mosberger@acm.org)
Sun, 19 Apr 1998 09:50:28 -0700

>> There is. I sent the appended patch to Linus a short while ago.
>> Of course, you shouldn't rely on this patch being present until
>> it has been folded into the regular sources.

Sean> How about the following patch? It creates "/proc/scsi/sg",
Sean> which at the moment only reports the SG_BIG_BUFF size. To
Sean> detect if the patch is in the currently-running kernel you
Sean> just check the existance of "/proc/scsi/sg" -- if it's not
Sean> there you can default to 32K.

Note that my patch implementing /proc/sys/kernel/sg-big-buff is in the
Linux kernel starting with version linux-2.1.92. The necessary
support in SANE is present as of version 0.72. So we should be all
set once Linux v2.2 has been released.

However, the one missing piece right now is that
/proc/sys/kernel/sg-big-buff is read-only, meaning that you can't
increase the value at runtime. The only major obstacle in
implementing this is that the Linux kernel presently has difficulty in
allocating contiguous physical memory that's larger than a page after
the boot process has completed (it's easy at boot time, but after
that, it's harder). I'm told that Matt Welsh has a fix for this
problem, but I don't know whether those patches are scheduled for
inclusion for Linux v2.2.

--david

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