diff options
author | <hch@lst.de> | 2005-04-10 23:19:25 -0400 |
---|---|---|
committer | James Bottomley <jejb@titanic> | 2005-04-16 21:14:52 -0400 |
commit | 0db7157ca47e21c7623a59e710b807ad06fce161 (patch) | |
tree | 932c6f9689fd08a7a9d689cfbec8682ccde8175d | |
parent | 84011ae88da62a20b3ae7b48e2ae3b1ef0fc810a (diff) |
[PATCH] kill old EH constants
Fix up two drivers that incorrectly were using the old return values for
their new-style EH methods and kill off scsi_obsolete.h that defined the
constants. The initio driver has all these constansts defined locally
and uses them internally, I'll fix that up some time later.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
-rw-r--r-- | drivers/scsi/scsi.h | 6 | ||||
-rw-r--r-- | drivers/scsi/scsi_obsolete.h | 106 | ||||
-rw-r--r-- | drivers/scsi/ultrastor.c | 4 | ||||
-rw-r--r-- | drivers/usb/image/microtek.c | 2 |
4 files changed, 3 insertions, 115 deletions
diff --git a/drivers/scsi/scsi.h b/drivers/scsi/scsi.h index 6e7bb068220f..e2360c26ef01 100644 --- a/drivers/scsi/scsi.h +++ b/drivers/scsi/scsi.h | |||
@@ -60,12 +60,6 @@ struct scatterlist; | |||
60 | #define scsi_to_pci_dma_dir(scsi_dir) ((int)(scsi_dir)) | 60 | #define scsi_to_pci_dma_dir(scsi_dir) ((int)(scsi_dir)) |
61 | #define scsi_to_sbus_dma_dir(scsi_dir) ((int)(scsi_dir)) | 61 | #define scsi_to_sbus_dma_dir(scsi_dir) ((int)(scsi_dir)) |
62 | 62 | ||
63 | /* | ||
64 | * This is the crap from the old error handling code. We have it in a special | ||
65 | * place so that we can more easily delete it later on. | ||
66 | */ | ||
67 | #include "scsi_obsolete.h" | ||
68 | |||
69 | /* obsolete typedef junk. */ | 63 | /* obsolete typedef junk. */ |
70 | #include "scsi_typedefs.h" | 64 | #include "scsi_typedefs.h" |
71 | 65 | ||
diff --git a/drivers/scsi/scsi_obsolete.h b/drivers/scsi/scsi_obsolete.h deleted file mode 100644 index abeacb996ea0..000000000000 --- a/drivers/scsi/scsi_obsolete.h +++ /dev/null | |||
@@ -1,106 +0,0 @@ | |||
1 | /* | ||
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 */ | ||
diff --git a/drivers/scsi/ultrastor.c b/drivers/scsi/ultrastor.c index 7484916fe2aa..a00095cc74c6 100644 --- a/drivers/scsi/ultrastor.c +++ b/drivers/scsi/ultrastor.c | |||
@@ -945,7 +945,7 @@ static int ultrastor_abort(Scsi_Cmnd *SCpnt) | |||
945 | config.mscp[mscp_index].SCint, SCpnt); | 945 | config.mscp[mscp_index].SCint, SCpnt); |
946 | #endif | 946 | #endif |
947 | if (config.mscp[mscp_index].SCint == 0) | 947 | if (config.mscp[mscp_index].SCint == 0) |
948 | return SCSI_ABORT_NOT_RUNNING; | 948 | return FAILURE; |
949 | 949 | ||
950 | if (config.mscp[mscp_index].SCint != SCpnt) panic("Bad abort"); | 950 | if (config.mscp[mscp_index].SCint != SCpnt) panic("Bad abort"); |
951 | config.mscp[mscp_index].SCint = NULL; | 951 | config.mscp[mscp_index].SCint = NULL; |
@@ -1020,7 +1020,7 @@ static int ultrastor_host_reset(Scsi_Cmnd * SCpnt) | |||
1020 | #endif | 1020 | #endif |
1021 | 1021 | ||
1022 | spin_unlock_irqrestore(host->host_lock, flags); | 1022 | spin_unlock_irqrestore(host->host_lock, flags); |
1023 | return SCSI_RESET_SUCCESS; | 1023 | return SUCCESS; |
1024 | 1024 | ||
1025 | } | 1025 | } |
1026 | 1026 | ||
diff --git a/drivers/usb/image/microtek.c b/drivers/usb/image/microtek.c index de0d32f6618d..cab89a970c7f 100644 --- a/drivers/usb/image/microtek.c +++ b/drivers/usb/image/microtek.c | |||
@@ -335,7 +335,7 @@ static int mts_scsi_abort (Scsi_Cmnd *srb) | |||
335 | 335 | ||
336 | mts_urb_abort(desc); | 336 | mts_urb_abort(desc); |
337 | 337 | ||
338 | return SCSI_ABORT_PENDING; | 338 | return FAILURE; |
339 | } | 339 | } |
340 | 340 | ||
341 | static int mts_scsi_host_reset (Scsi_Cmnd *srb) | 341 | static int mts_scsi_host_reset (Scsi_Cmnd *srb) |