sane-project-website/old-archive/1999-12/0115.html

99 wiersze
4.7 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="Fri Dec 17 05:57:28 1999 PST" -->
<!-- sent="Fri, 17 Dec 1999 08:57:15 -0500" -->
<!-- name="Douglas Gilbert" -->
<!-- email="dgilbert@interlog.com" -->
<!-- subject="Re: Linux sg and sense codes" -->
<!-- id="" -->
<!-- inreplyto="Linux sg and sense codes" -->
<title>sane-devel: Re: Linux sg and sense codes</title>
<h1>Re: Linux sg and sense codes</h1>
<b>Douglas Gilbert</b> (<a href="mailto:dgilbert@interlog.com"><i>dgilbert@interlog.com</i></a>)<br>
<i>Fri, 17 Dec 1999 08:57:15 -0500</i>
<p>
<ul>
<li> <b>Messages sorted by:</b> <a href="date.html#115">[ date ]</a><a href="index.html#115">[ thread ]</a><a href="subject.html#115">[ subject ]</a><a href="author.html#115">[ author ]</a>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0116.html">Matto Marjanovic: "Re: Linux sg and sense codes"</a>
<li> <b>Previous message:</b> <a href="0114.html">Christian: "Re: SN: What is SANE ?"</a>
<li> <b>Maybe in reply to:</b> <a href="0112.html">Matto Marjanovic: "Linux sg and sense codes"</a>
<!-- nextthread="start" -->
<li> <b>Next in thread:</b> <a href="0116.html">Matto Marjanovic: "Re: Linux sg and sense codes"</a>
<!-- reply="end" -->
</ul>
<!-- body="start" -->
Matto Marjanovic wrote:<br>
<i>&gt; </i><br>
<i>&gt; Hiya, given all the new development in the Linux scsi architecture, I</i><br>
<i>&gt; figured I'd ask about an old thorn in my side (which seems to have</i><br>
<i>&gt; started poking me again recently).</i><br>
<i>&gt; </i><br>
<i>&gt; Older Microtek scanners, despite setting the "valid" bit of the first</i><br>
<i>&gt; byte of the sense buffer, return sense codes which bear no relation</i><br>
<i>&gt; to the SCSI-2 standard. A couple of years ago I figured out that</i><br>
<i>&gt; this tended to really confuse the scsi system, which would sometimes</i><br>
<i>&gt; retry commands on its own, and would inevitably *not* return the</i><br>
<i>&gt; sense data to the backend without munging it up in some way.</i><br>
<i>&gt; </i><br>
<i>&gt; This is a real nuisance because some scanners try and need to report</i><br>
<i>&gt; that they are busy in certain circumstances, but the message is</i><br>
<i>&gt; always lost. The fact that the scsi system retries the commands on</i><br>
<i>&gt; its own volition just compounds the problem.</i><br>
<i>&gt; </i><br>
<i>&gt; Do you know if anything has changed in this regard, or if there are</i><br>
<i>&gt; any ways to circumvent this snag?</i><br>
<p>
Garbage in, surprises out. Have things changed? Well as<br>
I found out recently this is a relatively complex question<br>
in the case of the linux scsi sub-system. The answer <br>
depends on which of the 2 error processing regimes <br>
available that your adapter driver uses.<br>
<p>
If the newer regime is used ("eh_code") then the request<br>
by the sg driver for no retries is almost always honoured.<br>
So there shouldn't be any retries, resets, etc<br>
<p>
If the older regime is used then the situation described<br>
above occurs. [If the ".h" or the ".c" file of your<br>
adapter source contains something like:<br>
use_new_eh_code: 1<br>
then this is the newer regime. If not, it is using the older<br>
regime.]<br>
<p>
Unfortunately, a large majority of linux scsi adapter drivers<br>
(including aic7xxx) use the older regime. The maintainer of<br>
the scsi mid level, Eric Youngdale, has renewed his push<br>
for the adapter driver maintainers to upgrade to the newer<br>
regime. The nature of open software development makes it<br>
difficult to force such an issue too hard but things are<br>
changing slowly.<br>
<p>
Sorry the answer couldn't be a bit more positive.<br>
<p>
<p>
On a brighter note, the 2.3 linux kernel developmemt tree<br>
contains a usb_scsi pseudo adapter driver. This opens<br>
up the possibility of using SANE on USB scanners that<br>
uses a scsi command set. Does anyone know of USB scanner<br>
models that use a scsi command set? [Oliver Rauch told me<br>
yesterday that he thinks the Umax 2200 falls into this<br>
group.]<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="0116.html">Matto Marjanovic: "Re: Linux sg and sense codes"</a>
<li> <b>Previous message:</b> <a href="0114.html">Christian: "Re: SN: What is SANE ?"</a>
<li> <b>Maybe in reply to:</b> <a href="0112.html">Matto Marjanovic: "Linux sg and sense codes"</a>
<!-- nextthread="start" -->
<li> <b>Next in thread:</b> <a href="0116.html">Matto Marjanovic: "Re: Linux sg and sense codes"</a>
<!-- reply="end" -->
</ul>