Go to the documentation of this file.
26 #define PROC_INTERFACE
28 #define PROC_STATISTICS
33 #define DEBUG_DEFAULTS 0
37 #define DB(f,a) if (hostdata->args & (f)) a;
42 #define uchar unsigned char
46 #define WD_OWN_ID 0x00
47 #define WD_CONTROL 0x01
48 #define WD_TIMEOUT_PERIOD 0x02
58 #define WD_CDB_10 0x0c
59 #define WD_CDB_11 0x0d
60 #define WD_CDB_12 0x0e
61 #define WD_TARGET_LUN 0x0f
62 #define WD_COMMAND_PHASE 0x10
63 #define WD_SYNCHRONOUS_TRANSFER 0x11
64 #define WD_TRANSFER_COUNT_MSB 0x12
65 #define WD_TRANSFER_COUNT 0x13
66 #define WD_TRANSFER_COUNT_LSB 0x14
67 #define WD_DESTINATION_ID 0x15
68 #define WD_SOURCE_ID 0x16
69 #define WD_SCSI_STATUS 0x17
70 #define WD_COMMAND 0x18
72 #define WD_QUEUE_TAG 0x1a
73 #define WD_AUXILIARY_STATUS 0x1f
76 #define WD_CMD_RESET 0x00
77 #define WD_CMD_ABORT 0x01
78 #define WD_CMD_ASSERT_ATN 0x02
79 #define WD_CMD_NEGATE_ACK 0x03
80 #define WD_CMD_DISCONNECT 0x04
81 #define WD_CMD_RESELECT 0x05
82 #define WD_CMD_SEL_ATN 0x06
83 #define WD_CMD_SEL 0x07
84 #define WD_CMD_SEL_ATN_XFER 0x08
85 #define WD_CMD_SEL_XFER 0x09
86 #define WD_CMD_RESEL_RECEIVE 0x0a
87 #define WD_CMD_RESEL_SEND 0x0b
88 #define WD_CMD_WAIT_SEL_RECEIVE 0x0c
89 #define WD_CMD_TRANS_ADDR 0x18
90 #define WD_CMD_TRANS_INFO 0x20
91 #define WD_CMD_TRANSFER_PAD 0x21
92 #define WD_CMD_SBT_MODE 0x80
95 #define ASR_INT (0x80)
96 #define ASR_LCI (0x40)
97 #define ASR_BSY (0x20)
98 #define ASR_CIP (0x10)
100 #define ASR_DBR (0x01)
103 #define PHS_DATA_OUT 0x00
104 #define PHS_DATA_IN 0x01
105 #define PHS_COMMAND 0x02
106 #define PHS_STATUS 0x03
107 #define PHS_MESS_OUT 0x06
108 #define PHS_MESS_IN 0x07
113 #define CSR_RESET 0x00
114 #define CSR_RESET_AF 0x01
117 #define CSR_RESELECT 0x10
118 #define CSR_SELECT 0x11
119 #define CSR_SEL_XFER_DONE 0x16
120 #define CSR_XFER_DONE 0x18
123 #define CSR_MSGIN 0x20
125 #define CSR_SEL_ABORT 0x22
126 #define CSR_RESEL_ABORT 0x25
127 #define CSR_RESEL_ABORT_AM 0x27
128 #define CSR_ABORT 0x28
131 #define CSR_INVALID 0x40
132 #define CSR_UNEXP_DISC 0x41
133 #define CSR_TIMEOUT 0x42
134 #define CSR_PARITY 0x43
135 #define CSR_PARITY_ATN 0x44
136 #define CSR_BAD_STATUS 0x45
137 #define CSR_UNEXP 0x48
140 #define CSR_RESEL 0x80
141 #define CSR_RESEL_AM 0x81
142 #define CSR_DISC 0x85
143 #define CSR_SRV_REQ 0x88
146 #define OWNID_EAF 0x08
147 #define OWNID_EHP 0x10
148 #define OWNID_RAF 0x20
149 #define OWNID_FS_8 0x00
150 #define OWNID_FS_12 0x40
151 #define OWNID_FS_16 0x80
154 #define WD33C93_FS_8_10 OWNID_FS_8
155 #define WD33C93_FS_12_15 OWNID_FS_12
156 #define WD33C93_FS_16_20 OWNID_FS_16
159 #define WD33C93_FS_MHZ(mhz) (mhz)
162 #define CTRL_HSP 0x01
164 #define CTRL_IDI 0x04
165 #define CTRL_EDI 0x08
166 #define CTRL_HHP 0x10
167 #define CTRL_POLLED 0x00
168 #define CTRL_BURST 0x20
169 #define CTRL_BUS 0x40
170 #define CTRL_DMA 0x80
173 #define TIMEOUT_PERIOD_VALUE 20
179 #define DSTID_DPD 0x40
180 #define DATA_OUT_DIR 0
181 #define DATA_IN_DIR 1
182 #define DSTID_SCC 0x80
185 #define SRCID_MASK 0x07
186 #define SRCID_SIV 0x08
187 #define SRCID_DSP 0x20
188 #define SRCID_ES 0x40
189 #define SRCID_ER 0x80
193 #ifdef CONFIG_WD33C93_PIO
208 #define ILLEGAL_STATUS_BYTE 0xff
210 #define DEFAULT_SX_PER 376
211 #define DEFAULT_SX_OFF 0
213 #define OPTIMUM_SX_PER 252
214 #define OPTIMUM_SX_OFF 12
223 #define BUF_CHIP_ALLOCED 0
224 #define BUF_SCSI_ALLOCED 1
262 #ifdef PROC_INTERFACE
264 #ifdef PROC_STATISTICS
281 #define C_UNKNOWN_CHIP 100
285 #define S_UNCONNECTED 0
286 #define S_SELECTING 1
287 #define S_RUNNING_LEVEL2 2
288 #define S_CONNECTED 3
289 #define S_PRE_TMP_DISC 4
290 #define S_PRE_CMP_DISC 5
295 #define D_DMA_RUNNING 1
305 #define L2_RESELECT 6
311 #define DIS_ADAPTIVE 1
316 #define DB_TEST1 1<<0
317 #define DB_TEST2 1<<1
318 #define DB_QUEUE_COMMAND 1<<2
319 #define DB_EXECUTE 1<<3
321 #define DB_TRANSFER 1<<5
333 #define PR_VERSION 1<<0
335 #define PR_STATISTICS 1<<2
336 #define PR_CONNECTED 1<<3
337 #define PR_INPUTQ 1<<4
338 #define PR_DISCQ 1<<5