]>
git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blob - drivers/scsi/atari_scsi.h
2 * atari_scsi.h -- Header file for the Atari native SCSI driver
4 * Copyright 1994 Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de>
6 * (Loosely based on the work of Robert De Vries' team)
8 * This file is subject to the terms and conditions of the GNU General Public
9 * License. See the file COPYING in the main directory of this archive
18 /* (I_HAVE_OVERRUNS stuff removed) */
21 int atari_scsi_detect (struct scsi_host_template
*);
22 const char *atari_scsi_info (struct Scsi_Host
*);
23 int atari_scsi_reset (Scsi_Cmnd
*, unsigned int);
25 int atari_scsi_release (struct Scsi_Host
*);
27 #define atari_scsi_release NULL
30 /* 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!) */
33 /* But there seems to be a bug somewhere that requires CAN_QUEUE to be
34 * 2*CMD_PER_LUN. At least on a TT, no spurious timeouts seen since
35 * changed CMD_PER_LUN... */
37 /* Note: The Falcon currently uses 8/1 setting due to unsolved problems with
40 #define ATARI_TT_CAN_QUEUE 16
41 #define ATARI_TT_CMD_PER_LUN 8
42 #define ATARI_TT_SG_TABLESIZE SG_ALL
44 #define ATARI_FALCON_CAN_QUEUE 8
45 #define ATARI_FALCON_CMD_PER_LUN 1
46 #define ATARI_FALCON_SG_TABLESIZE SG_NONE
48 #define DEFAULT_USE_TAGGED_QUEUING 0
51 #define NCR5380_implementation_fields /* none */
53 #define NCR5380_read(reg) atari_scsi_reg_read( reg )
54 #define NCR5380_write(reg, value) atari_scsi_reg_write( reg, value )
56 #define NCR5380_intr atari_scsi_intr
57 #define NCR5380_queue_command atari_scsi_queue_command
58 #define NCR5380_abort atari_scsi_abort
59 #define NCR5380_proc_info atari_scsi_proc_info
60 #define NCR5380_dma_read_setup(inst,d,c) atari_scsi_dma_setup (inst, d, c, 0)
61 #define NCR5380_dma_write_setup(inst,d,c) atari_scsi_dma_setup (inst, d, c, 1)
62 #define NCR5380_dma_residual(inst) atari_scsi_dma_residual( inst )
63 #define NCR5380_dma_xfer_len(i,cmd,phase) \
64 atari_dma_xfer_len(cmd->SCp.this_residual,cmd,((phase) & SR_IO) ? 0 : 1)
66 /* Debugging printk definitions:
71 * HSH -> PIO handshake
72 * INF -> information transfer
73 * INI -> initialization
75 * LNK -> linked commands
76 * MAIN -> NCR5380_main() control flow
77 * NDAT -> no data-out phase
78 * NWR -> no write commands
79 * PIO -> PIO transfers
80 * PDMA -> pseudo DMA (unused on Atari)
84 * USL -> usleep cpde (unused on Atari)
85 * LBS -> last byte sent (unused on Atari)
86 * RSS -> restarting of selections
87 * EXT -> extended messages
88 * ABRT -> aborting and resetting
89 * TAG -> queue tag handling
90 * MER -> merging of consec. buffers
94 #if NDEBUG & NDEBUG_ARBITRATION
95 #define ARB_PRINTK(format, args...) \
96 printk(KERN_DEBUG format , ## args)
98 #define ARB_PRINTK(format, args...)
100 #if NDEBUG & NDEBUG_AUTOSENSE
101 #define ASEN_PRINTK(format, args...) \
102 printk(KERN_DEBUG format , ## args)
104 #define ASEN_PRINTK(format, args...)
106 #if NDEBUG & NDEBUG_DMA
107 #define DMA_PRINTK(format, args...) \
108 printk(KERN_DEBUG format , ## args)
110 #define DMA_PRINTK(format, args...)
112 #if NDEBUG & NDEBUG_HANDSHAKE
113 #define HSH_PRINTK(format, args...) \
114 printk(KERN_DEBUG format , ## args)
116 #define HSH_PRINTK(format, args...)
118 #if NDEBUG & NDEBUG_INFORMATION
119 #define INF_PRINTK(format, args...) \
120 printk(KERN_DEBUG format , ## args)
122 #define INF_PRINTK(format, args...)
124 #if NDEBUG & NDEBUG_INIT
125 #define INI_PRINTK(format, args...) \
126 printk(KERN_DEBUG format , ## args)
128 #define INI_PRINTK(format, args...)
130 #if NDEBUG & NDEBUG_INTR
131 #define INT_PRINTK(format, args...) \
132 printk(KERN_DEBUG format , ## args)
134 #define INT_PRINTK(format, args...)
136 #if NDEBUG & NDEBUG_LINKED
137 #define LNK_PRINTK(format, args...) \
138 printk(KERN_DEBUG format , ## args)
140 #define LNK_PRINTK(format, args...)
142 #if NDEBUG & NDEBUG_MAIN
143 #define MAIN_PRINTK(format, args...) \
144 printk(KERN_DEBUG format , ## args)
146 #define MAIN_PRINTK(format, args...)
148 #if NDEBUG & NDEBUG_NO_DATAOUT
149 #define NDAT_PRINTK(format, args...) \
150 printk(KERN_DEBUG format , ## args)
152 #define NDAT_PRINTK(format, args...)
154 #if NDEBUG & NDEBUG_NO_WRITE
155 #define NWR_PRINTK(format, args...) \
156 printk(KERN_DEBUG format , ## args)
158 #define NWR_PRINTK(format, args...)
160 #if NDEBUG & NDEBUG_PIO
161 #define PIO_PRINTK(format, args...) \
162 printk(KERN_DEBUG format , ## args)
164 #define PIO_PRINTK(format, args...)
166 #if NDEBUG & NDEBUG_PSEUDO_DMA
167 #define PDMA_PRINTK(format, args...) \
168 printk(KERN_DEBUG format , ## args)
170 #define PDMA_PRINTK(format, args...)
172 #if NDEBUG & NDEBUG_QUEUES
173 #define QU_PRINTK(format, args...) \
174 printk(KERN_DEBUG format , ## args)
176 #define QU_PRINTK(format, args...)
178 #if NDEBUG & NDEBUG_RESELECTION
179 #define RSL_PRINTK(format, args...) \
180 printk(KERN_DEBUG format , ## args)
182 #define RSL_PRINTK(format, args...)
184 #if NDEBUG & NDEBUG_SELECTION
185 #define SEL_PRINTK(format, args...) \
186 printk(KERN_DEBUG format , ## args)
188 #define SEL_PRINTK(format, args...)
190 #if NDEBUG & NDEBUG_USLEEP
191 #define USL_PRINTK(format, args...) \
192 printk(KERN_DEBUG format , ## args)
194 #define USL_PRINTK(format, args...)
196 #if NDEBUG & NDEBUG_LAST_BYTE_SENT
197 #define LBS_PRINTK(format, args...) \
198 printk(KERN_DEBUG format , ## args)
200 #define LBS_PRINTK(format, args...)
202 #if NDEBUG & NDEBUG_RESTART_SELECT
203 #define RSS_PRINTK(format, args...) \
204 printk(KERN_DEBUG format , ## args)
206 #define RSS_PRINTK(format, args...)
208 #if NDEBUG & NDEBUG_EXTENDED
209 #define EXT_PRINTK(format, args...) \
210 printk(KERN_DEBUG format , ## args)
212 #define EXT_PRINTK(format, args...)
214 #if NDEBUG & NDEBUG_ABORT
215 #define ABRT_PRINTK(format, args...) \
216 printk(KERN_DEBUG format , ## args)
218 #define ABRT_PRINTK(format, args...)
220 #if NDEBUG & NDEBUG_TAGS
221 #define TAG_PRINTK(format, args...) \
222 printk(KERN_DEBUG format , ## args)
224 #define TAG_PRINTK(format, args...)
226 #if NDEBUG & NDEBUG_MERGING
227 #define MER_PRINTK(format, args...) \
228 printk(KERN_DEBUG format , ## args)
230 #define MER_PRINTK(format, args...)
233 /* conditional macros for NCR5380_print_{,phase,status} */
235 #define NCR_PRINT(mask) \
236 ((NDEBUG & (mask)) ? NCR5380_print(instance) : (void)0)
238 #define NCR_PRINT_PHASE(mask) \
239 ((NDEBUG & (mask)) ? NCR5380_print_phase(instance) : (void)0)
241 #define NCR_PRINT_STATUS(mask) \
242 ((NDEBUG & (mask)) ? NCR5380_print_status(instance) : (void)0)
245 #endif /* ndef ASM */
246 #endif /* ATARI_SCSI_H */