Go to the documentation of this file.
38 #include <linux/types.h>
40 #define TOTAL_SG_ENTRY 32
41 #define MAX_SUPPORTED_ADAPTERS 8
43 #define MAX_TARGETS 16
56 #define TUL_PSTUS 0x06
64 #define TUL_PBIST 0x0F
66 #define TUL_PBAD1 0x14
67 #define TUL_PBAD2 0x18
68 #define TUL_PBAD3 0x1C
69 #define TUL_PBAD4 0x20
70 #define TUL_PBAD5 0x24
71 #define TUL_PRSVD 0x28
72 #define TUL_PRSVD1 0x2C
74 #define TUL_PRSVD2 0x34
75 #define TUL_PRSVD3 0x38
76 #define TUL_PINTL 0x3C
77 #define TUL_PINTP 0x3D
78 #define TUL_PIGNT 0x3E
79 #define TUL_PMGNT 0x3F
84 #define TUL_HACFG0 0x40
85 #define TUL_HACFG1 0x41
86 #define TUL_HACFG2 0x42
88 #define TUL_SDCFG0 0x44
89 #define TUL_SDCFG1 0x45
90 #define TUL_SDCFG2 0x46
91 #define TUL_SDCFG3 0x47
93 #define TUL_GINTS 0x50
94 #define TUL_GIMSK 0x52
95 #define TUL_GCTRL 0x54
96 #define TUL_GCTRL_EEPROM_BIT 0x04
97 #define TUL_GCTRL1 0x55
98 #define TUL_DMACFG 0x5B
99 #define TUL_NVRAM 0x5D
101 #define TUL_SCnt0 0x80
102 #define TUL_SCnt1 0x81
103 #define TUL_SCnt2 0x82
104 #define TUL_SFifoCnt 0x83
105 #define TUL_SIntEnable 0x84
106 #define TUL_SInt 0x84
107 #define TUL_SCtrl0 0x85
108 #define TUL_SStatus0 0x85
109 #define TUL_SCtrl1 0x86
110 #define TUL_SStatus1 0x86
111 #define TUL_SConfig 0x87
112 #define TUL_SStatus2 0x87
113 #define TUL_SPeriod 0x88
114 #define TUL_SOffset 0x88
115 #define TUL_SScsiId 0x89
116 #define TUL_SBusId 0x89
117 #define TUL_STimeOut 0x8A
118 #define TUL_SIdent 0x8A
119 #define TUL_SAvail 0x8A
120 #define TUL_SData 0x8B
121 #define TUL_SFifo 0x8C
122 #define TUL_SSignal 0x90
123 #define TUL_SCmd 0x91
124 #define TUL_STest0 0x92
125 #define TUL_STest1 0x93
126 #define TUL_SCFG1 0x94
128 #define TUL_XAddH 0xC0
129 #define TUL_XAddW 0xC8
130 #define TUL_XCntH 0xD0
131 #define TUL_XCntW 0xD4
132 #define TUL_XCmd 0xD8
134 #define TUL_XStatus 0xDD
135 #define TUL_Mask 0xE0
136 #define TUL_XCtrl 0xE4
137 #define TUL_XCtrl1 0xE5
138 #define TUL_XFifo 0xE8
140 #define TUL_WCtrl 0xF7
141 #define TUL_DCtrl 0xFB
152 #define TSC_EN_RESEL 0x80
153 #define TSC_CMD_COMP 0x84
155 #define TSC_SEL_ATN 0x11
156 #define TSC_SEL_ATN_DMA 0x51
157 #define TSC_SEL_ATN3 0x31
158 #define TSC_SEL_ATNSTOP 0x12
159 #define TSC_SELATNSTOP 0x1E
161 #define TSC_SEL_ATN_DIRECT_IN 0x95
162 #define TSC_SEL_ATN_DIRECT_OUT 0x15
163 #define TSC_SEL_ATN3_DIRECT_IN 0xB5
164 #define TSC_SEL_ATN3_DIRECT_OUT 0x35
165 #define TSC_XF_DMA_OUT_DIRECT 0x06
166 #define TSC_XF_DMA_IN_DIRECT 0x86
168 #define TSC_XF_DMA_OUT 0x43
169 #define TSC_XF_DMA_IN 0xC3
170 #define TSC_XF_FIFO_OUT 0x03
171 #define TSC_XF_FIFO_IN 0x83
173 #define TSC_MSG_ACCEPT 0x0F
178 #define TSC_RST_SEQ 0x20
179 #define TSC_FLUSH_FIFO 0x10
180 #define TSC_ABT_CMD 0x04
181 #define TSC_RST_CHIP 0x02
182 #define TSC_RST_BUS 0x01
187 #define TSC_EN_SCAM 0x80
188 #define TSC_TIMER 0x40
189 #define TSC_EN_SCSI2 0x20
190 #define TSC_PWDN 0x10
191 #define TSC_WIDE_CPU 0x08
192 #define TSC_HW_RESELECT 0x04
193 #define TSC_EN_BUS_OUT 0x02
194 #define TSC_EN_BUS_IN 0x01
199 #define TSC_EN_LATCH 0x80
200 #define TSC_INITIATOR 0x40
201 #define TSC_EN_SCSI_PAR 0x20
202 #define TSC_DMA_8BIT 0x10
203 #define TSC_DMA_16BIT 0x08
204 #define TSC_EN_WDACK 0x04
205 #define TSC_ALT_PERIOD 0x02
206 #define TSC_DIS_SCSIRST 0x01
208 #define TSC_INITDEFAULT (TSC_INITIATOR | TSC_EN_LATCH | TSC_ALT_PERIOD | TSC_DIS_SCSIRST)
210 #define TSC_WIDE_SCSI 0x80
215 #define TSC_RST_ACK 0x00
216 #define TSC_RST_ATN 0x00
217 #define TSC_RST_BSY 0x00
219 #define TSC_SET_ACK 0x40
220 #define TSC_SET_ATN 0x08
222 #define TSC_REQI 0x80
223 #define TSC_ACKI 0x40
224 #define TSC_BSYI 0x20
225 #define TSC_SELI 0x10
226 #define TSC_ATNI 0x08
227 #define TSC_MSGI 0x04
235 #define TSS_INT_PENDING 0x80
236 #define TSS_SEQ_ACTIVE 0x40
237 #define TSS_XFER_CNT 0x20
238 #define TSS_FIFO_EMPTY 0x10
239 #define TSS_PAR_ERROR 0x08
240 #define TSS_PH_MASK 0x07
245 #define TSS_STATUS_RCV 0x08
246 #define TSS_MSG_SEND 0x40
247 #define TSS_CMD_PH_CMP 0x20
248 #define TSS_DATA_PH_CMP 0x10
249 #define TSS_STATUS_SEND 0x08
250 #define TSS_XFER_CMP 0x04
251 #define TSS_SEL_CMP 0x02
252 #define TSS_ARB_CMP 0x01
257 #define TSS_CMD_ABTED 0x80
258 #define TSS_OFFSET_0 0x40
259 #define TSS_FIFO_FULL 0x20
260 #define TSS_TIMEOUT_0 0x10
261 #define TSS_BUSY_RLS 0x08
262 #define TSS_PH_MISMATCH 0x04
263 #define TSS_SCSI_BUS_EN 0x02
264 #define TSS_SCSIRST 0x01
269 #define TSS_RESEL_INT 0x80
270 #define TSS_SEL_TIMEOUT 0x40
271 #define TSS_BUS_SERV 0x20
272 #define TSS_SCSIRST_INT 0x10
273 #define TSS_DISC_INT 0x08
274 #define TSS_SEL_INT 0x04
275 #define TSS_SCAM_SEL 0x02
276 #define TSS_FUNC_COMP 0x01
293 #define TAX_X_FORC 0x02
294 #define TAX_X_ABT 0x04
295 #define TAX_X_CLR_FIFO 0x08
297 #define TAX_X_IN 0x21
298 #define TAX_X_OUT 0x01
299 #define TAX_SG_IN 0xA1
300 #define TAX_SG_OUT 0x81
390 #define SCB_RENT 0x01
391 #define SCB_PEND 0x02
392 #define SCB_CONTIG 0x04
393 #define SCB_SELECT 0x08
394 #define SCB_BUSY 0x10
395 #define SCB_DONE 0x20
400 #define BusDevRst 0x2
405 #define SCM_RSENS 0x01
409 #define SCF_DONE 0x01
410 #define SCF_POST 0x02
411 #define SCF_SENSE 0x04
413 #define SCF_NO_DCHK 0x00
415 #define SCF_DOUT 0x10
416 #define SCF_NO_XF 0x18
417 #define SCF_WR_VF 0x20
418 #define SCF_POLL 0x40
422 #define HOST_SEL_TOUT 0x11
423 #define HOST_DO_DU 0x12
424 #define HOST_BUS_FREE 0x13
425 #define HOST_BAD_PHAS 0x14
426 #define HOST_INV_CMD 0x16
427 #define HOST_ABORTED 0x1A
428 #define HOST_SCSI_RST 0x1B
429 #define HOST_DEV_RST 0x1C
432 #define TARGET_CHKCOND 0x02
433 #define TARGET_BUSY 0x08
434 #define INI_QUEUE_FULL 0x28
437 #define MSG_COMP 0x00
438 #define MSG_EXTEND 0x01
440 #define MSG_RESTORE 0x03
441 #define MSG_DISC 0x04
443 #define MSG_ABORT 0x06
446 #define MSG_PARITY 0x09
447 #define MSG_LINK_COMP 0x0A
448 #define MSG_LINK_FLAG 0x0B
449 #define MSG_DEVRST 0x0C
450 #define MSG_ABORT_TAG 0x0D
453 #define MSG_STAG 0x20
454 #define MSG_HTAG 0x21
455 #define MSG_OTAG 0x22
457 #define MSG_IGNOREWIDE 0x23
459 #define MSG_IDENT 0x80
479 #define TCF_SCSI_RATE 0x0007
480 #define TCF_EN_DISC 0x0008
481 #define TCF_NO_SYNC_NEGO 0x0010
482 #define TCF_NO_WDTR 0x0020
483 #define TCF_EN_255 0x0040
484 #define TCF_EN_START 0x0080
485 #define TCF_WDTR_DONE 0x0100
486 #define TCF_SYNC_DONE 0x0200
487 #define TCF_BUSY 0x0400
491 #define TCF_DRV_BUSY 0x01
492 #define TCF_DRV_EN_TAG 0x0800
493 #define TCF_DRV_255_63 0x0400
544 #define HCC_SCSI_RESET 0x01
545 #define HCC_EN_PAR 0x02
546 #define HCC_ACT_TERM1 0x04
547 #define HCC_ACT_TERM2 0x08
548 #define HCC_AUTO_TERM 0x10
549 #define HCC_EN_PWR 0x80
552 #define HCF_EXPECT_DISC 0x01
553 #define HCF_EXPECT_SELECT 0x02
554 #define HCF_EXPECT_RESET 0x10
555 #define HCF_EXPECT_DONE_DISC 0x20
606 #define NBC1_ENABLE 0x01
607 #define NBC1_8DRIVE 0x02
608 #define NBC1_REMOVABLE 0x04
609 #define NBC1_INT19 0x08
610 #define NBC1_BIOSSCAN 0x10
611 #define NBC1_LUNSUPPORT 0x40
614 #define NHC1_BOOTIDMASK 0x0F
615 #define NHC1_LUNMASK 0x70
616 #define NHC1_CHANMASK 0x80
619 #define NCC1_BUSRESET 0x01
620 #define NCC1_PARITYCHK 0x02
621 #define NCC1_ACTTERM1 0x04
622 #define NCC1_ACTTERM2 0x08
623 #define NCC1_AUTOTERM 0x10
624 #define NCC1_PWRMGR 0x80
627 #define NTC_DISCONNECT 0x08
628 #define NTC_SYNC 0x10
629 #define NTC_NO_WDTR 0x20
630 #define NTC_1GIGA 0x40
631 #define NTC_SPINUP 0x80
634 #define INI_SIGNATURE 0xC925
635 #define NBC1_DEFAULT (NBC1_ENABLE)
636 #define NCC1_DEFAULT (NCC1_BUSRESET | NCC1_AUTOTERM | NCC1_PARITYCHK)
637 #define NTC_DEFAULT (NTC_NO_WDTR | NTC_1GIGA | NTC_DISCONNECT)
640 #define DISC_NOT_ALLOW 0x80
641 #define DISC_ALLOW 0xC0
642 #define SCSICMD_RequestSense 0x03
644 #define SCSI_ABORT_SNOOZE 0
645 #define SCSI_ABORT_SUCCESS 1
646 #define SCSI_ABORT_PENDING 2
647 #define SCSI_ABORT_BUSY 3
648 #define SCSI_ABORT_NOT_RUNNING 4
649 #define SCSI_ABORT_ERROR 5
651 #define SCSI_RESET_SNOOZE 0
652 #define SCSI_RESET_PUNT 1
653 #define SCSI_RESET_SUCCESS 2
654 #define SCSI_RESET_PENDING 3
655 #define SCSI_RESET_WAKEUP 4
656 #define SCSI_RESET_NOT_RUNNING 5
657 #define SCSI_RESET_ERROR 6
659 #define SCSI_RESET_SYNCHRONOUS 0x01
660 #define SCSI_RESET_ASYNCHRONOUS 0x02
661 #define SCSI_RESET_SUGGEST_BUS_RESET 0x04
662 #define SCSI_RESET_SUGGEST_HOST_RESET 0x08
664 #define SCSI_RESET_BUS_RESET 0x100
665 #define SCSI_RESET_HOST_RESET 0x200
666 #define SCSI_RESET_ACTION 0xff