xref: /linux/drivers/scsi/wd33c93.h (revision 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2)
1*1da177e4SLinus Torvalds /*
2*1da177e4SLinus Torvalds  *    wd33c93.h -  Linux device driver definitions for the
3*1da177e4SLinus Torvalds  *                 Commodore Amiga A2091/590 SCSI controller card
4*1da177e4SLinus Torvalds  *
5*1da177e4SLinus Torvalds  *    IMPORTANT: This file is for version 1.25 - 09/Jul/1997
6*1da177e4SLinus Torvalds  *
7*1da177e4SLinus Torvalds  * Copyright (c) 1996 John Shifflett, GeoLog Consulting
8*1da177e4SLinus Torvalds  *    john@geolog.com
9*1da177e4SLinus Torvalds  *    jshiffle@netcom.com
10*1da177e4SLinus Torvalds  *
11*1da177e4SLinus Torvalds  * This program is free software; you can redistribute it and/or modify
12*1da177e4SLinus Torvalds  * it under the terms of the GNU General Public License as published by
13*1da177e4SLinus Torvalds  * the Free Software Foundation; either version 2, or (at your option)
14*1da177e4SLinus Torvalds  * any later version.
15*1da177e4SLinus Torvalds  *
16*1da177e4SLinus Torvalds  * This program is distributed in the hope that it will be useful,
17*1da177e4SLinus Torvalds  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18*1da177e4SLinus Torvalds  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19*1da177e4SLinus Torvalds  * GNU General Public License for more details.
20*1da177e4SLinus Torvalds  *
21*1da177e4SLinus Torvalds  */
22*1da177e4SLinus Torvalds #ifndef WD33C93_H
23*1da177e4SLinus Torvalds #define WD33C93_H
24*1da177e4SLinus Torvalds 
25*1da177e4SLinus Torvalds #include <linux/config.h>
26*1da177e4SLinus Torvalds 
27*1da177e4SLinus Torvalds #define PROC_INTERFACE     /* add code for /proc/scsi/wd33c93/xxx interface */
28*1da177e4SLinus Torvalds #ifdef  PROC_INTERFACE
29*1da177e4SLinus Torvalds #define PROC_STATISTICS    /* add code for keeping various real time stats */
30*1da177e4SLinus Torvalds #endif
31*1da177e4SLinus Torvalds 
32*1da177e4SLinus Torvalds #define SYNC_DEBUG         /* extra info on sync negotiation printed */
33*1da177e4SLinus Torvalds #define DEBUGGING_ON       /* enable command-line debugging bitmask */
34*1da177e4SLinus Torvalds #define DEBUG_DEFAULTS 0   /* default debugging bitmask */
35*1da177e4SLinus Torvalds 
36*1da177e4SLinus Torvalds 
37*1da177e4SLinus Torvalds #ifdef DEBUGGING_ON
38*1da177e4SLinus Torvalds #define DB(f,a) if (hostdata->args & (f)) a;
39*1da177e4SLinus Torvalds #else
40*1da177e4SLinus Torvalds #define DB(f,a)
41*1da177e4SLinus Torvalds #endif
42*1da177e4SLinus Torvalds 
43*1da177e4SLinus Torvalds #define uchar unsigned char
44*1da177e4SLinus Torvalds 
45*1da177e4SLinus Torvalds 
46*1da177e4SLinus Torvalds /* wd register names */
47*1da177e4SLinus Torvalds #define WD_OWN_ID    0x00
48*1da177e4SLinus Torvalds #define WD_CONTROL      0x01
49*1da177e4SLinus Torvalds #define WD_TIMEOUT_PERIOD  0x02
50*1da177e4SLinus Torvalds #define WD_CDB_1     0x03
51*1da177e4SLinus Torvalds #define WD_CDB_2     0x04
52*1da177e4SLinus Torvalds #define WD_CDB_3     0x05
53*1da177e4SLinus Torvalds #define WD_CDB_4     0x06
54*1da177e4SLinus Torvalds #define WD_CDB_5     0x07
55*1da177e4SLinus Torvalds #define WD_CDB_6     0x08
56*1da177e4SLinus Torvalds #define WD_CDB_7     0x09
57*1da177e4SLinus Torvalds #define WD_CDB_8     0x0a
58*1da177e4SLinus Torvalds #define WD_CDB_9     0x0b
59*1da177e4SLinus Torvalds #define WD_CDB_10    0x0c
60*1da177e4SLinus Torvalds #define WD_CDB_11    0x0d
61*1da177e4SLinus Torvalds #define WD_CDB_12    0x0e
62*1da177e4SLinus Torvalds #define WD_TARGET_LUN      0x0f
63*1da177e4SLinus Torvalds #define WD_COMMAND_PHASE   0x10
64*1da177e4SLinus Torvalds #define WD_SYNCHRONOUS_TRANSFER 0x11
65*1da177e4SLinus Torvalds #define WD_TRANSFER_COUNT_MSB 0x12
66*1da177e4SLinus Torvalds #define WD_TRANSFER_COUNT  0x13
67*1da177e4SLinus Torvalds #define WD_TRANSFER_COUNT_LSB 0x14
68*1da177e4SLinus Torvalds #define WD_DESTINATION_ID  0x15
69*1da177e4SLinus Torvalds #define WD_SOURCE_ID    0x16
70*1da177e4SLinus Torvalds #define WD_SCSI_STATUS     0x17
71*1da177e4SLinus Torvalds #define WD_COMMAND      0x18
72*1da177e4SLinus Torvalds #define WD_DATA      0x19
73*1da177e4SLinus Torvalds #define WD_QUEUE_TAG    0x1a
74*1da177e4SLinus Torvalds #define WD_AUXILIARY_STATUS   0x1f
75*1da177e4SLinus Torvalds 
76*1da177e4SLinus Torvalds /* WD commands */
77*1da177e4SLinus Torvalds #define WD_CMD_RESET    0x00
78*1da177e4SLinus Torvalds #define WD_CMD_ABORT    0x01
79*1da177e4SLinus Torvalds #define WD_CMD_ASSERT_ATN  0x02
80*1da177e4SLinus Torvalds #define WD_CMD_NEGATE_ACK  0x03
81*1da177e4SLinus Torvalds #define WD_CMD_DISCONNECT  0x04
82*1da177e4SLinus Torvalds #define WD_CMD_RESELECT    0x05
83*1da177e4SLinus Torvalds #define WD_CMD_SEL_ATN     0x06
84*1da177e4SLinus Torvalds #define WD_CMD_SEL      0x07
85*1da177e4SLinus Torvalds #define WD_CMD_SEL_ATN_XFER   0x08
86*1da177e4SLinus Torvalds #define WD_CMD_SEL_XFER    0x09
87*1da177e4SLinus Torvalds #define WD_CMD_RESEL_RECEIVE  0x0a
88*1da177e4SLinus Torvalds #define WD_CMD_RESEL_SEND  0x0b
89*1da177e4SLinus Torvalds #define WD_CMD_WAIT_SEL_RECEIVE 0x0c
90*1da177e4SLinus Torvalds #define WD_CMD_TRANS_ADDR  0x18
91*1da177e4SLinus Torvalds #define WD_CMD_TRANS_INFO  0x20
92*1da177e4SLinus Torvalds #define WD_CMD_TRANSFER_PAD   0x21
93*1da177e4SLinus Torvalds #define WD_CMD_SBT_MODE    0x80
94*1da177e4SLinus Torvalds 
95*1da177e4SLinus Torvalds /* ASR register */
96*1da177e4SLinus Torvalds #define ASR_INT         (0x80)
97*1da177e4SLinus Torvalds #define ASR_LCI         (0x40)
98*1da177e4SLinus Torvalds #define ASR_BSY         (0x20)
99*1da177e4SLinus Torvalds #define ASR_CIP         (0x10)
100*1da177e4SLinus Torvalds #define ASR_PE          (0x02)
101*1da177e4SLinus Torvalds #define ASR_DBR         (0x01)
102*1da177e4SLinus Torvalds 
103*1da177e4SLinus Torvalds /* SCSI Bus Phases */
104*1da177e4SLinus Torvalds #define PHS_DATA_OUT    0x00
105*1da177e4SLinus Torvalds #define PHS_DATA_IN     0x01
106*1da177e4SLinus Torvalds #define PHS_COMMAND     0x02
107*1da177e4SLinus Torvalds #define PHS_STATUS      0x03
108*1da177e4SLinus Torvalds #define PHS_MESS_OUT    0x06
109*1da177e4SLinus Torvalds #define PHS_MESS_IN     0x07
110*1da177e4SLinus Torvalds 
111*1da177e4SLinus Torvalds /* Command Status Register definitions */
112*1da177e4SLinus Torvalds 
113*1da177e4SLinus Torvalds   /* reset state interrupts */
114*1da177e4SLinus Torvalds #define CSR_RESET    0x00
115*1da177e4SLinus Torvalds #define CSR_RESET_AF    0x01
116*1da177e4SLinus Torvalds 
117*1da177e4SLinus Torvalds   /* successful completion interrupts */
118*1da177e4SLinus Torvalds #define CSR_RESELECT    0x10
119*1da177e4SLinus Torvalds #define CSR_SELECT      0x11
120*1da177e4SLinus Torvalds #define CSR_SEL_XFER_DONE  0x16
121*1da177e4SLinus Torvalds #define CSR_XFER_DONE      0x18
122*1da177e4SLinus Torvalds 
123*1da177e4SLinus Torvalds   /* paused or aborted interrupts */
124*1da177e4SLinus Torvalds #define CSR_MSGIN    0x20
125*1da177e4SLinus Torvalds #define CSR_SDP         0x21
126*1da177e4SLinus Torvalds #define CSR_SEL_ABORT      0x22
127*1da177e4SLinus Torvalds #define CSR_RESEL_ABORT    0x25
128*1da177e4SLinus Torvalds #define CSR_RESEL_ABORT_AM 0x27
129*1da177e4SLinus Torvalds #define CSR_ABORT    0x28
130*1da177e4SLinus Torvalds 
131*1da177e4SLinus Torvalds   /* terminated interrupts */
132*1da177e4SLinus Torvalds #define CSR_INVALID     0x40
133*1da177e4SLinus Torvalds #define CSR_UNEXP_DISC     0x41
134*1da177e4SLinus Torvalds #define CSR_TIMEOUT     0x42
135*1da177e4SLinus Torvalds #define CSR_PARITY      0x43
136*1da177e4SLinus Torvalds #define CSR_PARITY_ATN     0x44
137*1da177e4SLinus Torvalds #define CSR_BAD_STATUS     0x45
138*1da177e4SLinus Torvalds #define CSR_UNEXP    0x48
139*1da177e4SLinus Torvalds 
140*1da177e4SLinus Torvalds   /* service required interrupts */
141*1da177e4SLinus Torvalds #define CSR_RESEL    0x80
142*1da177e4SLinus Torvalds #define CSR_RESEL_AM    0x81
143*1da177e4SLinus Torvalds #define CSR_DISC     0x85
144*1da177e4SLinus Torvalds #define CSR_SRV_REQ     0x88
145*1da177e4SLinus Torvalds 
146*1da177e4SLinus Torvalds    /* Own ID/CDB Size register */
147*1da177e4SLinus Torvalds #define OWNID_EAF    0x08
148*1da177e4SLinus Torvalds #define OWNID_EHP    0x10
149*1da177e4SLinus Torvalds #define OWNID_RAF    0x20
150*1da177e4SLinus Torvalds #define OWNID_FS_8   0x00
151*1da177e4SLinus Torvalds #define OWNID_FS_12  0x40
152*1da177e4SLinus Torvalds #define OWNID_FS_16  0x80
153*1da177e4SLinus Torvalds 
154*1da177e4SLinus Torvalds    /* define these so we don't have to change a2091.c, etc. */
155*1da177e4SLinus Torvalds #define WD33C93_FS_8_10  OWNID_FS_8
156*1da177e4SLinus Torvalds #define WD33C93_FS_12_15 OWNID_FS_12
157*1da177e4SLinus Torvalds #define WD33C93_FS_16_20 OWNID_FS_16
158*1da177e4SLinus Torvalds 
159*1da177e4SLinus Torvalds    /* Control register */
160*1da177e4SLinus Torvalds #define CTRL_HSP     0x01
161*1da177e4SLinus Torvalds #define CTRL_HA      0x02
162*1da177e4SLinus Torvalds #define CTRL_IDI     0x04
163*1da177e4SLinus Torvalds #define CTRL_EDI     0x08
164*1da177e4SLinus Torvalds #define CTRL_HHP     0x10
165*1da177e4SLinus Torvalds #define CTRL_POLLED  0x00
166*1da177e4SLinus Torvalds #define CTRL_BURST   0x20
167*1da177e4SLinus Torvalds #define CTRL_BUS     0x40
168*1da177e4SLinus Torvalds #define CTRL_DMA     0x80
169*1da177e4SLinus Torvalds 
170*1da177e4SLinus Torvalds    /* Timeout Period register */
171*1da177e4SLinus Torvalds #define TIMEOUT_PERIOD_VALUE  20    /* 20 = 200 ms */
172*1da177e4SLinus Torvalds 
173*1da177e4SLinus Torvalds    /* Synchronous Transfer Register */
174*1da177e4SLinus Torvalds #define STR_FSS      0x80
175*1da177e4SLinus Torvalds 
176*1da177e4SLinus Torvalds    /* Destination ID register */
177*1da177e4SLinus Torvalds #define DSTID_DPD    0x40
178*1da177e4SLinus Torvalds #define DATA_OUT_DIR 0
179*1da177e4SLinus Torvalds #define DATA_IN_DIR  1
180*1da177e4SLinus Torvalds #define DSTID_SCC    0x80
181*1da177e4SLinus Torvalds 
182*1da177e4SLinus Torvalds    /* Source ID register */
183*1da177e4SLinus Torvalds #define SRCID_MASK   0x07
184*1da177e4SLinus Torvalds #define SRCID_SIV    0x08
185*1da177e4SLinus Torvalds #define SRCID_DSP    0x20
186*1da177e4SLinus Torvalds #define SRCID_ES     0x40
187*1da177e4SLinus Torvalds #define SRCID_ER     0x80
188*1da177e4SLinus Torvalds 
189*1da177e4SLinus Torvalds    /* This is what the 3393 chip looks like to us */
190*1da177e4SLinus Torvalds typedef struct {
191*1da177e4SLinus Torvalds #ifdef CONFIG_WD33C93_PIO
192*1da177e4SLinus Torvalds    unsigned int   SASR;
193*1da177e4SLinus Torvalds    unsigned int   SCMD;
194*1da177e4SLinus Torvalds #else
195*1da177e4SLinus Torvalds    volatile unsigned char  *SASR;
196*1da177e4SLinus Torvalds    volatile unsigned char  *SCMD;
197*1da177e4SLinus Torvalds #endif
198*1da177e4SLinus Torvalds } wd33c93_regs;
199*1da177e4SLinus Torvalds 
200*1da177e4SLinus Torvalds 
201*1da177e4SLinus Torvalds typedef int (*dma_setup_t) (struct scsi_cmnd *SCpnt, int dir_in);
202*1da177e4SLinus Torvalds typedef void (*dma_stop_t) (struct Scsi_Host *instance,
203*1da177e4SLinus Torvalds 		struct scsi_cmnd *SCpnt, int status);
204*1da177e4SLinus Torvalds 
205*1da177e4SLinus Torvalds 
206*1da177e4SLinus Torvalds #define ILLEGAL_STATUS_BYTE   0xff
207*1da177e4SLinus Torvalds 
208*1da177e4SLinus Torvalds #define DEFAULT_SX_PER   376     /* (ns) fairly safe */
209*1da177e4SLinus Torvalds #define DEFAULT_SX_OFF   0       /* aka async */
210*1da177e4SLinus Torvalds 
211*1da177e4SLinus Torvalds #define OPTIMUM_SX_PER   252     /* (ns) best we can do (mult-of-4) */
212*1da177e4SLinus Torvalds #define OPTIMUM_SX_OFF   12      /* size of wd3393 fifo */
213*1da177e4SLinus Torvalds 
214*1da177e4SLinus Torvalds struct sx_period {
215*1da177e4SLinus Torvalds    unsigned int   period_ns;
216*1da177e4SLinus Torvalds    uchar          reg_value;
217*1da177e4SLinus Torvalds    };
218*1da177e4SLinus Torvalds 
219*1da177e4SLinus Torvalds /* FEF: defines for hostdata->dma_buffer_pool */
220*1da177e4SLinus Torvalds 
221*1da177e4SLinus Torvalds #define BUF_CHIP_ALLOCED 0
222*1da177e4SLinus Torvalds #define BUF_SCSI_ALLOCED 1
223*1da177e4SLinus Torvalds 
224*1da177e4SLinus Torvalds struct WD33C93_hostdata {
225*1da177e4SLinus Torvalds     struct Scsi_Host *next;
226*1da177e4SLinus Torvalds     wd33c93_regs     regs;
227*1da177e4SLinus Torvalds     spinlock_t       lock;
228*1da177e4SLinus Torvalds     uchar            clock_freq;
229*1da177e4SLinus Torvalds     uchar            chip;             /* what kind of wd33c93? */
230*1da177e4SLinus Torvalds     uchar            microcode;        /* microcode rev */
231*1da177e4SLinus Torvalds     uchar            dma_buffer_pool;  /* FEF: buffer from chip_ram? */
232*1da177e4SLinus Torvalds     int              dma_dir;          /* data transfer dir. */
233*1da177e4SLinus Torvalds     dma_setup_t      dma_setup;
234*1da177e4SLinus Torvalds     dma_stop_t       dma_stop;
235*1da177e4SLinus Torvalds     unsigned int     dma_xfer_mask;
236*1da177e4SLinus Torvalds     uchar            *dma_bounce_buffer;
237*1da177e4SLinus Torvalds     unsigned int     dma_bounce_len;
238*1da177e4SLinus Torvalds     volatile uchar   busy[8];          /* index = target, bit = lun */
239*1da177e4SLinus Torvalds     volatile struct scsi_cmnd *input_Q;       /* commands waiting to be started */
240*1da177e4SLinus Torvalds     volatile struct scsi_cmnd *selecting;     /* trying to select this command */
241*1da177e4SLinus Torvalds     volatile struct scsi_cmnd *connected;     /* currently connected command */
242*1da177e4SLinus Torvalds     volatile struct scsi_cmnd *disconnected_Q;/* commands waiting for reconnect */
243*1da177e4SLinus Torvalds     uchar            state;            /* what we are currently doing */
244*1da177e4SLinus Torvalds     uchar            dma;              /* current state of DMA (on/off) */
245*1da177e4SLinus Torvalds     uchar            level2;           /* extent to which Level-2 commands are used */
246*1da177e4SLinus Torvalds     uchar            disconnect;       /* disconnect/reselect policy */
247*1da177e4SLinus Torvalds     unsigned int     args;             /* set from command-line argument */
248*1da177e4SLinus Torvalds     uchar            incoming_msg[8];  /* filled during message_in phase */
249*1da177e4SLinus Torvalds     int              incoming_ptr;     /* mainly used with EXTENDED messages */
250*1da177e4SLinus Torvalds     uchar            outgoing_msg[8];  /* send this during next message_out */
251*1da177e4SLinus Torvalds     int              outgoing_len;     /* length of outgoing message */
252*1da177e4SLinus Torvalds     unsigned int     default_sx_per;   /* default transfer period for SCSI bus */
253*1da177e4SLinus Torvalds     uchar            sync_xfer[8];     /* sync_xfer reg settings per target */
254*1da177e4SLinus Torvalds     uchar            sync_stat[8];     /* status of sync negotiation per target */
255*1da177e4SLinus Torvalds     uchar            no_sync;          /* bitmask: don't do sync on these targets */
256*1da177e4SLinus Torvalds     uchar            no_dma;           /* set this flag to disable DMA */
257*1da177e4SLinus Torvalds #ifdef PROC_INTERFACE
258*1da177e4SLinus Torvalds     uchar            proc;             /* bitmask: what's in proc output */
259*1da177e4SLinus Torvalds #ifdef PROC_STATISTICS
260*1da177e4SLinus Torvalds     unsigned long    cmd_cnt[8];       /* # of commands issued per target */
261*1da177e4SLinus Torvalds     unsigned long    int_cnt;          /* # of interrupts serviced */
262*1da177e4SLinus Torvalds     unsigned long    pio_cnt;          /* # of pio data transfers */
263*1da177e4SLinus Torvalds     unsigned long    dma_cnt;          /* # of DMA data transfers */
264*1da177e4SLinus Torvalds     unsigned long    disc_allowed_cnt[8]; /* # of disconnects allowed per target */
265*1da177e4SLinus Torvalds     unsigned long    disc_done_cnt[8]; /* # of disconnects done per target*/
266*1da177e4SLinus Torvalds #endif
267*1da177e4SLinus Torvalds #endif
268*1da177e4SLinus Torvalds     };
269*1da177e4SLinus Torvalds 
270*1da177e4SLinus Torvalds 
271*1da177e4SLinus Torvalds /* defines for hostdata->chip */
272*1da177e4SLinus Torvalds 
273*1da177e4SLinus Torvalds #define C_WD33C93       0
274*1da177e4SLinus Torvalds #define C_WD33C93A      1
275*1da177e4SLinus Torvalds #define C_WD33C93B      2
276*1da177e4SLinus Torvalds #define C_UNKNOWN_CHIP  100
277*1da177e4SLinus Torvalds 
278*1da177e4SLinus Torvalds /* defines for hostdata->state */
279*1da177e4SLinus Torvalds 
280*1da177e4SLinus Torvalds #define S_UNCONNECTED         0
281*1da177e4SLinus Torvalds #define S_SELECTING           1
282*1da177e4SLinus Torvalds #define S_RUNNING_LEVEL2      2
283*1da177e4SLinus Torvalds #define S_CONNECTED           3
284*1da177e4SLinus Torvalds #define S_PRE_TMP_DISC        4
285*1da177e4SLinus Torvalds #define S_PRE_CMP_DISC        5
286*1da177e4SLinus Torvalds 
287*1da177e4SLinus Torvalds /* defines for hostdata->dma */
288*1da177e4SLinus Torvalds 
289*1da177e4SLinus Torvalds #define D_DMA_OFF          0
290*1da177e4SLinus Torvalds #define D_DMA_RUNNING      1
291*1da177e4SLinus Torvalds 
292*1da177e4SLinus Torvalds /* defines for hostdata->level2 */
293*1da177e4SLinus Torvalds /* NOTE: only the first 3 are implemented so far */
294*1da177e4SLinus Torvalds 
295*1da177e4SLinus Torvalds #define L2_NONE      1  /* no combination commands - we get lots of ints */
296*1da177e4SLinus Torvalds #define L2_SELECT    2  /* start with SEL_ATN_XFER, but never resume it */
297*1da177e4SLinus Torvalds #define L2_BASIC     3  /* resume after STATUS ints & RDP messages */
298*1da177e4SLinus Torvalds #define L2_DATA      4  /* resume after DATA_IN/OUT ints */
299*1da177e4SLinus Torvalds #define L2_MOST      5  /* resume after anything except a RESELECT int */
300*1da177e4SLinus Torvalds #define L2_RESELECT  6  /* resume after everything, including RESELECT ints */
301*1da177e4SLinus Torvalds #define L2_ALL       7  /* always resume */
302*1da177e4SLinus Torvalds 
303*1da177e4SLinus Torvalds /* defines for hostdata->disconnect */
304*1da177e4SLinus Torvalds 
305*1da177e4SLinus Torvalds #define DIS_NEVER    0
306*1da177e4SLinus Torvalds #define DIS_ADAPTIVE 1
307*1da177e4SLinus Torvalds #define DIS_ALWAYS   2
308*1da177e4SLinus Torvalds 
309*1da177e4SLinus Torvalds /* defines for hostdata->args */
310*1da177e4SLinus Torvalds 
311*1da177e4SLinus Torvalds #define DB_TEST1              1<<0
312*1da177e4SLinus Torvalds #define DB_TEST2              1<<1
313*1da177e4SLinus Torvalds #define DB_QUEUE_COMMAND      1<<2
314*1da177e4SLinus Torvalds #define DB_EXECUTE            1<<3
315*1da177e4SLinus Torvalds #define DB_INTR               1<<4
316*1da177e4SLinus Torvalds #define DB_TRANSFER           1<<5
317*1da177e4SLinus Torvalds #define DB_MASK               0x3f
318*1da177e4SLinus Torvalds 
319*1da177e4SLinus Torvalds /* defines for hostdata->sync_stat[] */
320*1da177e4SLinus Torvalds 
321*1da177e4SLinus Torvalds #define SS_UNSET     0
322*1da177e4SLinus Torvalds #define SS_FIRST     1
323*1da177e4SLinus Torvalds #define SS_WAITING   2
324*1da177e4SLinus Torvalds #define SS_SET       3
325*1da177e4SLinus Torvalds 
326*1da177e4SLinus Torvalds /* defines for hostdata->proc */
327*1da177e4SLinus Torvalds 
328*1da177e4SLinus Torvalds #define PR_VERSION   1<<0
329*1da177e4SLinus Torvalds #define PR_INFO      1<<1
330*1da177e4SLinus Torvalds #define PR_STATISTICS 1<<2
331*1da177e4SLinus Torvalds #define PR_CONNECTED 1<<3
332*1da177e4SLinus Torvalds #define PR_INPUTQ    1<<4
333*1da177e4SLinus Torvalds #define PR_DISCQ     1<<5
334*1da177e4SLinus Torvalds #define PR_TEST      1<<6
335*1da177e4SLinus Torvalds #define PR_STOP      1<<7
336*1da177e4SLinus Torvalds 
337*1da177e4SLinus Torvalds 
338*1da177e4SLinus Torvalds void wd33c93_init (struct Scsi_Host *instance, const wd33c93_regs regs,
339*1da177e4SLinus Torvalds          dma_setup_t setup, dma_stop_t stop, int clock_freq);
340*1da177e4SLinus Torvalds int wd33c93_abort (struct scsi_cmnd *cmd);
341*1da177e4SLinus Torvalds int wd33c93_queuecommand (struct scsi_cmnd *cmd,
342*1da177e4SLinus Torvalds 		void (*done)(struct scsi_cmnd *));
343*1da177e4SLinus Torvalds void wd33c93_intr (struct Scsi_Host *instance);
344*1da177e4SLinus Torvalds int wd33c93_proc_info(struct Scsi_Host *, char *, char **, off_t, int, int);
345*1da177e4SLinus Torvalds int wd33c93_host_reset (struct scsi_cmnd *);
346*1da177e4SLinus Torvalds void wd33c93_release(void);
347*1da177e4SLinus Torvalds 
348*1da177e4SLinus Torvalds #endif /* WD33C93_H */
349