This file is indexed.

/usr/share/doc/HOWTO/ja-html/SCSI-Programming-HOWTO-21.html is in doc-linux-ja-html 2006.05.25-1.1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
 <META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.21">
 <TITLE>The Linux SCSI programming HOWTO: $B%(%i!<=hM}(B</TITLE>
 <LINK HREF="SCSI-Programming-HOWTO-22.html" REL=next>
 <LINK HREF="SCSI-Programming-HOWTO-20.html" REL=previous>
 <LINK HREF="SCSI-Programming-HOWTO.html#toc21" REL=contents>
</HEAD>
<BODY>
<A HREF="SCSI-Programming-HOWTO-22.html">$B<!$N%Z!<%8(B</A>
<A HREF="SCSI-Programming-HOWTO-20.html">$BA0$N%Z!<%8(B</A>
<A HREF="SCSI-Programming-HOWTO.html#toc21">$BL\<!$X(B</A>
<HR>
<H2><A NAME="s21">21.</A> <A HREF="SCSI-Programming-HOWTO.html#toc21">$B%(%i!<=hM}(B</A></H2>

<P>
<A NAME="sec-errorhandling"></A> 
$B4X?t(B <CODE>open</CODE>, <CODE>ioctl</CODE>, <CODE>write</CODE> $B$*$h$S(B <CODE>read</CODE> $B$O(B
$B%(%i!<$rJs9p$9$k2DG=@-$,$"$j$^$9!#$3$N>l9g!"4X?t$NJV$jCM$O(B -1 $B$G(B
$BBg0hJQ?t(B errno $B$K%(%i!<HV9f$,M?$($i$l$^$9!#(B
errno $B$NCM$O(B <CODE>/usr/include/errno.h</CODE> $B$K$*$$$FDj5A$5$l$F$$$^$9!#(B
$B0J2<$N$h$&$JCM$r$H$j$($^$9!'(B</P>

<P>
<BLOCKQUOTE><CODE>
<PRE>
$B4X?t(B     | $B%(%i!<(B       | $B2r@b(B
=========|==============|=============================================
open     | ENXIO        | $B%G%P%$%9$,L58z(B
         | EACCES       | $B%"%/%;%9%b!<%I$,(Bread/write(O_RDWR)$B$G$J$$(B 
         | EBUSY        | $B%G%P%$%9$KBP$7%V%m%C%/$7$J$$%"%/%;%9$,MW5a(B
         |              | $B$5$l$?$,!"8=:_$O%S%8!<>uBV!#(B
         | ERESTARTSYS  | $B$3$l$OFbIt$N%(%i!<$r<($9!#:F8=2DG=$K$7$F(B
         |              | SCSI $B%A%c%s%M%k$KJs$;$i$l$?$$(B($B%P%0Js9p$N>\:Y(B
         |              | $B$O(B Drew Eckhardts $B$K$h$k(B SCSI-HOWTO $B$r$_$h(B)
ioctl    | ENXIO        | $B%G%P%$%9$,L58z(B
read     | EAGAIN       | $B%G%P%$%9$,%V%m%C%/$7$h$&$H$9$k!#8e$G:F;n9T$r!#(B
         | ERESTARTSYS  | $B$3$l$,FbIt$N%(%i!<$r<($9!#:F8=2DG=$K$7$F(B
         |              | SCSI $B%A%c%s%M%k$KJs$;$i$l$?$$(B($B%P%0Js9p$N>\:Y(B
         |              | $B$O(B Drew Eckhardts $B$K$h$k(B SCSI-HOWTO $B$r$_$h(B)
write    | EIO          | $BD9$5$,C;$+$9$.(B ($B6&DL%X%C%@9=B$BN$h$j>.$5$$(B)$B!#(B
         |              | $B7Y9p(B: $B8=:_$N=j!"D9$5D62a$N3NG'$O$J$$!#(B
         | EAGAIN       | $B%G%P%$%9$,%V%m%C%/$7$h$&$H$9$k!#8e$G:F;n9T$r!#(B
         | ENOMEM       | $B$3$NMW5a$KI,MW$J%a%b%j$r3dEv$F$G$-$J$+$C$?!#(B
         |              | $B:GBgEAAw%5%$%:$rD6$($F$$$J$$$J$i$P8e$G:F;n9T(B
         |              | $B$r(B($B>e$r$_$h(B)$B!#(B
select   |              | $B$J$7(B
close    |              | $B$J$7(B
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>read/write $B$N@5$NJV$jCM$ONc$K$h$C$FEAAw$K@.8y$7$?%P%$%H?t$r<($7$F$$(B
$B$^$9!#$3$l$OMW5a$7$?%P%$%H?t$HEy$7$$$Y$-$G$9!#(B</P>

<H2><A NAME="ss21.1">21.1</A> <A HREF="SCSI-Programming-HOWTO.html#toc21.1">$B%(%i!<%9%F!<%?%9$N2rFI(B</A>
</H2>

<P>
<A NAME="sec-stat-decoding"></A> 
$B$5$i$K$h$j>\:Y$JJs9p$,%+!<%M%k$N(B <CODE>hd_status</CODE> $B$H(B $B%G%P%$%9$N(B
<CODE>sense_buffer</CODE> $B$K$h$C$F$J$5$l$^$9(B(
<A HREF="SCSI-Programming-HOWTO-10.html#sec-sensebuff">sec-sensebuff</A>
$B>O$r$_$F$/(B
$B$@$5$$(B)$B!#$$$:$l$b6&DL%X%C%@9=B$BN$K$"$j$^$9!#(B</P>
<P><CODE>hd_status</CODE> $B$N0UL#$O(B <CODE>drivers/scsi/scsi.h</CODE> $B$GDs6!$5$l$^$9!'(B
$B$3$N(B <CODE>unsigned int</CODE> $B$O0[$J$kItJ,$+$i9=@.$5$l$F$$$^$9!#(B</P>
<P>
<BLOCKQUOTE><CODE>
<PRE>
  lsb  |    ...    |    ...    | msb
=======|===========|===========|============
status | sense key | host code | driver byte
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P><CODE>drivers/scsi/scsi.h</CODE>$B$G$3$l$i$N%^%/%m$r<j$KF~$l$k$3$H$,$G$-(B
$B$k$N$G$9$,!"IT9,$K$7$FK`2DIT;W5D$J%X%C%@%U%!%$%k$NAj8_0MB8$N$?$a$K(B
$B4JC1$K$O;H$($^$;$s!#$3$3$r$-$l$$$K$7$J$$$H$$$1$^$;$s!#(B</P>
<P>
<BLOCKQUOTE><CODE>
<PRE>
       $B%^%/%m(B          | $B2r@b(B
=======================|====================================================
status_byte(hd_status) | SCSI $BAuCV$N>uBV!#%9%F!<%?%9%3!<%I$N>O$r$_$h!#(B
msg_byte(hd_status)    | $BAuCV$h$j!#(BSCSI sense keys $B$N>O$r$_$h!#(B
host_byte(hd_status)   | $B%+!<%M%k$h$j!#(B Hostcodes $B$N>O$r$_$h!#(B
driver_byte(hd_status) | $B%+!<%M%k$h$j!#(B. midlevel codes $B$N>O$r$_$h!#(B
</PRE>
</CODE></BLOCKQUOTE>
</P>

<H2><A NAME="ss21.2">21.2</A> <A HREF="SCSI-Programming-HOWTO.html#toc21.2">$B%9%F!<%?%9%3!<%I(B</A>
</H2>

<P>
<A NAME="sec-statuscodes"></A> </P>
<P>$B0J2<$N(BSCSI $BAuCV$+$iJV$5$l$k%9%F!<%?%9%3!<%I$,(B(<CODE>scsi/scsi.h</CODE>$B$GDj(B
$B5A$5$l$F$$$^$9(B)$BMxMQ2DG=$G$9!#(B</P>
<P>
<BLOCKQUOTE><CODE>
<PRE>
 $BCM(B   | $B%7%s%\%k(B
======|=====================
0x00  | GOOD
0x01  | CHECK_CONDITION
0x02  | CONDITION_GOOD
0x04  | BUSY
0x08  | INTERMEDIATE_GOOD
0x0a  | INTERMEDIATE_C_GOOD
0x0c  | RESERVATION_CONFLICT
</PRE>
</CODE></BLOCKQUOTE>
</P>

<P>$B$3$l$i$N%7%s%\%k$NCM$O(B<B>$B1&$K0l$D%7%U%H(B</B>$B$5$l$F$$$k$3$H$KCm0U$7$F(B
$B$/$@$5$$!#%9%F!<%?%9$,(B CHECK_CONDITION $B$N$H$-$J$i$P!"%;%s%9%P%C%U%!(B
$BFb$N%;%s%9%G!<%?$OM-8z$G$9(B($BFC$KDI2CE*$J%;%s%9%3!<%I$HDI2CE*$J%;%s%9(B
$B%3!<%I%/%*%j%U%!%$%"$r3NG'$7$F$/$@$5$$(B)$B!#(B</P>
<P>$B$3$l$i$NCM$K$O(B SCSI-2 $B;EMM=q$K$h$k$H<!$N$h$&$J0UL#$,$"$j$^$9!#(B
<BLOCKQUOTE><CODE>
<PRE>

                           Table 27: Status Byte Code
+=================================-==============================+
|       Bits of Status Byte       |  Status                      |
|  7   6   5   4   3   2   1   0  |                              |
|---------------------------------+------------------------------|
|  R   R   0   0   0   0   0   R  |  GOOD                        |
|  R   R   0   0   0   0   1   R  |  CHECK CONDITION             |
|  R   R   0   0   0   1   0   R  |  CONDITION MET               |
|  R   R   0   0   1   0   0   R  |  BUSY                        |
|  R   R   0   1   0   0   0   R  |  INTERMEDIATE                |
|  R   R   0   1   0   1   0   R  |  INTERMEDIATE-CONDITION MET  |
|  R   R   0   1   1   0   0   R  |  RESERVATION CONFLICT        |
|  R   R   1   0   0   0   1   R  |  COMMAND TERMINATED          |
|  R   R   1   0   1   0   0   R  |  QUEUE FULL                  |
|                                 |                              |
|       All Other Codes           |  Reserved                    |
|----------------------------------------------------------------|
|  Key: R = Reserved bit                                         |
+================================================================+
</PRE>
</CODE></BLOCKQUOTE>

$B%9%F!<%?%9%P%$%H%3!<%I$NDj5A$r0J2<$KM?$($k!#(B
<BLOCKQUOTE><CODE>
<PRE>
GOOD.  $B$3$N>uBV$O%?!<%2%C%H$,%3%^%s%I$N<B9T$K@.8y$7$?$3$H$r<($9!#(B

CHECK CONDITION.  $B$3$N>uBV$O(B contingent allegiance condition $B$,H/@8$7$?(B
$B$3$H$r<($9!#(B(6.6$B$r$_$h(B)$B!#(B

CONDITION MET.  $B$3$N>uBV$b$7$/$O(B INTERMEDIATE-CONDITION MET $B$OMW5a$7$?(B
$BA`:n$,C#@.$5$l$?$H$-$K$O$$$D$G$bJV$5$l$k!#(B(SEARCH DATA $B5Z$S(B PRE-FETCH
$B%3%^%s%I$r$_$h(B)$B!#(B

BUSY.  $B$3$N>uBV$O%?!<%2%C%H$,%S%8!<$G$"$k$3$H$r<($9!#$3$N>uBV$O%?!<%2%C%H(B
$B$,%3%^%s%I$r$=$NB>$N<uIU2DG=$J%$%K%7%(!<%?(B($B$9$J$o$AJ]N1$G$-$J$$>WFM(B)$B$+$i$N(B
$B%3%^%s%I$r<u$1IU$1$k$3$H$,$G$-$J$$$H$-$O$$$D$G$bJV$5$l$k$G$"$m$&!#?d>)$5$l(B
$B$k%$%K%7%(!<%?$N2sI|F0:n$O8e$N;~E@$G:F$S%3%^%s%I$rH/9T$9$k$3$H$G$"$k!#(B

INTERMEDIATE. $B$3$N>uBV$b$7$/$O(B INTERMEDIATE-CONDITION MET $B$O!"%3%^%s%I$,(B
CHECK CONDITION, RESERVATION CONFLICT $B$b$7$/$O(B COMMAND TERMINATED $B%9%F!<%?%9(B
$B$K$h$C$F$O=*N;$7$J$+$C$?>l9g$K!"0l$D$J$,$j$NO"7k$7$?%3%^%s%I72(B($B:G8e$N%3%^%s(B
$B%I$r=|$/(B)$B$K$*$$$F3F%3%^%s%I$N<B9T$K@.8y$7$?$H$-$KJV$5$l$k!#$b$7(B INTERMEDIATE
$B$"$k$$$O(B INTERMEDIATE-CONDITION MET $B%9%F!<%?%9$,JV$5$l$J$$$J$i$P!"$=$NO"7k$7(B
$B$?%3%^%s%INs$O=*N;$7$FF~=PNOA`:n$O=*$($i$l$F$$$k!#(B

INTERMEDIATE-CONDITION MET.  $B$3$N>uBV$O(B CONDITON MET $B$H(B INTERMEDIATE $B%9%F!<%?(B
$B%9$,AH9g$5$C$?$b$N$G$"$k!#(B

RESERVATION CONFLICT.  $B$3$N>uBV$O%$%K%7%(!<%?$,JL$N(B SCSI $BAuCV$KBP$7$F>WFMJ]N1(B
$BM=Ls7?$H$7$F;XDj$5$l$F$$$k%m%8%+%k%f%K%C%H$b$7$/$O%m%8%+%k%f%K%C%HFbIt$NDxEY(B
[?? extent ??]$B$K%"%/%;%9$r;n$_$?>l9g$KI,$:JV$5$l$k!#?d>)$5$l$k%$%K%7%(!<%?$N2sI|(B
$BF0:n$O8e$N;~E@$G:FEY%3%^%s%I$rH/9T$9$k$3$H$G$"$k!#(B

COMMAND TERMINATED.  $B$3$N>uBV$O(B TERMINATE I/O PROCESS $B%a%C%;!<%8(B(5.6.22 $B$r$_$h(B)
$B$r<u$1<h$C$?$"$H$G%?!<%2%C%H$,8=:_$NF~=PNOA`:n$r=*N;$5$;$k>l9g$KJV$5$l$k!#$3$N(B
$B>uBV$O$^$?(B contingent allegiance condition $B$,H/@8$7$?$3$H$b<($7$F$$$k(B(6.6 $B$r$_$h(B)$B!#(B

QUEUE FULL.  $B$3$N>uBV$O%?%0IU$1$5$l$?%-%e!<A`:n$,<BAu$5$l$F$$$k>l9g$K<BAu$5$l$k(B
$B$H$9$k!#$3$N>uBV$O(B SIMPLE QUEUE TAG, ORDERED QUEUE TAG $B$b$7$/$O(B HEAD OF QUEUE TAG
$B%a%C%;!<%8$,<u$1<h$i$l%3%^%s%I%-%e!<$,$$$C$Q$$$G$"$k$H$-$KJV$5$l$k!#F~=PNOA`:n(B
$B$O%3%^%s%I%-%e!<Fb$KG[CV$5$l$J$$!#(B
</PRE>
</CODE></BLOCKQUOTE>
</P>


<H2><A NAME="ss21.3">21.3</A> <A HREF="SCSI-Programming-HOWTO.html#toc21.3">SCSI Sense Keys</A>
</H2>

<P>
<A NAME="sec-sensekeys"></A> 
$B$3$l$i$N%+!<%M%k%7%s%\%k(B(<CODE>scsi/scsi.h</CODE>$B$h$j(B)$B$,$"$i$+$8$aDj5A(B
$B$5$l$F$$$^$9!#(B</P>
<P>
<BLOCKQUOTE><CODE>
<PRE>
Value | Symbol
======|================
0x00  | NO_SENSE
0x01  | RECOVERED_ERROR
0x02  | NOT_READY
0x03  | MEDIUM_ERROR
0x04  | HARDWARE_ERROR
0x05  | ILLEGAL_REQUEST
0x06  | UNIT_ATTENTION
0x07  | DATA_PROTECT
0x08  | BLANK_CHECK
0x0a  | COPY_ABORTED
0x0b  | ABORTED_COMMAND
0x0d  | VOLUME_OVERFLOW
0x0e  | MISCOMPARE
</PRE>
</CODE></BLOCKQUOTE>
</P>

<P>SCSI-2 $BJ8=q$K$"$k%j%9%H$=$N$^$^$O0J2<$NDL$j$G$9(B(7.2.14.3 $B>O$h$j(B)$B!#(B
<BLOCKQUOTE><CODE>
<PRE>
                    Table 69: Sense Key (0h-7h) Descriptions
+========-====================================================================+
| Sense  |  Description                                                       |
|  Key   |                                                                    |
|--------+--------------------------------------------------------------------|
|   0h   |  NO SENSE.  Indicates that there is no specific sense key          |
|        |  information to be reported for the designated logical unit.  This |
|        |  would be the case for a successful command or a command that      |
|        |  received CHECK CONDITION or COMMAND TERMINATED status because one |
|        |  of the filemark, EOM, or ILI bits is set to one.                  |
|--------+--------------------------------------------------------------------|
|   1h   |  RECOVERED ERROR.  Indicates that the last command completed       |
|        |  successfully with some recovery action performed by the target.   |
|        |  Details may be determinable by examining the additional sense     |
|        |  bytes and the information field.  When multiple recovered errors  |
|        |  occur during one command, the choice of which error to report     |
|        |  (first, last, most severe, etc.) is device specific.              |
|--------+--------------------------------------------------------------------|
|   2h   |  NOT READY.  Indicates that the logical unit addressed cannot be   |
|        |  accessed.  Operator intervention may be required to correct this  |
|        |  condition.                                                        |
|--------+--------------------------------------------------------------------|
|   3h   |  MEDIUM ERROR.  Indicates that the command terminated with a non-  |
|        |  recovered error condition that was probably caused by a flaw in   |
|        |  the medium or an error in the recorded data.  This sense key may  |
|        |  also be returned if the target is unable to distinguish between a |
|        |  flaw in the medium and a specific hardware failure (sense key 4h).|
|--------+--------------------------------------------------------------------|
|   4h   |  HARDWARE ERROR.  Indicates that the target detected a non-        |
|        |  recoverable hardware failure (for example, controller failure,    |
|        |  device failure, parity error, etc.) while performing the command  |
|        |  or during a self test.                                            |
|--------+--------------------------------------------------------------------|
|   5h   |  ILLEGAL REQUEST.  Indicates that there was an illegal parameter in|
|        |  the command descriptor block or in the additional parameters      |
|        |  supplied as data for some commands (FORMAT UNIT, SEARCH DATA,     |
|        |  etc.).  If the target detects an invalid parameter in the command |
|        |  descriptor block, then it shall terminate the command without     |
|        |  altering the medium.  If the target detects an invalid parameter  |
|        |  in the additional parameters supplied as data, then the target may|
|        |  have already altered the medium.  This sense key may also indicate|
|        |  that an invalid IDENTIFY message was received (5.6.7).            |
|--------+--------------------------------------------------------------------|
|   6h   |  UNIT ATTENTION.  Indicates that the removable medium may have been|
|        |  changed or the target has been reset.  See 6.9 for more detailed  |
|        |  information about the unit attention condition.                   |
|--------+--------------------------------------------------------------------|
|   7h   |  DATA PROTECT.  Indicates that a command that reads or writes the  |
|        |  medium was attempted on a block that is protected from this       |
|        |  operation.  The read or write operation is not performed.         |
+=============================================================================+

                    Table 70: Sense Key (8h-Fh) Descriptions
+========-====================================================================+
| Sense  |  Description                                                       |
|  Key   |                                                                    |
|--------+--------------------------------------------------------------------|
|   8h   |  BLANK CHECK.  Indicates that a write-once device or a sequential- |
|        |  access device encountered blank medium or format-defined end-of-  |
|        |  data indication while reading or a write-once device encountered a|
|        |  non-blank medium while writing.                                   |
|--------+--------------------------------------------------------------------|
|   9h   |  Vendor Specific.  This sense key is available for reporting vendor|
|        |  specific conditions.                                              |
|--------+--------------------------------------------------------------------|
|   Ah   |  COPY ABORTED.  Indicates a COPY, COMPARE, or COPY AND VERIFY      |
|        |  command was aborted due to an error condition on the source       |
|        |  device, the destination device, or both.  (See 7.2.3.2 for        |
|        |  additional information about this sense key.)                     |
|--------+--------------------------------------------------------------------|
|   Bh   |  ABORTED COMMAND.  Indicates that the target aborted the command.  |
|        |  The initiator may be able to recover by trying the command again. |
|--------+--------------------------------------------------------------------|
|   Ch   |  EQUAL.  Indicates a SEARCH DATA command has satisfied an equal    |
|        |  comparison.                                                       |
|--------+--------------------------------------------------------------------|
|   Dh   |  VOLUME OVERFLOW.  Indicates that a buffered peripheral device has |
|        |  reached the end-of-partition and data may remain in the buffer    |
|        |  that has not been written to the medium.  A RECOVER BUFFERED DATA |
|        |  command(s) may be issued to read the unwritten data from the      |
|        |  buffer.                                                           |
|--------+--------------------------------------------------------------------|
|   Eh   |  MISCOMPARE.  Indicates that the source data did not match the data|
|        |  read from the medium.                                             |
|--------+--------------------------------------------------------------------|
|   Fh   |  RESERVED.                                                         |
+=============================================================================+
</PRE>
</CODE></BLOCKQUOTE>
</P>


<H2><A NAME="ss21.4">21.4</A> <A HREF="SCSI-Programming-HOWTO.html#toc21.4">Host codes</A>
</H2>

<P>
<A NAME="sec-hostcodes"></A> 
$B0J2<$N(B host code $B$O(B <CODE>drivers/scsi/scsi.h</CODE> $B$K$*$$$FDj5A$5$l$F$$$^$9!#(B
$B$3$l$i$O%+!<%M%k%I%i%$%P$K$h$j%;%C%H$5$l$^$9!#(B</P>
<P>
<BLOCKQUOTE><CODE>
<PRE>
Value | Symbol         | Description
======|================|========================================
0x00  | DID_OK         | No error
0x01  | DID_NO_CONNECT | Couldn't connect before timeout period
0x02  | DID_BUS_BUSY   | BUS stayed busy through time out period
0x03  | DID_TIME_OUT   | TIMED OUT for other reason
0x04  | DID_BAD_TARGET | BAD target
0x05  | DID_ABORT      | Told to abort for some other reason
0x06  | DID_PARITY     | Parity error
0x07  | DID_ERROR      | internal error
0x08  | DID_RESET      | Reset by somebody
0x09  | DID_BAD_INTR   | Got an interrupt we weren't expecting
</PRE>
</CODE></BLOCKQUOTE>
</P>

<H2><A NAME="ss21.5">21.5</A> <A HREF="SCSI-Programming-HOWTO.html#toc21.5">Driver codes</A>
</H2>

<P>
<A NAME="sec-drivercodes"></A> 
$BCf4VAX$N%I%i%$%P$OAuCV$+$i$N%;%s%9%-!<$K4p$E$$$FDc?e=`%I%i%$%P$+$i(B
$BJV$5$l$?>uBV$rN`JL$7$^$9!#$5$i$K:F;n9T!"Cf;_$"$k$$$O:F%^%C%W$H$$$C$?(B
$B$H$k$Y$-$$$/$D$+$NF0:n$r<(:6$7$^$9!#(B</P>
<P>
<BLOCKQUOTE><CODE>
<PRE>
Value | Symbol         | Description of Driver status
======|================|========================================
0x00  | DRIVER_OK      | No error
0x01  | DRIVER_BUSY    | not used
0x02  | DRIVER_SOFT    | not used
0x03  | DRIVER_MEDIA   | not used
0x04  | DRIVER_ERROR   | internal driver error
0x05  | DRIVER_INVALID | finished (DID_BAD_TARGET or DID_ABORT)
0x06  | DRIVER_TIMEOUT | finished with timeout
0x07  | DRIVER_HARD    | finished with fatal error
0x08  | DRIVER_SENSE   | had sense information available
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>
<BLOCKQUOTE><CODE>
<PRE>
Value | Symbol         | Description of suggestion
======|================|========================================
0x10  | SUGGEST_RETRY  | retry the SCSI request
0x20  | SUGGEST_ABORT  | abort the request
0x30  | SUGGEST_REMAP  | remap the block (not yet implemented)
0x40  | SUGGEST_DIE    | let the kernel panic
0x80  | SUGGEST_SENSE  | get sense information from the device
0xff  | SUGGEST_IS_OK  | nothing to be done
</PRE>
</CODE></BLOCKQUOTE>
</P>

<HR>
<A HREF="SCSI-Programming-HOWTO-22.html">$B<!$N%Z!<%8(B</A>
<A HREF="SCSI-Programming-HOWTO-20.html">$BA0$N%Z!<%8(B</A>
<A HREF="SCSI-Programming-HOWTO.html#toc21">$BL\<!$X(B</A>
</BODY>
</HTML>