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

156 wiersze
7.9 KiB
HTML
Czysty Wina Historia

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="Sat Jun 26 10:54:13 1999 PDT" -->
<!-- sent="Wed, 23 Jun 1999 22:03:20 -0400" -->
<!-- name="Tom Martone" -->
<!-- email="tommartone@erols.com" -->
<!-- subject="Re: Umax 1200S on LinuxPPC R5" -->
<!-- id="" -->
<!-- inreplyto="Umax 1200S on LinuxPPC R5" -->
<title>sane-devel: Re: Umax 1200S on LinuxPPC R5</title>
<h1>Re: Umax 1200S on LinuxPPC R5</h1>
<b>Tom Martone</b> (<a href="mailto:tommartone@erols.com"><i>tommartone@erols.com</i></a>)<br>
<i>Wed, 23 Jun 1999 22:03:20 -0400</i>
<p>
<ul>
<li> <b>Messages sorted by:</b> <a href="date.html#189">[ date ]</a><a href="index.html#189">[ thread ]</a><a href="subject.html#189">[ subject ]</a><a href="author.html#189">[ author ]</a>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0190.html">Remmert: "New Camera"</a>
<li> <b>Previous message:</b> <a href="0188.html">David Mosberger-Tang: "Re: Umax 1200S on LinuxPPC R5"</a>
<li> <b>Maybe in reply to:</b> <a href="0140.html">Simon Piette: "Umax 1200S on LinuxPPC R5"</a>
<!-- nextthread="start" -->
<li> <b>Next in thread:</b> <a href="0192.html">Oliver Rauch: "Re: Umax 1200S on LinuxPPC R5"</a>
<!-- reply="end" -->
</ul>
<!-- body="start" -->
Oliver Rauch wrote:<br>
<i>&gt; </i><br>
<i>&gt; Simon Piette wrote:</i><br>
<i>&gt; </i><br>
<i>&gt; &gt;</i><br>
<i>&gt; &gt; &gt; export SANE_DEBUG_UMAX=10</i><br>
<i>&gt; &gt; &gt; and then call (x)scanimage</i><br>
<i>&gt; &gt;</i><br>
<i>&gt; &gt; OK. Here is the output. We're going foward: It's says "handled as DEVICE</i><br>
<i>&gt; &gt; BUSY!" Should I recompile the kernel with SCSI GENERIC as a module,</i><br>
<i>&gt; &gt; instead of built-in?</i><br>
<i>&gt; &gt;</i><br>
<i>&gt; &gt; [</i><br>
<i>&gt; &gt; [umax] check condition sense handler</i><br>
<i>&gt; &gt; [umax] invalid sense key =&gt; handled as DEVICE BUSY!</i><br>
<i>&gt; &gt; [umax] check condition sense handler</i><br>
<i>&gt; &gt; [umax] invalid sense key =&gt; handled as DEVICE BUSY!</i><br>
<i>&gt; &gt; [umax] attach_scanner: scanner-identification failed</i><br>
<i>&gt; &gt;</i><br>
<i>&gt; </i><br>
<i>&gt; It looks like the umax backend is not able to get an inuiry</i><br>
<i>&gt; from the scanner.</i><br>
<i>&gt; </i><br>
<i>&gt; Are you able to use other scsi-devices via the generic scsi driver</i><br>
<i>&gt; on your computer?</i><br>
<i>&gt; </i><br>
<i>&gt; Bye</i><br>
<i>&gt; Oliver</i><br>
Greetings,<br>
<p>
I've been following this discussion a bit and took a look at the<br>
sense_handler code and then took a look a the Linux SCSI Programmers<br>
HOWTO and then the SCSI-2 ansi spec.<br>
<p>
The code:<br>
if ( get_RS_error_code(result) != 0x70 ) <br>
{ <br>
DBG(DBG_proc, "invalid sense key =&gt; handled as DEVICE BUSY!\n");<br>
return SANE_STATUS_DEVICE_BUSY; /* sense key invalid */<br>
}<br>
perhaps is being a bit too restrictive. According to the SCSI spec,<br>
it seems that 0x71 is a valid value as well. 0x70 is a current error<br>
and 0x71 is a deferred error. Perhaps this is the value that Simon <br>
is getting? It would be real helpful if we could dump out the sense<br>
buffer :)<br>
<p>
I've also seen similar code written as:<br>
if ( result[0] &amp; 0x80 )<br>
{<br>
/* sense buffer invalid */<br>
return SANE_STATUS_GOOD;<br>
}<br>
That code is checking the "valid bit" talked about in the SCSI spec<br>
snippet I've included below. Then it returns the _GOOD status if<br>
it is not set (maybe this is too liberal??)<br>
<p>
I hope that this is helpful. I must admit that I find scsi error <br>
handling quite confusing myself. I'd like to see how this one gets<br>
resolved.<br>
<p>
Thanks,<br>
Tom Martone<br>
<p>
<i>&gt;From the SCSI-2 spec...</i><br>
<p>
Table 7-35: Error Codes 70h and 71h Sense Data Format<br>
<p>
==============================================================================<br>
Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |<br>
Byte | | | | | | | | |<br>
==============================================================================<br>
0 | Valid | Error Code (70h or 71h) |<br>
-----|-----------------------------------------------------------------------|<br>
1 | Segment Number |<br>
-----|-----------------------------------------------------------------------|<br>
2 |Filemark| EOM | ILI |Reserved| Sense Key |<br>
-----|-----------------------------------------------------------------------|<br>
3 | (MSB) |<br>
- - -|- - Information - -|<br>
6 | (LSB) |<br>
-----|-----------------------------------------------------------------------|<br>
7 | Additional Sense Length (n-7) |<br>
-----|-----------------------------------------------------------------------|<br>
8 | (MSB) |<br>
- - -|- - Command-Specific Information - -|<br>
11 | (LSB) |<br>
-----|-----------------------------------------------------------------------|<br>
12 | Additional Sense Code |<br>
-----|-----------------------------------------------------------------------|<br>
13 | Additional Sense Code Qualifier |<br>
-----|-----------------------------------------------------------------------|<br>
14 | Field Replaceable Unit Code |<br>
-----|-----------------------------------------------------------------------|<br>
15 to| SKSV | |<br>
- - -|---------- - Sense-Key Specific - -|<br>
17 | |<br>
-----|-----------------------------------------------------------------------|<br>
18 to| |<br>
- - -|- - Additional Sense Bytes - -|<br>
n | |<br>
==============================================================================<br>
<p>
<p>
A valid bit of zero indicates that the information field is not as defined <br>
in this standard. A valid bit of one indicates the information field contains <br>
valid information as defined in this standard. Targets shall implement the <br>
valid bit.<br>
<p>
The sense data format for error codes 70h (current errors) and 71h (deferred <br>
errors) are defined in Table 7-35. Error code values of 72h to 7Eh are <br>
reserved. Error code 7Fh is for a vendor-specific sense data format. Targets <br>
shall implement error code 70h; implementation of error code 71h is optional. <br>
Error code values of 00h to 6Fh are not defined by this standard and their use <br>
is not recommended.<br>
<p>
<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="0190.html">Remmert: "New Camera"</a>
<li> <b>Previous message:</b> <a href="0188.html">David Mosberger-Tang: "Re: Umax 1200S on LinuxPPC R5"</a>
<li> <b>Maybe in reply to:</b> <a href="0140.html">Simon Piette: "Umax 1200S on LinuxPPC R5"</a>
<!-- nextthread="start" -->
<li> <b>Next in thread:</b> <a href="0192.html">Oliver Rauch: "Re: Umax 1200S on LinuxPPC R5"</a>
<!-- reply="end" -->
</ul>