Go to the documentation of this file.
42 #define BIT_16 0x10000
43 #define BIT_17 0x20000
44 #define BIT_18 0x40000
45 #define BIT_19 0x80000
46 #define BIT_20 0x100000
47 #define BIT_21 0x200000
48 #define BIT_22 0x400000
49 #define BIT_23 0x800000
50 #define BIT_24 0x1000000
51 #define BIT_25 0x2000000
52 #define BIT_26 0x4000000
53 #define BIT_27 0x8000000
54 #define BIT_28 0x10000000
55 #define BIT_29 0x20000000
56 #define BIT_30 0x40000000
57 #define BIT_31 0x80000000
60 #define RD_REG_WORD(addr) readw_relaxed(addr)
61 #define RD_REG_WORD_dmasync(addr) readw(addr)
62 #define WRT_REG_WORD(addr, data) writew(data, addr)
64 #define RD_REG_WORD(addr) inw((unsigned long)addr)
65 #define RD_REG_WORD_dmasync(addr) RD_REG_WORD(addr)
66 #define WRT_REG_WORD(addr, data) outw(data, (unsigned long)addr)
75 #define MAX_TARGETS 16
84 #define QLA1280_WDG_TIME_QUANTUM 5
87 #define COMMAND_RETRY_COUNT 255
90 #define MAX_OUTSTANDING_COMMANDS 512
91 #define COMPLETED_HANDLE ((unsigned char *) \
92 (MAX_OUTSTANDING_COMMANDS + 2))
95 #define REQUEST_ENTRY_CNT 255
96 #define RESPONSE_ENTRY_CNT 63
116 #define SRB_TIMEOUT (1 << 0)
117 #define SRB_SENT (1 << 1)
118 #define SRB_ABORT_PENDING (1 << 2)
119 #define SRB_ABORTED (1 << 3)
128 #define ISP_CFG0_HWMSK 0x000f
129 #define ISP_CFG0_1020 BIT_0
130 #define ISP_CFG0_1020A BIT_1
131 #define ISP_CFG0_1040 BIT_2
132 #define ISP_CFG0_1040A BIT_3
133 #define ISP_CFG0_1040B BIT_4
134 #define ISP_CFG0_1040C BIT_5
136 #define ISP_CFG1_F128 BIT_6
137 #define ISP_CFG1_F64 BIT_4|BIT_5
138 #define ISP_CFG1_F32 BIT_5
139 #define ISP_CFG1_F16 BIT_4
140 #define ISP_CFG1_BENAB BIT_2
141 #define ISP_CFG1_SXP BIT_0
143 #define ISP_RESET BIT_0
144 #define ISP_EN_INT BIT_1
145 #define ISP_EN_RISC BIT_2
146 #define ISP_FLASH_ENABLE BIT_8
147 #define ISP_FLASH_UPPER BIT_9
149 #define PCI_64BIT_SLOT BIT_14
150 #define RISC_INT BIT_2
151 #define PCI_INT BIT_1
154 #define NV_DESELECT 0
155 #define NV_CLOCK BIT_0
156 #define NV_SELECT BIT_1
157 #define NV_DATA_OUT BIT_2
158 #define NV_DATA_IN BIT_3
166 #define CDMA_CONF_SENAB BIT_3
167 #define CDMA_CONF_RIRQ BIT_2
168 #define CDMA_CONF_BENAB BIT_1
169 #define CDMA_CONF_DIR BIT_0
183 #define DDMA_CONF_SENAB BIT_3
184 #define DDMA_CONF_RIRQ BIT_2
185 #define DDMA_CONF_BENAB BIT_1
186 #define DDMA_CONF_DIR BIT_0
211 #define HOST_INT BIT_7
212 #define BIOS_ENABLE BIT_0
223 #define MAILBOX_REGISTER_COUNT 8
228 #define PROD_ID_1 0x4953
229 #define PROD_ID_2 0x0000
230 #define PROD_ID_2a 0x5020
231 #define PROD_ID_3 0x2020
232 #define PROD_ID_4 0x1
237 #define HC_RESET_RISC 0x1000
238 #define HC_PAUSE_RISC 0x2000
239 #define HC_RELEASE_RISC 0x3000
240 #define HC_SET_HOST_INT 0x5000
241 #define HC_CLR_HOST_INT 0x6000
242 #define HC_CLR_RISC_INT 0x7000
243 #define HC_DISABLE_BIOS 0x9000
248 #define MBS_FRM_ALIVE 0
249 #define MBS_CHKSUM_ERR 1
250 #define MBS_SHADOW_LD_ERR 2
256 #define MBS_CMD_CMP 0x4000
257 #define MBS_INV_CMD 0x4001
258 #define MBS_HOST_INF_ERR 0x4002
259 #define MBS_TEST_FAILED 0x4003
260 #define MBS_CMD_ERR 0x4005
261 #define MBS_CMD_PARAM_ERR 0x4006
266 #define MBA_ASYNC_EVENT 0x8000
267 #define MBA_BUS_RESET 0x8001
268 #define MBA_SYSTEM_ERR 0x8002
269 #define MBA_REQ_TRANSFER_ERR 0x8003
270 #define MBA_RSP_TRANSFER_ERR 0x8004
271 #define MBA_WAKEUP_THRES 0x8005
272 #define MBA_TIMEOUT_RESET 0x8006
273 #define MBA_DEVICE_RESET 0x8007
274 #define MBA_BUS_MODE_CHANGE 0x800E
275 #define MBA_SCSI_COMPLETION 0x8020
281 #define MBC_LOAD_RAM 1
282 #define MBC_EXECUTE_FIRMWARE 2
283 #define MBC_DUMP_RAM 3
284 #define MBC_WRITE_RAM_WORD 4
285 #define MBC_READ_RAM_WORD 5
286 #define MBC_MAILBOX_REGISTER_TEST 6
287 #define MBC_VERIFY_CHECKSUM 7
288 #define MBC_ABOUT_FIRMWARE 8
289 #define MBC_INIT_REQUEST_QUEUE 0x10
290 #define MBC_INIT_RESPONSE_QUEUE 0x11
291 #define MBC_EXECUTE_IOCB 0x12
292 #define MBC_ABORT_COMMAND 0x15
293 #define MBC_ABORT_DEVICE 0x16
294 #define MBC_ABORT_TARGET 0x17
295 #define MBC_BUS_RESET 0x18
296 #define MBC_GET_RETRY_COUNT 0x22
297 #define MBC_GET_TARGET_PARAMETERS 0x28
298 #define MBC_SET_INITIATOR_ID 0x30
299 #define MBC_SET_SELECTION_TIMEOUT 0x31
300 #define MBC_SET_RETRY_COUNT 0x32
301 #define MBC_SET_TAG_AGE_LIMIT 0x33
302 #define MBC_SET_CLOCK_RATE 0x34
303 #define MBC_SET_ACTIVE_NEGATION 0x35
304 #define MBC_SET_ASYNC_DATA_SETUP 0x36
305 #define MBC_SET_PCI_CONTROL 0x37
306 #define MBC_SET_TARGET_PARAMETERS 0x38
307 #define MBC_SET_DEVICE_QUEUE 0x39
308 #define MBC_SET_RESET_DELAY_PARAMETERS 0x3A
309 #define MBC_SET_SYSTEM_PARAMETER 0x45
310 #define MBC_SET_FIRMWARE_FEATURES 0x4A
311 #define MBC_INIT_REQUEST_QUEUE_A64 0x52
312 #define MBC_INIT_RESPONSE_QUEUE_A64 0x53
313 #define MBC_ENABLE_TARGET_MODE 0x55
314 #define MBC_SET_DATA_OVERRUN_RECOVERY 0x5A
320 #define TP_RENEGOTIATE BIT_8
321 #define TP_STOP_QUEUE BIT_9
322 #define TP_AUTO_REQUEST_SENSE BIT_10
323 #define TP_TAGGED_QUEUE BIT_11
324 #define TP_SYNC BIT_12
325 #define TP_WIDE BIT_13
326 #define TP_PARITY BIT_14
327 #define TP_DISCONNECT BIT_15
332 #define NV_START_BIT BIT_2
333 #define NV_WRITE_OP (BIT_26 | BIT_24)
334 #define NV_READ_OP (BIT_26 | BIT_25)
335 #define NV_ERASE_OP (BIT_26 | BIT_25 | BIT_24)
336 #define NV_MASK_OP (BIT_26 | BIT_25 | BIT_24)
337 #define NV_DELAY_COUNT 10
516 #define COMMAND_TYPE 1
544 #define CONTINUE_TYPE 2
570 #define STATUS_TYPE 3
574 #define RF_CONT BIT_0
575 #define RF_FULL BIT_1
576 #define RF_BAD_HEADER BIT_2
577 #define RF_BAD_PAYLOAD BIT_3
582 #define SF_TRANSFER_CMPL BIT_14
583 #define SF_GOT_SENSE BIT_13
584 #define SF_GOT_STATUS BIT_12
585 #define SF_TRANSFERRED_DATA BIT_11
586 #define SF_SENT_CDB BIT_10
587 #define SF_GOT_TARGET BIT_9
588 #define SF_GOT_BUS BIT_8
602 #define MARKER_TYPE 4
610 #define MK_SYNC_ID_LUN 0
612 #define MK_SYNC_ALL 2
623 #define EXTENDED_CMD_TYPE 5
643 #define COMMAND_A64_TYPE 9
668 #define CONTINUE_A64_TYPE 0xA
689 #define ENABLE_LUN_TYPE 0xB
717 #define MODIFY_LUN_TYPE 0xC
742 #define IMMED_NOTIFY_TYPE 0xD
768 #define NOTIFY_ACK_TYPE 0xE
789 #define ACCEPT_TGT_IO_TYPE 6
812 #define CONTINUE_TGT_IO_TYPE 7
845 #define CTIO_RET_TYPE 7
875 #define CTIO_A64_TYPE 0xF
905 #define CTIO_A64_RET_TYPE 0xF
930 #define RESPONSE_ENTRY_SIZE (sizeof(struct response))
931 #define REQUEST_ENTRY_SIZE (sizeof(request_t))
936 #define CS_COMPLETE 0x0
937 #define CS_INCOMPLETE 0x1
939 #define CS_TRANSPORT 0x3
941 #define CS_ABORTED 0x5
942 #define CS_TIMEOUT 0x6
943 #define CS_DATA_OVERRUN 0x7
944 #define CS_COMMAND_OVERRUN 0x8
945 #define CS_STATUS_OVERRUN 0x9
946 #define CS_BAD_MSG 0xA
947 #define CS_NO_MSG_OUT 0xB
948 #define CS_EXTENDED_ID 0xC
949 #define CS_IDE_MSG 0xD
950 #define CS_ABORT_MSG 0xE
951 #define CS_REJECT_MSG 0xF
952 #define CS_NOP_MSG 0x10
953 #define CS_PARITY_MSG 0x11
954 #define CS_DEV_RESET_MSG 0x12
955 #define CS_ID_MSG 0x13
957 #define CS_DATA_UNDERRUN 0x15
958 #define CS_TRANACTION_1 0x18
959 #define CS_TRANACTION_2 0x19
960 #define CS_TRANACTION_3 0x1a
961 #define CS_INV_ENTRY_TYPE 0x1b
962 #define CS_DEV_QUEUE_FULL 0x1c
963 #define CS_PHASED_SKIPPED 0x1d
964 #define CS_ARS_FAILED 0x1e
965 #define CS_LVD_BUS_ERROR 0x21
966 #define CS_BAD_PAYLOAD 0x80
967 #define CS_UNKNOWN 0x81
968 #define CS_RETRY 0x82
973 #define OF_ENABLE_TAG BIT_1
974 #define OF_DATA_IN BIT_6
976 #define OF_DATA_OUT BIT_7
978 #define OF_NO_DATA (BIT_7 | BIT_6)
979 #define OF_DISC_DISABLED BIT_15
980 #define OF_DISABLE_SDP BIT_24
981 #define OF_SEND_RDP BIT_26
982 #define OF_FORCE_DISC BIT_30
983 #define OF_SSTS BIT_31