Go to the documentation of this file.
10 #define ESP_TCLOW 0x00UL
11 #define ESP_TCMED 0x01UL
12 #define ESP_FDATA 0x02UL
13 #define ESP_CMD 0x03UL
14 #define ESP_STATUS 0x04UL
15 #define ESP_BUSID ESP_STATUS
16 #define ESP_INTRPT 0x05UL
17 #define ESP_TIMEO ESP_INTRPT
18 #define ESP_SSTEP 0x06UL
19 #define ESP_STP ESP_SSTEP
20 #define ESP_FFLAGS 0x07UL
21 #define ESP_SOFF ESP_FFLAGS
22 #define ESP_CFG1 0x08UL
23 #define ESP_CFACT 0x09UL
24 #define ESP_STATUS2 ESP_CFACT
25 #define ESP_CTEST 0x0aUL
26 #define ESP_CFG2 0x0bUL
27 #define ESP_CFG3 0x0cUL
28 #define ESP_TCHI 0x0eUL
29 #define ESP_UID ESP_TCHI
30 #define FAS_RLO ESP_TCHI
31 #define ESP_FGRND 0x0fUL
32 #define FAS_RHI ESP_FGRND
34 #define SBUS_ESP_REG_SIZE 0x40UL
39 #define ESP_CONFIG1_ID 0x07
40 #define ESP_CONFIG1_CHTEST 0x08
41 #define ESP_CONFIG1_PENABLE 0x10
42 #define ESP_CONFIG1_PARTEST 0x20
43 #define ESP_CONFIG1_SRRDISAB 0x40
44 #define ESP_CONFIG1_SLCABLE 0x80
47 #define ESP_CONFIG2_DMAPARITY 0x01
48 #define ESP_CONFIG2_REGPARITY 0x02
49 #define ESP_CONFIG2_BADPARITY 0x04
50 #define ESP_CONFIG2_SCSI2ENAB 0x08
51 #define ESP_CONFIG2_HI 0x10
52 #define ESP_CONFIG2_HMEFENAB 0x10
53 #define ESP_CONFIG2_BCM 0x20
54 #define ESP_CONFIG2_DISPINT 0x20
55 #define ESP_CONFIG2_FENAB 0x40
56 #define ESP_CONFIG2_SPL 0x40
57 #define ESP_CONFIG2_MKDONE 0x40
58 #define ESP_CONFIG2_HME32 0x80
59 #define ESP_CONFIG2_MAGIC 0xe0
62 #define ESP_CONFIG3_FCLOCK 0x01
63 #define ESP_CONFIG3_TEM 0x01
64 #define ESP_CONFIG3_FAST 0x02
65 #define ESP_CONFIG3_ADMA 0x02
66 #define ESP_CONFIG3_TENB 0x04
67 #define ESP_CONFIG3_SRB 0x04
68 #define ESP_CONFIG3_TMS 0x08
69 #define ESP_CONFIG3_FCLK 0x08
70 #define ESP_CONFIG3_IDMSG 0x10
71 #define ESP_CONFIG3_FSCSI 0x10
72 #define ESP_CONFIG3_GTM 0x20
73 #define ESP_CONFIG3_IDBIT3 0x20
74 #define ESP_CONFIG3_TBMS 0x40
75 #define ESP_CONFIG3_EWIDE 0x40
76 #define ESP_CONFIG3_IMS 0x80
77 #define ESP_CONFIG3_OBPUSH 0x80
85 #define ESP_CMD_NULL 0x00
86 #define ESP_CMD_FLUSH 0x01
87 #define ESP_CMD_RC 0x02
88 #define ESP_CMD_RS 0x03
93 #define ESP_CMD_TI 0x10
94 #define ESP_CMD_ICCSEQ 0x11
95 #define ESP_CMD_MOK 0x12
96 #define ESP_CMD_TPAD 0x18
97 #define ESP_CMD_SATN 0x1a
98 #define ESP_CMD_RATN 0x1b
103 #define ESP_CMD_SMSG 0x20
104 #define ESP_CMD_SSTAT 0x21
105 #define ESP_CMD_SDATA 0x22
106 #define ESP_CMD_DSEQ 0x23
107 #define ESP_CMD_TSEQ 0x24
108 #define ESP_CMD_TCCSEQ 0x25
109 #define ESP_CMD_DCNCT 0x27
110 #define ESP_CMD_RMSG 0x28
111 #define ESP_CMD_RCMD 0x29
112 #define ESP_CMD_RDATA 0x2a
113 #define ESP_CMD_RCSEQ 0x2b
119 #define ESP_CMD_RSEL 0x40
120 #define ESP_CMD_SEL 0x41
121 #define ESP_CMD_SELA 0x42
122 #define ESP_CMD_SELAS 0x43
123 #define ESP_CMD_ESEL 0x44
124 #define ESP_CMD_DSEL 0x45
125 #define ESP_CMD_SA3 0x46
126 #define ESP_CMD_RSEL3 0x47
129 #define ESP_CMD_DMA 0x80
132 #define ESP_STAT_PIO 0x01
133 #define ESP_STAT_PCD 0x02
134 #define ESP_STAT_PMSG 0x04
135 #define ESP_STAT_PMASK 0x07
136 #define ESP_STAT_TDONE 0x08
137 #define ESP_STAT_TCNT 0x10
138 #define ESP_STAT_PERR 0x20
139 #define ESP_STAT_SPAM 0x40
143 #define ESP_STAT_INTR 0x80
151 #define ESP_DIP (ESP_STAT_PIO)
152 #define ESP_CMDP (ESP_STAT_PCD)
153 #define ESP_STATP (ESP_STAT_PCD|ESP_STAT_PIO)
154 #define ESP_MOP (ESP_STAT_PMSG|ESP_STAT_PCD)
155 #define ESP_MIP (ESP_STAT_PMSG|ESP_STAT_PCD|ESP_STAT_PIO)
158 #define ESP_STAT2_SCHBIT 0x01
159 #define ESP_STAT2_FFLAGS 0x02
160 #define ESP_STAT2_XCNT 0x04
161 #define ESP_STAT2_CREGA 0x08
162 #define ESP_STAT2_WIDE 0x10
163 #define ESP_STAT2_F1BYTE 0x20
164 #define ESP_STAT2_FMSB 0x40
165 #define ESP_STAT2_FEMPTY 0x80
168 #define ESP_INTR_S 0x01
169 #define ESP_INTR_SATN 0x02
170 #define ESP_INTR_RSEL 0x04
171 #define ESP_INTR_FDONE 0x08
172 #define ESP_INTR_BSERV 0x10
173 #define ESP_INTR_DC 0x20
174 #define ESP_INTR_IC 0x40
175 #define ESP_INTR_SR 0x80
178 #define ESP_STEP_VBITS 0x07
179 #define ESP_STEP_ASEL 0x00
180 #define ESP_STEP_SID 0x01
181 #define ESP_STEP_NCMD 0x02
182 #define ESP_STEP_PPC 0x03
185 #define ESP_STEP_FINI4 0x04
188 #define ESP_STEP_FINI5 0x05
189 #define ESP_STEP_FINI6 0x06
190 #define ESP_STEP_FINI7 0x07
193 #define ESP_TEST_TARG 0x01
194 #define ESP_TEST_INI 0x02
195 #define ESP_TEST_TS 0x04
198 #define ESP_UID_F100A 0x00
199 #define ESP_UID_F236 0x02
200 #define ESP_UID_REV 0x07
201 #define ESP_UID_FAM 0xf8
205 #define ESP_FF_FBYTES 0x1f
206 #define ESP_FF_ONOTZERO 0x20
207 #define ESP_FF_SSTEP 0xe0
210 #define ESP_CCF_F0 0x00
211 #define ESP_CCF_NEVER 0x01
212 #define ESP_CCF_F2 0x02
213 #define ESP_CCF_F3 0x03
214 #define ESP_CCF_F4 0x04
215 #define ESP_CCF_F5 0x05
216 #define ESP_CCF_F6 0x06
217 #define ESP_CCF_F7 0x07
220 #define ESP_BUSID_RESELID 0x10
221 #define ESP_BUSID_CTR32BIT 0x40
223 #define ESP_BUS_TIMEOUT 250
224 #define ESP_TIMEO_CONST 8192
225 #define ESP_NEG_DEFP(mhz, cfact) \
226 ((ESP_BUS_TIMEOUT * ((mhz) / 1000)) / (8192 * (cfact)))
227 #define ESP_HZ_TO_CYCLE(hertz) ((1000000000) / ((hertz) / 1000))
228 #define ESP_TICK(ccf, cycle) ((7682 * (ccf) * (cycle) / 1000))
234 #define SYNC_DEFP_SLOW 0x32
235 #define SYNC_DEFP_FAST 0x19
247 #define ESP_CMD_PRIV(CMD) ((struct esp_cmd_priv *)(&(CMD)->SCp))
269 #define ESP_CMD_FLAG_WRITE 0x01
270 #define ESP_CMD_FLAG_ABORT 0x02
271 #define ESP_CMD_FLAG_AUTOSENSE 0x04
286 #define ESP_DEFAULT_TAGS 16
288 #define ESP_MAX_TARGET 16
289 #define ESP_MAX_LUN 8
290 #define ESP_MAX_TAG 256
309 #define ESP_TGT_WIDE 0x01
310 #define ESP_TGT_DISCONNECT 0x02
311 #define ESP_TGT_NEGO_WIDE 0x04
312 #define ESP_TGT_NEGO_SYNC 0x08
313 #define ESP_TGT_CHECK_NEGO 0x40
314 #define ESP_TGT_BROKEN 0x80
329 #define ESP_EVENT_TYPE_EVENT 0x01
330 #define ESP_EVENT_TYPE_CMD 0x02
358 int num_sg,
int dir);
362 int num_sg,
int dir);
410 #define ESP_MAX_MSG_SZ 8
411 #define ESP_EVENT_LOG_SZ 32
413 #define ESP_QUICKIRQ_LIMIT 100
414 #define ESP_RESELECT_TAG_LIMIT 2500
475 #define ESP_FLAG_DIFFERENTIAL 0x00000001
476 #define ESP_FLAG_RESETTING 0x00000002
477 #define ESP_FLAG_DOING_SLOWCMD 0x00000004
478 #define ESP_FLAG_WIDE_CAPABLE 0x00000008
479 #define ESP_FLAG_QUICKIRQ_CHECK 0x00000010
480 #define ESP_FLAG_DISABLE_SYNC 0x00000020
483 #define ESP_SELECT_NONE 0x00
484 #define ESP_SELECT_BASIC 0x01
485 #define ESP_SELECT_MSGOUT 0x02
489 #define ESP_EVENT_NONE 0x00
490 #define ESP_EVENT_CMD_START 0x01
491 #define ESP_EVENT_CMD_DONE 0x02
492 #define ESP_EVENT_DATA_IN 0x03
493 #define ESP_EVENT_DATA_OUT 0x04
494 #define ESP_EVENT_DATA_DONE 0x05
495 #define ESP_EVENT_MSGIN 0x06
496 #define ESP_EVENT_MSGIN_MORE 0x07
497 #define ESP_EVENT_MSGIN_DONE 0x08
498 #define ESP_EVENT_MSGOUT 0x09
499 #define ESP_EVENT_MSGOUT_DONE 0x0a
500 #define ESP_EVENT_STATUS 0x0b
501 #define ESP_EVENT_FREE_BUS 0x0c
502 #define ESP_EVENT_CHECK_PHASE 0x0d
503 #define ESP_EVENT_RESET 0x10