sane-project-website/old-archive/2001-04/0002.html

125 wiersze
5.1 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<TITLE>sane-devel: [PATCH] sanei_scsi.c for dio in Linux</TITLE>
<META NAME="Author" CONTENT="Douglas Gilbert (dgilbert@interlog.com)">
<META NAME="Subject" CONTENT="[PATCH] sanei_scsi.c for dio in Linux">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>[PATCH] sanei_scsi.c for dio in Linux</H1>
<!-- received="Sun Apr 1 08:49:12 2001" -->
<!-- isoreceived="20010401154912" -->
<!-- sent="Sun, 01 Apr 2001 11:00:36 -0400" -->
<!-- isosent="20010401150036" -->
<!-- name="Douglas Gilbert" -->
<!-- email="dgilbert@interlog.com" -->
<!-- subject="[PATCH] sanei_scsi.c for dio in Linux" -->
<!-- id="3AC74294.E93856C5@interlog.com" -->
<STRONG>From:</STRONG> Douglas Gilbert (<A HREF="mailto:dgilbert@interlog.com?Subject=Re:%20[PATCH]%20sanei_scsi.c%20for%20dio%20in%20Linux&In-Reply-To=&lt;3AC74294.E93856C5@interlog.com&gt;"><EM>dgilbert@interlog.com</EM></A>)<BR>
<STRONG>Date:</STRONG> Sun Apr 01 2001 - 08:00:36 PDT
<P>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0003.html">Ulrich Hopp: "Mustek 1200 SP Pro + aha152x + linux 2.4.3 = success"</A>
<UL>
<LI><STRONG>Previous message:</STRONG> <A HREF="0001.html">Douglas Gilbert: "Re: SuSE 7.1 backends compile"</A>
<!-- nextthread="start" -->
<LI><STRONG>Next in thread:</STRONG> <A HREF="0007.html">Tim Waugh: "Re: [PATCH] sanei_scsi.c for dio in Linux"</A>
<LI><STRONG>Reply:</STRONG> <A HREF="0007.html">Tim Waugh: "Re: [PATCH] sanei_scsi.c for dio in Linux"</A>
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#2">[ date ]</A>
<A HREF="index.html#2">[ thread ]</A>
<A HREF="subject.html#2">[ subject ]</A>
<A HREF="author.html#2">[ author ]</A>
</UL>
<HR NOSHADE><P>
<!-- body="start" -->
<P>
Together with Abel Deuring I have been doing some testing
<BR>
using &quot;direct IO&quot; to speed data transfers with SANE when
<BR>
using lk 2.4 kernels. Abel has had the code in place for
<BR>
a while (both in 1.0.3 and 1.0.4) but it hasn't yet been
<BR>
used in &quot;anger&quot;. Anyway I found a small problem and have
<BR>
been unable to contact Abel. Since I don't have CVS access
<BR>
perhaps someone could apply the patch below.
<BR>
<P>--- sane-backends-1.0.4/sanei/sanei_scsi.c Thu Nov 30 15:02:30 2000
<BR>
+++ sane-backends-1.0.4/sanei/sanei_scsi.c_dio Sun Apr 1 10:38:55 2001
<BR>
@@ -2022,7 +2022,7 @@
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* check for errors, but let the sense_handler decide.... */
<BR>
- if ( (req-&gt;sgdata.sg3.hdr.info &amp;&amp; SG_INFO_CHECK != 0)
<BR>
+ if ( (req-&gt;sgdata.sg3.hdr.info &amp; SG_INFO_CHECK != 0)
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|| (req-&gt;sgdata.sg3.hdr.sb_len_wr &gt; 0 &amp;&amp;
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;((req-&gt;sgdata.sg3.sense_buffer[0] &amp; 0x7f) != 0)))
<BR>
<P><P>For any adventurous people who have a fast scsi scanner and
<BR>
are running lk 2.4 then to test this you will need to get
<BR>
sg version 3.1.18 (at <A HREF="http://www.torque.net/sg">http://www.torque.net/sg</A> ), apply
<BR>
the above patch and rebuild SANE. First try a scan to make
<BR>
sure everything is still working. Then do
<BR>
&quot;echo 1 &gt; /proc/scsi/sg/allow_dio&quot; and try to scan again.
<BR>
It works for me, but given the data transfer speed of my
<BR>
UMAX 1220S, it is hardly likely to make a measurable
<BR>
performance impact. I would be interested in reports.
<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?Subject=Re:%20[PATCH]%20sanei_scsi.c%20for%20dio%20in%20Linux&In-Reply-To=&lt;3AC74294.E93856C5@interlog.com&gt;">majordomo@mostang.com</A>
</PRE>
<P><!-- body="end" -->
<HR NOSHADE>
<UL>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0003.html">Ulrich Hopp: "Mustek 1200 SP Pro + aha152x + linux 2.4.3 = success"</A>
<LI><STRONG>Previous message:</STRONG> <A HREF="0001.html">Douglas Gilbert: "Re: SuSE 7.1 backends compile"</A>
<!-- nextthread="start" -->
<LI><STRONG>Next in thread:</STRONG> <A HREF="0007.html">Tim Waugh: "Re: [PATCH] sanei_scsi.c for dio in Linux"</A>
<LI><STRONG>Reply:</STRONG> <A HREF="0007.html">Tim Waugh: "Re: [PATCH] sanei_scsi.c for dio in Linux"</A>
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#2">[ date ]</A>
<A HREF="index.html#2">[ thread ]</A>
<A HREF="subject.html#2">[ subject ]</A>
<A HREF="author.html#2">[ author ]</A>
</UL>
<!-- trailer="footer" -->
<HR NOSHADE>
<P>
<SMALL>
<EM>
This archive was generated by <A HREF="http://www.hypermail.org/">hypermail 2b29</A>
: <EM>Sun Apr 01 2001 - 08:50:45 PDT</EM>
</EM>
</SMALL>
</BODY>
</HTML>