kopia lustrzana https://gitlab.com/sane-project/website
106 wiersze
4.5 KiB
HTML
106 wiersze
4.5 KiB
HTML
<!-- 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>> </i><br>
|
||
<i>> Hello Developers,</i><br>
|
||
<i>> </i><br>
|
||
<i>> my situation:</i><br>
|
||
<i>> SuSE 6.1</i><br>
|
||
<i>> new kernel 2.2.9</i><br>
|
||
<i>> /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 <linux/../scsi/sg.h><br>
|
||
#include <linux/../scsi/scsi.h><br>
|
||
<p>
|
||
[An elegant hack!]<br>
|
||
<p>
|
||
<i>> </i><br>
|
||
<i>> problem:</i><br>
|
||
<i>> I tried to increase the generic-scsi buffer. The man-pages told me to change</i><br>
|
||
<i>> SG_BIG_BUFF. the new kernel uses another define (SG_SCATTER_SZ), but there are</i><br>
|
||
<i>> also these two lines:</i><br>
|
||
<i>> </i><br>
|
||
<i>> #define SG_BIG_BUFF SG_SCATTER_SZ /* for backward compatibility */</i><br>
|
||
<i>> /* #define SG_BIG_BUFF (SG_SCATTER_SZ * 8) */ /* =256KB, if you want */</i><br>
|
||
<i>> </i><br>
|
||
<i>> So I increased SG_BIG_BUFF and compiled the kernel and sane again.</i><br>
|
||
<i>> The result was: nothing. Some months ago when I used an older kernel (2.0.x),</i><br>
|
||
<i>> there was an result: My scanner did not stop every 5mm to transfer the data (it</i><br>
|
||
<i>> sounds horrible if it stops every 5mm).</i><br>
|
||
<i>> </i><br>
|
||
<i>> My question:</i><br>
|
||
<i>> Can anybody help me? How to increase the buffer?</i><br>
|
||
<i>></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>
|