Deleted Added
full compact
mpi2_init.h (212420) mpi2_init.h (230592)
1/* $FreeBSD: head/sys/dev/mps/mpi/mpi2_init.h 212420 2010-09-10 15:03:56Z ken $ */
1/*-
2 * Copyright (c) 2011 LSI Corp.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 *
14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * LSI MPT-Fusion Host Adapter FreeBSD
27 *
28 * $FreeBSD: head/sys/dev/mps/mpi/mpi2_init.h 230592 2012-01-26 18:17:21Z ken $
29 */
30
2/*
31/*
3 * Copyright (c) 2000-2009 LSI Corporation.
32 * Copyright (c) 2000-2011 LSI Corporation.
4 *
5 *
6 * Name: mpi2_init.h
7 * Title: MPI SCSI initiator mode messages and structures
8 * Creation Date: June 23, 2006
9 *
33 *
34 *
35 * Name: mpi2_init.h
36 * Title: MPI SCSI initiator mode messages and structures
37 * Creation Date: June 23, 2006
38 *
10 * mpi2_init.h Version: 02.00.08
39 * mpi2_init.h Version: 02.00.11
11 *
12 * Version History
13 * ---------------
14 *
15 * Date Version Description
16 * -------- -------- ------------------------------------------------------
17 * 04-30-07 02.00.00 Corresponds to Fusion-MPT MPI Specification Rev A.
18 * 10-31-07 02.00.01 Fixed name for pMpi2SCSITaskManagementRequest_t.

--- 8 unchanged lines hidden (view full) ---

27 * 05-06-09 02.00.07 Changed task management type of Query Unit Attention to
28 * Query Asynchronous Event.
29 * Defined two new bits in the SlotStatus field of the SCSI
30 * Enclosure Processor Request and Reply.
31 * 10-28-09 02.00.08 Added defines for decoding the ResponseInfo bytes for
32 * both SCSI IO Error Reply and SCSI Task Management Reply.
33 * Added ResponseInfo field to MPI2_SCSI_TASK_MANAGE_REPLY.
34 * Added MPI2_SCSITASKMGMT_RSP_TM_OVERLAPPED_TAG define.
40 *
41 * Version History
42 * ---------------
43 *
44 * Date Version Description
45 * -------- -------- ------------------------------------------------------
46 * 04-30-07 02.00.00 Corresponds to Fusion-MPT MPI Specification Rev A.
47 * 10-31-07 02.00.01 Fixed name for pMpi2SCSITaskManagementRequest_t.

--- 8 unchanged lines hidden (view full) ---

56 * 05-06-09 02.00.07 Changed task management type of Query Unit Attention to
57 * Query Asynchronous Event.
58 * Defined two new bits in the SlotStatus field of the SCSI
59 * Enclosure Processor Request and Reply.
60 * 10-28-09 02.00.08 Added defines for decoding the ResponseInfo bytes for
61 * both SCSI IO Error Reply and SCSI Task Management Reply.
62 * Added ResponseInfo field to MPI2_SCSI_TASK_MANAGE_REPLY.
63 * Added MPI2_SCSITASKMGMT_RSP_TM_OVERLAPPED_TAG define.
64 * 02-10-10 02.00.09 Removed unused structure that had "#if 0" around it.
65 * 05-12-10 02.00.10 Added optional vendor-unique region to SCSI IO Request.
66 * 11-10-10 02.00.11 Added MPI2_SCSIIO_NUM_SGLOFFSETS define.
35 * --------------------------------------------------------------------------
36 */
37
38#ifndef MPI2_INIT_H
39#define MPI2_INIT_H
40
41/*****************************************************************************
42*

--- 10 unchanged lines hidden (view full) ---

53 U8 CDB[20]; /* 0x00 */
54 U32 PrimaryReferenceTag; /* 0x14 */
55 U16 PrimaryApplicationTag; /* 0x18 */
56 U16 PrimaryApplicationTagMask; /* 0x1A */
57 U32 TransferLength; /* 0x1C */
58} MPI2_SCSI_IO_CDB_EEDP32, MPI2_POINTER PTR_MPI2_SCSI_IO_CDB_EEDP32,
59 Mpi2ScsiIoCdbEedp32_t, MPI2_POINTER pMpi2ScsiIoCdbEedp32_t;
60
67 * --------------------------------------------------------------------------
68 */
69
70#ifndef MPI2_INIT_H
71#define MPI2_INIT_H
72
73/*****************************************************************************
74*

--- 10 unchanged lines hidden (view full) ---

85 U8 CDB[20]; /* 0x00 */
86 U32 PrimaryReferenceTag; /* 0x14 */
87 U16 PrimaryApplicationTag; /* 0x18 */
88 U16 PrimaryApplicationTagMask; /* 0x1A */
89 U32 TransferLength; /* 0x1C */
90} MPI2_SCSI_IO_CDB_EEDP32, MPI2_POINTER PTR_MPI2_SCSI_IO_CDB_EEDP32,
91 Mpi2ScsiIoCdbEedp32_t, MPI2_POINTER pMpi2ScsiIoCdbEedp32_t;
92
61/* TBD: I don't think this is needed for MPI2/Gen2 */
62#if 0
63typedef struct
64{
65 U8 CDB[16]; /* 0x00 */
66 U32 DataLength; /* 0x10 */
67 U32 PrimaryReferenceTag; /* 0x14 */
68 U16 PrimaryApplicationTag; /* 0x18 */
69 U16 PrimaryApplicationTagMask; /* 0x1A */
70 U32 TransferLength; /* 0x1C */
71} MPI2_SCSI_IO32_CDB_EEDP16, MPI2_POINTER PTR_MPI2_SCSI_IO32_CDB_EEDP16,
72 Mpi2ScsiIo32CdbEedp16_t, MPI2_POINTER pMpi2ScsiIo32CdbEedp16_t;
73#endif
74
75typedef union
76{
77 U8 CDB32[32];
78 MPI2_SCSI_IO_CDB_EEDP32 EEDP32;
79 MPI2_SGE_SIMPLE_UNION SGE;
80} MPI2_SCSI_IO_CDB_UNION, MPI2_POINTER PTR_MPI2_SCSI_IO_CDB_UNION,
81 Mpi2ScsiIoCdb_t, MPI2_POINTER pMpi2ScsiIoCdb_t;
82

--- 24 unchanged lines hidden (view full) ---

107 U16 EEDPFlags; /* 0x26 */
108 U32 EEDPBlockSize; /* 0x28 */
109 U32 SecondaryReferenceTag; /* 0x2C */
110 U16 SecondaryApplicationTag; /* 0x30 */
111 U16 ApplicationTagTranslationMask; /* 0x32 */
112 U8 LUN[8]; /* 0x34 */
113 U32 Control; /* 0x3C */
114 MPI2_SCSI_IO_CDB_UNION CDB; /* 0x40 */
93typedef union
94{
95 U8 CDB32[32];
96 MPI2_SCSI_IO_CDB_EEDP32 EEDP32;
97 MPI2_SGE_SIMPLE_UNION SGE;
98} MPI2_SCSI_IO_CDB_UNION, MPI2_POINTER PTR_MPI2_SCSI_IO_CDB_UNION,
99 Mpi2ScsiIoCdb_t, MPI2_POINTER pMpi2ScsiIoCdb_t;
100

--- 24 unchanged lines hidden (view full) ---

125 U16 EEDPFlags; /* 0x26 */
126 U32 EEDPBlockSize; /* 0x28 */
127 U32 SecondaryReferenceTag; /* 0x2C */
128 U16 SecondaryApplicationTag; /* 0x30 */
129 U16 ApplicationTagTranslationMask; /* 0x32 */
130 U8 LUN[8]; /* 0x34 */
131 U32 Control; /* 0x3C */
132 MPI2_SCSI_IO_CDB_UNION CDB; /* 0x40 */
133
134#ifdef MPI2_SCSI_IO_VENDOR_UNIQUE_REGION /* typically this is left undefined */
135 MPI2_SCSI_IO_VENDOR_UNIQUE VendorRegion;
136#endif
137
115 MPI2_SGE_IO_UNION SGL; /* 0x60 */
138 MPI2_SGE_IO_UNION SGL; /* 0x60 */
139
116} MPI2_SCSI_IO_REQUEST, MPI2_POINTER PTR_MPI2_SCSI_IO_REQUEST,
117 Mpi2SCSIIORequest_t, MPI2_POINTER pMpi2SCSIIORequest_t;
118
119/* SCSI IO MsgFlags bits */
120
121/* MsgFlags for SenseBufferAddressSpace */
122#define MPI2_SCSIIO_MSGFLAGS_MASK_SENSE_ADDR (0x0C)
123#define MPI2_SCSIIO_MSGFLAGS_SYSTEM_SENSE_ADDR (0x00)

--- 17 unchanged lines hidden (view full) ---

141#define MPI2_SCSIIO_SGLFLAGS_TYPE_IEEE64 (0x02)
142
143/* shift values for each sub-field */
144#define MPI2_SCSIIO_SGLFLAGS_SGL3_SHIFT (12)
145#define MPI2_SCSIIO_SGLFLAGS_SGL2_SHIFT (8)
146#define MPI2_SCSIIO_SGLFLAGS_SGL1_SHIFT (4)
147#define MPI2_SCSIIO_SGLFLAGS_SGL0_SHIFT (0)
148
140} MPI2_SCSI_IO_REQUEST, MPI2_POINTER PTR_MPI2_SCSI_IO_REQUEST,
141 Mpi2SCSIIORequest_t, MPI2_POINTER pMpi2SCSIIORequest_t;
142
143/* SCSI IO MsgFlags bits */
144
145/* MsgFlags for SenseBufferAddressSpace */
146#define MPI2_SCSIIO_MSGFLAGS_MASK_SENSE_ADDR (0x0C)
147#define MPI2_SCSIIO_MSGFLAGS_SYSTEM_SENSE_ADDR (0x00)

--- 17 unchanged lines hidden (view full) ---

165#define MPI2_SCSIIO_SGLFLAGS_TYPE_IEEE64 (0x02)
166
167/* shift values for each sub-field */
168#define MPI2_SCSIIO_SGLFLAGS_SGL3_SHIFT (12)
169#define MPI2_SCSIIO_SGLFLAGS_SGL2_SHIFT (8)
170#define MPI2_SCSIIO_SGLFLAGS_SGL1_SHIFT (4)
171#define MPI2_SCSIIO_SGLFLAGS_SGL0_SHIFT (0)
172
173/* number of SGLOffset fields */
174#define MPI2_SCSIIO_NUM_SGLOFFSETS (4)
175
149/* SCSI IO IoFlags bits */
150
151/* Large CDB Address Space */
152#define MPI2_SCSIIO_CDB_ADDR_MASK (0x6000)
153#define MPI2_SCSIIO_CDB_ADDR_SYSTEM (0x0000)
154#define MPI2_SCSIIO_CDB_ADDR_IOCDDR (0x2000)
155#define MPI2_SCSIIO_CDB_ADDR_IOCPLB (0x4000)
156#define MPI2_SCSIIO_CDB_ADDR_IOCPLBNTA (0x6000)

--- 298 unchanged lines hidden ---
176/* SCSI IO IoFlags bits */
177
178/* Large CDB Address Space */
179#define MPI2_SCSIIO_CDB_ADDR_MASK (0x6000)
180#define MPI2_SCSIIO_CDB_ADDR_SYSTEM (0x0000)
181#define MPI2_SCSIIO_CDB_ADDR_IOCDDR (0x2000)
182#define MPI2_SCSIIO_CDB_ADDR_IOCPLB (0x4000)
183#define MPI2_SCSIIO_CDB_ADDR_IOCPLBNTA (0x6000)

--- 298 unchanged lines hidden ---