1 |
1275 |
phoenix |
/*
|
2 |
|
|
* scsi_obsolete.h Copyright (C) 1997 Eric Youngdale
|
3 |
|
|
*
|
4 |
|
|
*/
|
5 |
|
|
|
6 |
|
|
#ifndef _SCSI_OBSOLETE_H
|
7 |
|
|
#define _SCSI_OBSOLETE_H
|
8 |
|
|
|
9 |
|
|
/*
|
10 |
|
|
* These are the return codes for the abort and reset functions. The mid-level
|
11 |
|
|
* code uses these to decide what to do next. Each of the low level abort
|
12 |
|
|
* and reset functions must correctly indicate what it has done.
|
13 |
|
|
* The descriptions are written from the point of view of the mid-level code,
|
14 |
|
|
* so that the return code is telling the mid-level drivers exactly what
|
15 |
|
|
* the low level driver has already done, and what remains to be done.
|
16 |
|
|
*/
|
17 |
|
|
|
18 |
|
|
/* We did not do anything.
|
19 |
|
|
* Wait some more for this command to complete, and if this does not work,
|
20 |
|
|
* try something more serious. */
|
21 |
|
|
#define SCSI_ABORT_SNOOZE 0
|
22 |
|
|
|
23 |
|
|
/* This means that we were able to abort the command. We have already
|
24 |
|
|
* called the mid-level done function, and do not expect an interrupt that
|
25 |
|
|
* will lead to another call to the mid-level done function for this command */
|
26 |
|
|
#define SCSI_ABORT_SUCCESS 1
|
27 |
|
|
|
28 |
|
|
/* We called for an abort of this command, and we should get an interrupt
|
29 |
|
|
* when this succeeds. Thus we should not restore the timer for this
|
30 |
|
|
* command in the mid-level abort function. */
|
31 |
|
|
#define SCSI_ABORT_PENDING 2
|
32 |
|
|
|
33 |
|
|
/* Unable to abort - command is currently on the bus. Grin and bear it. */
|
34 |
|
|
#define SCSI_ABORT_BUSY 3
|
35 |
|
|
|
36 |
|
|
/* The command is not active in the low level code. Command probably
|
37 |
|
|
* finished. */
|
38 |
|
|
#define SCSI_ABORT_NOT_RUNNING 4
|
39 |
|
|
|
40 |
|
|
/* Something went wrong. The low level driver will indicate the correct
|
41 |
|
|
* error condition when it calls scsi_done, so the mid-level abort function
|
42 |
|
|
* can simply wait until this comes through */
|
43 |
|
|
#define SCSI_ABORT_ERROR 5
|
44 |
|
|
|
45 |
|
|
/* We do not know how to reset the bus, or we do not want to. Bummer.
|
46 |
|
|
* Anyway, just wait a little more for the command in question, and hope that
|
47 |
|
|
* it eventually finishes. If it never finishes, the SCSI device could
|
48 |
|
|
* hang, so use this with caution. */
|
49 |
|
|
#define SCSI_RESET_SNOOZE 0
|
50 |
|
|
|
51 |
|
|
/* We do not know how to reset the bus, or we do not want to. Bummer.
|
52 |
|
|
* We have given up on this ever completing. The mid-level code will
|
53 |
|
|
* request sense information to decide how to proceed from here. */
|
54 |
|
|
#define SCSI_RESET_PUNT 1
|
55 |
|
|
|
56 |
|
|
/* This means that we were able to reset the bus. We have restarted all of
|
57 |
|
|
* the commands that should be restarted, and we should be able to continue
|
58 |
|
|
* on normally from here. We do not expect any interrupts that will return
|
59 |
|
|
* DID_RESET to any of the other commands in the host_queue, and the mid-level
|
60 |
|
|
* code does not need to do anything special to keep the commands alive.
|
61 |
|
|
* If a hard reset was performed then all outstanding commands on the
|
62 |
|
|
* bus have been restarted. */
|
63 |
|
|
#define SCSI_RESET_SUCCESS 2
|
64 |
|
|
|
65 |
|
|
/* We called for a reset of this bus, and we should get an interrupt
|
66 |
|
|
* when this succeeds. Each command should get its own status
|
67 |
|
|
* passed up to scsi_done, but this has not happened yet.
|
68 |
|
|
* If a hard reset was performed, then we expect an interrupt
|
69 |
|
|
* for *each* of the outstanding commands that will have the
|
70 |
|
|
* effect of restarting the commands.
|
71 |
|
|
*/
|
72 |
|
|
#define SCSI_RESET_PENDING 3
|
73 |
|
|
|
74 |
|
|
/* We did a reset, but do not expect an interrupt to signal DID_RESET.
|
75 |
|
|
* This tells the upper level code to request the sense info, and this
|
76 |
|
|
* should keep the command alive. */
|
77 |
|
|
#define SCSI_RESET_WAKEUP 4
|
78 |
|
|
|
79 |
|
|
/* The command is not active in the low level code. Command probably
|
80 |
|
|
finished. */
|
81 |
|
|
#define SCSI_RESET_NOT_RUNNING 5
|
82 |
|
|
|
83 |
|
|
/* Something went wrong, and we do not know how to fix it. */
|
84 |
|
|
#define SCSI_RESET_ERROR 6
|
85 |
|
|
|
86 |
|
|
#define SCSI_RESET_SYNCHRONOUS 0x01
|
87 |
|
|
#define SCSI_RESET_ASYNCHRONOUS 0x02
|
88 |
|
|
#define SCSI_RESET_SUGGEST_BUS_RESET 0x04
|
89 |
|
|
#define SCSI_RESET_SUGGEST_HOST_RESET 0x08
|
90 |
|
|
/*
|
91 |
|
|
* This is a bitmask that is ored with one of the above codes.
|
92 |
|
|
* It tells the mid-level code that we did a hard reset.
|
93 |
|
|
*/
|
94 |
|
|
#define SCSI_RESET_BUS_RESET 0x100
|
95 |
|
|
/*
|
96 |
|
|
* This is a bitmask that is ored with one of the above codes.
|
97 |
|
|
* It tells the mid-level code that we did a host adapter reset.
|
98 |
|
|
*/
|
99 |
|
|
#define SCSI_RESET_HOST_RESET 0x200
|
100 |
|
|
/*
|
101 |
|
|
* Used to mask off bits and to obtain the basic action that was
|
102 |
|
|
* performed.
|
103 |
|
|
*/
|
104 |
|
|
#define SCSI_RESET_ACTION 0xff
|
105 |
|
|
|
106 |
|
|
#endif /* SCSI_OBSOLETE_H */
|