summaryrefslogtreecommitdiff
path: root/sys/dev/ic/ispmbox.h
diff options
context:
space:
mode:
authormjacob <mjacob@cvs.openbsd.org>2001-10-06 22:45:53 +0000
committermjacob <mjacob@cvs.openbsd.org>2001-10-06 22:45:53 +0000
commitfa35731037d936d715e410a61480a162b6069d12 (patch)
tree32c1252e18a7698e35cfc1f60493d788e6fa1bae /sys/dev/ic/ispmbox.h
parente12667d1172cfaad10cb05e7b7bf2ee636416b0c (diff)
Fix various 2300 (2Gb) last minute errata. Keep up with the jones' for
the target mode code.
Diffstat (limited to 'sys/dev/ic/ispmbox.h')
-rw-r--r--sys/dev/ic/ispmbox.h72
1 files changed, 40 insertions, 32 deletions
diff --git a/sys/dev/ic/ispmbox.h b/sys/dev/ic/ispmbox.h
index 180f0a5e139..06ddd74149c 100644
--- a/sys/dev/ic/ispmbox.h
+++ b/sys/dev/ic/ispmbox.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ispmbox.h,v 1.14 2001/09/01 07:16:40 mjacob Exp $ */
+/* $OpenBSD: ispmbox.h,v 1.15 2001/10/06 22:45:52 mjacob Exp $ */
/*
* Mailbox and Queue Entry Definitions for for Qlogic ISP SCSI adapters.
*
@@ -107,37 +107,45 @@
#define FW_FEATURE_LVD_NOTIFY 0x2
#define FW_FEATURE_FAST_POST 0x1
-#define MBOX_ENABLE_TARGET_MODE 0x55
+#define MBOX_ENABLE_TARGET_MODE 0x0055
#define ENABLE_TARGET_FLAG 0x8000
#define ENABLE_TQING_FLAG 0x0004
#define ENABLE_MANDATORY_DISC 0x0002
-#define MBOX_GET_TARGET_STATUS 0x56
-
-/* These are for the ISP2100 FC cards */
-#define MBOX_GET_LOOP_ID 0x20
-#define MBOX_GET_FIRMWARE_OPTIONS 0x28
-#define MBOX_SET_FIRMWARE_OPTIONS 0x38
-#define MBOX_GET_RESOURCE_COUNT 0x42
-#define MBOX_ENHANCED_GET_PDB 0x47
-#define MBOX_EXEC_COMMAND_IOCB_A64 0x54
-#define MBOX_INIT_FIRMWARE 0x60
-#define MBOX_GET_INIT_CONTROL_BLOCK 0x61
-#define MBOX_INIT_LIP 0x62
-#define MBOX_GET_FC_AL_POSITION_MAP 0x63
-#define MBOX_GET_PORT_DB 0x64
-#define MBOX_CLEAR_ACA 0x65
-#define MBOX_TARGET_RESET 0x66
-#define MBOX_CLEAR_TASK_SET 0x67
-#define MBOX_ABORT_TASK_SET 0x68
-#define MBOX_GET_FW_STATE 0x69
-#define MBOX_GET_PORT_NAME 0x6a
-#define MBOX_GET_LINK_STATUS 0x6b
-#define MBOX_INIT_LIP_RESET 0x6c
-#define MBOX_SEND_SNS 0x6e
-#define MBOX_FABRIC_LOGIN 0x6f
-#define MBOX_SEND_CHANGE_REQUEST 0x70
-#define MBOX_FABRIC_LOGOUT 0x71
-#define MBOX_INIT_LIP_LOGIN 0x72
+#define MBOX_GET_TARGET_STATUS 0x0056
+
+/* These are for the ISP2X00 FC cards */
+#define MBOX_GET_LOOP_ID 0x0020
+#define MBOX_GET_FIRMWARE_OPTIONS 0x0028
+#define MBOX_SET_FIRMWARE_OPTIONS 0x0038
+#define MBOX_GET_RESOURCE_COUNT 0x0042
+#define MBOX_ENHANCED_GET_PDB 0x0047
+#define MBOX_EXEC_COMMAND_IOCB_A64 0x0054
+#define MBOX_INIT_FIRMWARE 0x0060
+#define MBOX_GET_INIT_CONTROL_BLOCK 0x0061
+#define MBOX_INIT_LIP 0x0062
+#define MBOX_GET_FC_AL_POSITION_MAP 0x0063
+#define MBOX_GET_PORT_DB 0x0064
+#define MBOX_CLEAR_ACA 0x0065
+#define MBOX_TARGET_RESET 0x0066
+#define MBOX_CLEAR_TASK_SET 0x0067
+#define MBOX_ABORT_TASK_SET 0x0068
+#define MBOX_GET_FW_STATE 0x0069
+#define MBOX_GET_PORT_NAME 0x006A
+#define MBOX_GET_LINK_STATUS 0x006B
+#define MBOX_INIT_LIP_RESET 0x006C
+#define MBOX_SEND_SNS 0x006E
+#define MBOX_FABRIC_LOGIN 0x006F
+#define MBOX_SEND_CHANGE_REQUEST 0x0070
+#define MBOX_FABRIC_LOGOUT 0x0071
+#define MBOX_INIT_LIP_LOGIN 0x0072
+
+#define MBOX_GET_SET_DATA_RATE 0x005D /* 23XX only */
+#define MBGSD_GET_RATE 0
+#define MBGSD_SET_RATE 1
+#define MBGSD_ONEGB 0
+#define MBGSD_TWOGB 1
+#define MBGSD_AUTO 2
+
#define ISP2100_SET_PCI_PARAM 0x00ff
@@ -654,9 +662,9 @@ typedef struct isp_icb {
#define ICBXOPT_RIO_32BIT_DELAY 4
/* These 3 only apply to the 2300 */
-#define ICBXOPT_RATE_ONEGB (0 << 14)
-#define ICBXOPT_RATE_TWOGB (1 << 14)
-#define ICBXOPT_RATE_AUTO (2 << 14)
+#define ICBZOPT_RATE_ONEGB (MBGSD_ONEGB << 14)
+#define ICBZOPT_RATE_TWOGB (MBGSD_TWOGB << 14)
+#define ICBZOPT_RATE_AUTO (MBGSD_AUTO << 14)
#define ICB_MIN_FRMLEN 256