Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic Add some wads more definitions. Add macros for re...



details:   https://anonhg.NetBSD.org/src/rev/4a121fffc9af
branches:  trunk
changeset: 512127:4a121fffc9af
user:      mjacob <mjacob%NetBSD.org@localhost>
date:      Fri Jul 06 16:18:08 2001 +0000

description:
Add some wads more definitions. Add macros for request/response queue
in/out pointer access.

diffstat:

 sys/dev/ic/ispmbox.h |  93 ++++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 76 insertions(+), 17 deletions(-)

diffs (157 lines):

diff -r a98647000c71 -r 4a121fffc9af sys/dev/ic/ispmbox.h
--- a/sys/dev/ic/ispmbox.h      Fri Jul 06 16:17:36 2001 +0000
+++ b/sys/dev/ic/ispmbox.h      Fri Jul 06 16:18:08 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ispmbox.h,v 1.32 2001/04/05 02:28:53 mjacob Exp $ */
+/* $NetBSD: ispmbox.h,v 1.33 2001/07/06 16:18:08 mjacob Exp $ */
 /*
  * This driver, which is contained in NetBSD in the files:
  *
@@ -64,7 +64,6 @@
 /*
  * Mailbox Command Opcodes
  */
-
 #define MBOX_NO_OP                     0x0000
 #define MBOX_LOAD_RAM                  0x0001
 #define MBOX_EXEC_FIRMWARE             0x0002
@@ -207,25 +206,55 @@
 #define        ASYNC_HUNG_SCSI                 0x800C
 #define        ASYNC_KILLED_BUS                0x800D
 #define        ASYNC_BUS_TRANSIT               0x800E  /* LVD -> HVD, eg. */
-#define        ASYNC_CMD_CMPLT                 0x8020
-#define        ASYNC_CTIO_DONE                 0x8021
-
-/* for ISP2100 only */
 #define        ASYNC_LIP_OCCURRED              0x8010
 #define        ASYNC_LOOP_UP                   0x8011
 #define        ASYNC_LOOP_DOWN                 0x8012
 #define        ASYNC_LOOP_RESET                0x8013
 #define        ASYNC_PDB_CHANGED               0x8014
 #define        ASYNC_CHANGE_NOTIFY             0x8015
-
-/* for ISP2200 only */
+#define        ASYNC_CMD_CMPLT                 0x8020
+#define        ASYNC_CTIO_DONE                 0x8021
+#define        ASYNC_IP_XMIT_DONE              0x8022
+#define        ASYNC_IP_RECV_DONE              0x8023
+#define        ASYNC_IP_BROADCAST              0x8024
+#define        ASYNC_IP_RCVQ_LOW               0x8025
+#define        ASYNC_IP_RCVQ_EMPTY             0x8026
+#define        ASYNC_IP_RECV_DONE_ALIGNED      0x8027
 #define        ASYNC_PTPMODE                   0x8030
+#define        ASYNC_RIO1                      0x8031
+#define        ASYNC_RIO2                      0x8032
+#define        ASYNC_RIO3                      0x8033
+#define        ASYNC_RIO4                      0x8034
+#define        ASYNC_RIO5                      0x8035
 #define        ASYNC_CONNMODE                  0x8036
 #define                ISP_CONN_LOOP           1
 #define                ISP_CONN_PTP            2
 #define                ISP_CONN_BADLIP         3
 #define                ISP_CONN_FATAL          4
 #define                ISP_CONN_LOOPBACK       5
+#define        ASYNC_RIO_RESP                  0x8040
+#define        ASYNC_RIO_COMP                  0x8042
+/*
+ * 2.01.31 2200 Only. Need Bit 13 in Mailbox 1 for Set Firmware Options
+ * mailbox command to enable this.
+ */
+#define        ASYNC_QFULL_SENT                0x8049
+
+/*
+ * Mailbox Usages
+ */
+
+#define        WRITE_REQUEST_QUEUE_IN_POINTER(isp, value)      \
+       ISP_WRITE(isp, INMAILBOX4, value)
+
+#define        READ_REQUEST_QUEUE_OUT_POINTER(isp)     \
+       ISP_READ(isp, OUTMAILBOX4)
+
+#define        WRITE_RESPONSE_QUEUE_IN_POINTER(isp, value)     \
+       ISP_WRITE(isp, INMAILBOX5, value)
+
+#define        READ_RESPONSE_QUEUE_OUT_POINTER(isp)    \
+       ISP_READ(isp, OUTMAILBOX5)
 
 /*
  * Command Structure Definitions
@@ -236,16 +265,27 @@
        u_int32_t       ds_count;
 } ispds_t;
 
+typedef struct {
+       u_int64_t       ds_base;
+       u_int32_t       ds_count;
+} ispds64_t;
+
+typedef struct {
+       u_int16_t       ds_type;        /* 0-> ispds_t, 1-> ispds64_t */
+       u_int32_t       ds_segment;     /* unused */
+       u_int32_t       ds_base;        /* 32 bit address of DSD list */
+} ispdslist_t;
+
+
+/*
+ * These elements get swizzled around for SBus instances.
+ */
 #define        _ISP_SWAP8(a, b)        {       \
        u_int8_t tmp;                   \
        tmp = a;                        \
        a = b;                          \
        b = tmp;                        \
 }
-
-/*
- * These elements get swizzled around for SBus instances.
- */
 typedef struct {
        u_int8_t        rqs_entry_type;
        u_int8_t        rqs_entry_count;
@@ -289,14 +329,19 @@
 #define        RQSTYPE_CTIO1           0x0f    /* Target Mode */
 #define        RQSTYPE_STATUS_CONT     0x10
 #define        RQSTYPE_T2RQS           0x11
-
+#define        RQSTYPE_IP_XMIT         0x13
 #define        RQSTYPE_T4RQS           0x15
-#define        RQSTYPE_ATIO2           0x16
-#define        RQSTYPE_CTIO2           0x17
+#define        RQSTYPE_ATIO2           0x16    /* Target Mode */
+#define        RQSTYPE_CTIO2           0x17    /* Target Mode */
 #define        RQSTYPE_CSET0           0x18
 #define        RQSTYPE_T3RQS           0x19
-
-#define        RQSTYPE_CTIO3           0x1f
+#define        RQSTYPE_IP_XMIT_64      0x1b
+#define        RQSTYPE_CTIO4           0x1e    /* Target Mode */
+#define        RQSTYPE_CTIO3           0x1f    /* Target Mode */
+#define        RQSTYPE_RIO1            0x21
+#define        RQSTYPE_RIO2            0x22
+#define        RQSTYPE_IP_RECV         0x23
+#define        RQSTYPE_IP_RECV_CONT    0x24
 
 
 #define        ISP_RQDSEG      4
@@ -526,6 +571,20 @@
 #define        ISP_FW_ATTR_IP          0x20
 
 /*
+ * Reduced Interrupt Operation Response Queue Entreis
+ */
+
+typedef struct {
+       isphdr_t        req_header;
+       u_int32_t       req_handles[15];
+} isp_rio1_t;
+
+typedef struct {
+       isphdr_t        req_header;
+       u_int16_t       req_handles[30];
+} isp_rio2_t;
+
+/*
  * FC (ISP2100) specific data structures
  */
 



Home | Main Index | Thread Index | Old Index