aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/atari_scsi.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/atari_scsi.h')
-rw-r--r--drivers/scsi/atari_scsi.h174
1 files changed, 55 insertions, 119 deletions
diff --git a/drivers/scsi/atari_scsi.h b/drivers/scsi/atari_scsi.h
index f917bdd09b41..efadb8d567c2 100644
--- a/drivers/scsi/atari_scsi.h
+++ b/drivers/scsi/atari_scsi.h
@@ -21,11 +21,7 @@
21int atari_scsi_detect (struct scsi_host_template *); 21int atari_scsi_detect (struct scsi_host_template *);
22const char *atari_scsi_info (struct Scsi_Host *); 22const char *atari_scsi_info (struct Scsi_Host *);
23int atari_scsi_reset (Scsi_Cmnd *, unsigned int); 23int atari_scsi_reset (Scsi_Cmnd *, unsigned int);
24#ifdef MODULE
25int atari_scsi_release (struct Scsi_Host *); 24int atari_scsi_release (struct Scsi_Host *);
26#else
27#define atari_scsi_release NULL
28#endif
29 25
30/* The values for CMD_PER_LUN and CAN_QUEUE are somehow arbitrary. Higher 26/* The values for CMD_PER_LUN and CAN_QUEUE are somehow arbitrary. Higher
31 * values should work, too; try it! (but cmd_per_lun costs memory!) */ 27 * values should work, too; try it! (but cmd_per_lun costs memory!) */
@@ -63,6 +59,32 @@ int atari_scsi_release (struct Scsi_Host *);
63#define NCR5380_dma_xfer_len(i,cmd,phase) \ 59#define NCR5380_dma_xfer_len(i,cmd,phase) \
64 atari_dma_xfer_len(cmd->SCp.this_residual,cmd,((phase) & SR_IO) ? 0 : 1) 60 atari_dma_xfer_len(cmd->SCp.this_residual,cmd,((phase) & SR_IO) ? 0 : 1)
65 61
62/* former generic SCSI error handling stuff */
63
64#define SCSI_ABORT_SNOOZE 0
65#define SCSI_ABORT_SUCCESS 1
66#define SCSI_ABORT_PENDING 2
67#define SCSI_ABORT_BUSY 3
68#define SCSI_ABORT_NOT_RUNNING 4
69#define SCSI_ABORT_ERROR 5
70
71#define SCSI_RESET_SNOOZE 0
72#define SCSI_RESET_PUNT 1
73#define SCSI_RESET_SUCCESS 2
74#define SCSI_RESET_PENDING 3
75#define SCSI_RESET_WAKEUP 4
76#define SCSI_RESET_NOT_RUNNING 5
77#define SCSI_RESET_ERROR 6
78
79#define SCSI_RESET_SYNCHRONOUS 0x01
80#define SCSI_RESET_ASYNCHRONOUS 0x02
81#define SCSI_RESET_SUGGEST_BUS_RESET 0x04
82#define SCSI_RESET_SUGGEST_HOST_RESET 0x08
83
84#define SCSI_RESET_BUS_RESET 0x100
85#define SCSI_RESET_HOST_RESET 0x200
86#define SCSI_RESET_ACTION 0xff
87
66/* Debugging printk definitions: 88/* Debugging printk definitions:
67 * 89 *
68 * ARB -> arbitration 90 * ARB -> arbitration
@@ -91,144 +113,58 @@ int atari_scsi_release (struct Scsi_Host *);
91 * 113 *
92 */ 114 */
93 115
94#if NDEBUG & NDEBUG_ARBITRATION 116#define dprint(flg, format...) \
117({ \
118 if (NDEBUG & (flg)) \
119 printk(KERN_DEBUG format); \
120})
121
95#define ARB_PRINTK(format, args...) \ 122#define ARB_PRINTK(format, args...) \
96 printk(KERN_DEBUG format , ## args) 123 dprint(NDEBUG_ARBITRATION, format , ## args)
97#else
98#define ARB_PRINTK(format, args...)
99#endif
100#if NDEBUG & NDEBUG_AUTOSENSE
101#define ASEN_PRINTK(format, args...) \ 124#define ASEN_PRINTK(format, args...) \
102 printk(KERN_DEBUG format , ## args) 125 dprint(NDEBUG_AUTOSENSE, format , ## args)
103#else
104#define ASEN_PRINTK(format, args...)
105#endif
106#if NDEBUG & NDEBUG_DMA
107#define DMA_PRINTK(format, args...) \ 126#define DMA_PRINTK(format, args...) \
108 printk(KERN_DEBUG format , ## args) 127 dprint(NDEBUG_DMA, format , ## args)
109#else
110#define DMA_PRINTK(format, args...)
111#endif
112#if NDEBUG & NDEBUG_HANDSHAKE
113#define HSH_PRINTK(format, args...) \ 128#define HSH_PRINTK(format, args...) \
114 printk(KERN_DEBUG format , ## args) 129 dprint(NDEBUG_HANDSHAKE, format , ## args)
115#else
116#define HSH_PRINTK(format, args...)
117#endif
118#if NDEBUG & NDEBUG_INFORMATION
119#define INF_PRINTK(format, args...) \ 130#define INF_PRINTK(format, args...) \
120 printk(KERN_DEBUG format , ## args) 131 dprint(NDEBUG_INFORMATION, format , ## args)
121#else
122#define INF_PRINTK(format, args...)
123#endif
124#if NDEBUG & NDEBUG_INIT
125#define INI_PRINTK(format, args...) \ 132#define INI_PRINTK(format, args...) \
126 printk(KERN_DEBUG format , ## args) 133 dprint(NDEBUG_INIT, format , ## args)
127#else
128#define INI_PRINTK(format, args...)
129#endif
130#if NDEBUG & NDEBUG_INTR
131#define INT_PRINTK(format, args...) \ 134#define INT_PRINTK(format, args...) \
132 printk(KERN_DEBUG format , ## args) 135 dprint(NDEBUG_INTR, format , ## args)
133#else
134#define INT_PRINTK(format, args...)
135#endif
136#if NDEBUG & NDEBUG_LINKED
137#define LNK_PRINTK(format, args...) \ 136#define LNK_PRINTK(format, args...) \
138 printk(KERN_DEBUG format , ## args) 137 dprint(NDEBUG_LINKED, format , ## args)
139#else
140#define LNK_PRINTK(format, args...)
141#endif
142#if NDEBUG & NDEBUG_MAIN
143#define MAIN_PRINTK(format, args...) \ 138#define MAIN_PRINTK(format, args...) \
144 printk(KERN_DEBUG format , ## args) 139 dprint(NDEBUG_MAIN, format , ## args)
145#else
146#define MAIN_PRINTK(format, args...)
147#endif
148#if NDEBUG & NDEBUG_NO_DATAOUT
149#define NDAT_PRINTK(format, args...) \ 140#define NDAT_PRINTK(format, args...) \
150 printk(KERN_DEBUG format , ## args) 141 dprint(NDEBUG_NO_DATAOUT, format , ## args)
151#else
152#define NDAT_PRINTK(format, args...)
153#endif
154#if NDEBUG & NDEBUG_NO_WRITE
155#define NWR_PRINTK(format, args...) \ 142#define NWR_PRINTK(format, args...) \
156 printk(KERN_DEBUG format , ## args) 143 dprint(NDEBUG_NO_WRITE, format , ## args)
157#else
158#define NWR_PRINTK(format, args...)
159#endif
160#if NDEBUG & NDEBUG_PIO
161#define PIO_PRINTK(format, args...) \ 144#define PIO_PRINTK(format, args...) \
162 printk(KERN_DEBUG format , ## args) 145 dprint(NDEBUG_PIO, format , ## args)
163#else
164#define PIO_PRINTK(format, args...)
165#endif
166#if NDEBUG & NDEBUG_PSEUDO_DMA
167#define PDMA_PRINTK(format, args...) \ 146#define PDMA_PRINTK(format, args...) \
168 printk(KERN_DEBUG format , ## args) 147 dprint(NDEBUG_PSEUDO_DMA, format , ## args)
169#else
170#define PDMA_PRINTK(format, args...)
171#endif
172#if NDEBUG & NDEBUG_QUEUES
173#define QU_PRINTK(format, args...) \ 148#define QU_PRINTK(format, args...) \
174 printk(KERN_DEBUG format , ## args) 149 dprint(NDEBUG_QUEUES, format , ## args)
175#else
176#define QU_PRINTK(format, args...)
177#endif
178#if NDEBUG & NDEBUG_RESELECTION
179#define RSL_PRINTK(format, args...) \ 150#define RSL_PRINTK(format, args...) \
180 printk(KERN_DEBUG format , ## args) 151 dprint(NDEBUG_RESELECTION, format , ## args)
181#else
182#define RSL_PRINTK(format, args...)
183#endif
184#if NDEBUG & NDEBUG_SELECTION
185#define SEL_PRINTK(format, args...) \ 152#define SEL_PRINTK(format, args...) \
186 printk(KERN_DEBUG format , ## args) 153 dprint(NDEBUG_SELECTION, format , ## args)
187#else
188#define SEL_PRINTK(format, args...)
189#endif
190#if NDEBUG & NDEBUG_USLEEP
191#define USL_PRINTK(format, args...) \ 154#define USL_PRINTK(format, args...) \
192 printk(KERN_DEBUG format , ## args) 155 dprint(NDEBUG_USLEEP, format , ## args)
193#else
194#define USL_PRINTK(format, args...)
195#endif
196#if NDEBUG & NDEBUG_LAST_BYTE_SENT
197#define LBS_PRINTK(format, args...) \ 156#define LBS_PRINTK(format, args...) \
198 printk(KERN_DEBUG format , ## args) 157 dprint(NDEBUG_LAST_BYTE_SENT, format , ## args)
199#else
200#define LBS_PRINTK(format, args...)
201#endif
202#if NDEBUG & NDEBUG_RESTART_SELECT
203#define RSS_PRINTK(format, args...) \ 158#define RSS_PRINTK(format, args...) \
204 printk(KERN_DEBUG format , ## args) 159 dprint(NDEBUG_RESTART_SELECT, format , ## args)
205#else
206#define RSS_PRINTK(format, args...)
207#endif
208#if NDEBUG & NDEBUG_EXTENDED
209#define EXT_PRINTK(format, args...) \ 160#define EXT_PRINTK(format, args...) \
210 printk(KERN_DEBUG format , ## args) 161 dprint(NDEBUG_EXTENDED, format , ## args)
211#else
212#define EXT_PRINTK(format, args...)
213#endif
214#if NDEBUG & NDEBUG_ABORT
215#define ABRT_PRINTK(format, args...) \ 162#define ABRT_PRINTK(format, args...) \
216 printk(KERN_DEBUG format , ## args) 163 dprint(NDEBUG_ABORT, format , ## args)
217#else
218#define ABRT_PRINTK(format, args...)
219#endif
220#if NDEBUG & NDEBUG_TAGS
221#define TAG_PRINTK(format, args...) \ 164#define TAG_PRINTK(format, args...) \
222 printk(KERN_DEBUG format , ## args) 165 dprint(NDEBUG_TAGS, format , ## args)
223#else
224#define TAG_PRINTK(format, args...)
225#endif
226#if NDEBUG & NDEBUG_MERGING
227#define MER_PRINTK(format, args...) \ 166#define MER_PRINTK(format, args...) \
228 printk(KERN_DEBUG format , ## args) 167 dprint(NDEBUG_MERGING, format , ## args)
229#else
230#define MER_PRINTK(format, args...)
231#endif
232 168
233/* conditional macros for NCR5380_print_{,phase,status} */ 169/* conditional macros for NCR5380_print_{,phase,status} */
234 170