sane-project-website/old-archive/2001-07/0138.html

120 wiersze
4.6 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: Re: [dev] sanei_scsi.c and Linux versions &lt; 2.2.7</TITLE>
<META NAME="Author" CONTENT="abel deuring (a.deuring@satzbau-gmbh.de)">
<META NAME="Subject" CONTENT="Re: [dev] sanei_scsi.c and Linux versions &lt; 2.2.7">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Re: [dev] sanei_scsi.c and Linux versions &lt; 2.2.7</H1>
<!-- received="Mon Jul 16 03:02:23 2001" -->
<!-- isoreceived="20010716100223" -->
<!-- sent="Mon, 16 Jul 2001 13:27:40 +0200" -->
<!-- isosent="20010716112740" -->
<!-- name="abel deuring" -->
<!-- email="a.deuring@satzbau-gmbh.de" -->
<!-- subject="Re: [dev] sanei_scsi.c and Linux versions &lt; 2.2.7" -->
<!-- id="3B52CFAC.3161961D@satzbau-gmbh.de" -->
<!-- inreplyto="3B525CFC.5301A157@interlog.com" -->
<STRONG>From:</STRONG> abel deuring (<A HREF="mailto:a.deuring@satzbau-gmbh.de?Subject=Re:%20[dev]%20sanei_scsi.c%20and%20Linux%20versions%20&lt;%202.2.7&In-Reply-To=&lt;3B52CFAC.3161961D@satzbau-gmbh.de&gt;"><EM>a.deuring@satzbau-gmbh.de</EM></A>)<BR>
<STRONG>Date:</STRONG> Mon Jul 16 2001 - 04:27:40 PDT
<P>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0139.html">Major A: "Re: Nikon Coolscan SCSI commands"</A>
<UL>
<LI><STRONG>Previous message:</STRONG> <A HREF="0137.html">Jean-Marie Fenaille: "Guillemot MaxiScanA4"</A>
<LI><STRONG>In reply to:</STRONG> <A HREF="0135.html">Douglas Gilbert: "Re: [dev] sanei_scsi.c and Linux versions &lt; 2.2.7"</A>
<!-- nextthread="start" -->
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#138">[ date ]</A>
<A HREF="index.html#138">[ thread ]</A>
<A HREF="subject.html#138">[ subject ]</A>
<A HREF="author.html#138">[ author ]</A>
</UL>
<HR NOSHADE><P>
<!-- body="start" -->
<P>
Douglas Gilbert wrote:
<BR>
<EM>&gt; &gt; Well, the error report could of course be added to sanei_scsi_req_enter,
</EM><BR>
<EM>&gt; &gt; but a backend should check for this error in sanei_scsi_req_wait too: If
</EM><BR>
<EM>&gt; &gt; you queue two or more commands and the low level driver does not support
</EM><BR>
<EM>&gt; &gt; command queueing, sanei_scsi_req_enter puts the second and following
</EM><BR>
<EM>&gt; &gt; commands into its internal queue, so it cannot return an error from the
</EM><BR>
<EM>&gt; &gt; SG driver.
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt; The reserved buffer is only good for one SCSI command
</EM><BR>
<EM>&gt; at a time (per file descriptor) and only if it is big
</EM><BR>
<EM>&gt; enough to hold the size of transfer being requested.
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt; Thus when commands are queued there is a risk that
</EM><BR>
<EM>&gt; subsequent commands will fail with ENOMEM. This &quot;out of
</EM><BR>
<EM>&gt; memory&quot; situation is more likely to occur with ISA
</EM><BR>
<EM>&gt; SCSI adapters which can only use the bottom 16 MB of
</EM><BR>
<EM>&gt; memory for DMA. This is not a hard error and should
</EM><BR>
<EM>&gt; not be treated as such [IMO]. The reserve buffer
</EM><BR>
<EM>&gt; more or less guarantees SANE can queue 1 command.
</EM><BR>
<EM>&gt; If memory is not available to queue 2 or more commands
</EM><BR>
<EM>&gt; then wait ....
</EM><BR>
<P>Doug,
<BR>
<P>thanks for helping my memory :) I knew there were even more reasons to
<BR>
check ENOMEM late, but I could not remember them while I wrote my mail.
<BR>
<P>Abel
<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[dev]%20sanei_scsi.c%20and%20Linux%20versions%20&lt;%202.2.7&In-Reply-To=&lt;3B52CFAC.3161961D@satzbau-gmbh.de&gt;">majordomo@mostang.com</A>
</PRE>
<P><!-- body="end" -->
<HR NOSHADE>
<UL>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0139.html">Major A: "Re: Nikon Coolscan SCSI commands"</A>
<LI><STRONG>Previous message:</STRONG> <A HREF="0137.html">Jean-Marie Fenaille: "Guillemot MaxiScanA4"</A>
<LI><STRONG>In reply to:</STRONG> <A HREF="0135.html">Douglas Gilbert: "Re: [dev] sanei_scsi.c and Linux versions &lt; 2.2.7"</A>
<!-- nextthread="start" -->
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#138">[ date ]</A>
<A HREF="index.html#138">[ thread ]</A>
<A HREF="subject.html#138">[ subject ]</A>
<A HREF="author.html#138">[ 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>Mon Jul 16 2001 - 03:04:42 PDT</EM>
</EM>
</SMALL>
</BODY>
</HTML>