sane-project-website/old-archive/1999-06/0048.html

106 wiersze
4.5 KiB
HTML

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

<!-- received="Wed Jun 9 06:48:49 1999 PDT" -->
<!-- sent="Wed, 09 Jun 1999 09:53:36 -0400" -->
<!-- name="Douglas Gilbert" -->
<!-- email="dgilbert@interlog.com" -->
<!-- subject="Re: problems increasing SG_BIG_BUFF" -->
<!-- id="" -->
<!-- inreplyto="problems increasing SG_BIG_BUFF" -->
<title>sane-devel: Re: problems increasing SG_BIG_BUFF</title>
<h1>Re: problems increasing SG_BIG_BUFF</h1>
<b>Douglas Gilbert</b> (<a href="mailto:dgilbert@interlog.com"><i>dgilbert@interlog.com</i></a>)<br>
<i>Wed, 09 Jun 1999 09:53:36 -0400</i>
<p>
<ul>
<li> <b>Messages sorted by:</b> <a href="date.html#48">[ date ]</a><a href="index.html#48">[ thread ]</a><a href="subject.html#48">[ subject ]</a><a href="author.html#48">[ author ]</a>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0049.html">Oliver Rauch: "Re: UMAX T-30 and Adaptec 2906"</a>
<li> <b>Previous message:</b> <a href="0047.html">Andreas Buesching: "problems increasing SG_BIG_BUFF"</a>
<li> <b>Maybe in reply to:</b> <a href="0047.html">Andreas Buesching: "problems increasing SG_BIG_BUFF"</a>
<!-- nextthread="start" -->
<li> <b>Next in thread:</b> <a href="0067.html">Petter Reinholdtsen: "Re: problems increasing SG_BIG_BUFF"</a>
<!-- reply="end" -->
</ul>
<!-- body="start" -->
Andreas Buesching wrote:<br>
<i>&gt; </i><br>
<i>&gt; Hello Developers,</i><br>
<i>&gt; </i><br>
<i>&gt; my situation:</i><br>
<i>&gt; SuSE 6.1</i><br>
<i>&gt; new kernel 2.2.9</i><br>
<i>&gt; /usr/include/scsi is linked to /usr/src/linux/include/scsi</i><br>
<p>
Monty (cdparanoia author) has a nice way around the<br>
above directory problem:<br>
<p>
#include &lt;linux/../scsi/sg.h&gt;<br>
#include &lt;linux/../scsi/scsi.h&gt;<br>
<p>
[An elegant hack!]<br>
<p>
<i>&gt; </i><br>
<i>&gt; problem:</i><br>
<i>&gt; I tried to increase the generic-scsi buffer. The man-pages told me to change</i><br>
<i>&gt; SG_BIG_BUFF. the new kernel uses another define (SG_SCATTER_SZ), but there are</i><br>
<i>&gt; also these two lines:</i><br>
<i>&gt; </i><br>
<i>&gt; #define SG_BIG_BUFF SG_SCATTER_SZ /* for backward compatibility */</i><br>
<i>&gt; /* #define SG_BIG_BUFF (SG_SCATTER_SZ * 8) */ /* =256KB, if you want */</i><br>
<i>&gt; </i><br>
<i>&gt; So I increased SG_BIG_BUFF and compiled the kernel and sane again.</i><br>
<i>&gt; The result was: nothing. Some months ago when I used an older kernel (2.0.x),</i><br>
<i>&gt; there was an result: My scanner did not stop every 5mm to transfer the data (it</i><br>
<i>&gt; sounds horrible if it stops every 5mm).</i><br>
<i>&gt; </i><br>
<i>&gt; My question:</i><br>
<i>&gt; Can anybody help me? How to increase the buffer?</i><br>
<i>&gt;</i><br>
Andreas,<br>
You may like to try this ... go to<br>
<a href="http://www.torque.net/sg">http://www.torque.net/sg</a><br>
and download sg version 2.1.34 (you have version<br>
2.1.32 in 2.2.9). In the new sg.h change the<br>
SG_DEF_RESERVED_SIZE to 262144 and try that.<br>
[This assumes that your SCSI adapter does scatter<br>
gather which even most ISA ones do.]<br>
<p>
While your at that web site you may be interested<br>
in the documentation's section on "SG_BIG_BUFF and<br>
friends".<br>
<p>
BTW 2.2.9-ac3 also contains the most recent sg<br>
driver.<br>
<p>
In the new sg driver SG_BIG_BUFF exists for backward<br>
compatibility (which doesn't extend to people<br>
changing it :-) ). Internally the sg driver takes<br>
no account of it. Some apps are fooled by it but not,<br>
it would seem, sane. <br>
<p>
Hopefully in the future the sane linux transport layer<br>
will use the SG_SET_RESERVED_BUFFER ioctl() and sane's<br>
documentation will stop recommending people hacking<br>
the sg.h header file. Under 2.2 with the original<br>
sg driver this is a very dangerous thing to do (ie<br>
greatly increases the probably of an ENOMEM induced<br>
oops, especially on modules).<br>
<p>
Doug Gilbert<br>
<p>
<pre>
--
Source code, list archive, and docs: <a href="http://www.mostang.com/sane/">http://www.mostang.com/sane/</a>
To unsubscribe: echo unsubscribe sane-devel | mail <a href="mailto:majordomo@mostang.com">majordomo@mostang.com</a>
</pre>
<!-- body="end" -->
<p>
<ul>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0049.html">Oliver Rauch: "Re: UMAX T-30 and Adaptec 2906"</a>
<li> <b>Previous message:</b> <a href="0047.html">Andreas Buesching: "problems increasing SG_BIG_BUFF"</a>
<li> <b>Maybe in reply to:</b> <a href="0047.html">Andreas Buesching: "problems increasing SG_BIG_BUFF"</a>
<!-- nextthread="start" -->
<li> <b>Next in thread:</b> <a href="0067.html">Petter Reinholdtsen: "Re: problems increasing SG_BIG_BUFF"</a>
<!-- reply="end" -->
</ul>