kernel: Add D_MPSAFE to the ops of mfi(4), mrsas(4) and twa(4).
[dragonfly.git] / sys / dev / raid / mps / mpi / mpi2_ra.h
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: src/sys/dev/mps/mpi/mpi2_ra.h,v 1.2 2012/01/26 18:17:21 ken Exp $
29  */
30
31 /*
32  *  Copyright (c) 2011 LSI Corporation.
33  *
34  *
35  *           Name:  mpi2_ra.h
36  *          Title:  MPI RAID Accelerator messages and structures
37  *  Creation Date:  April 13, 2009
38  *
39  *  mpi2_ra.h Version:  02.00.00
40  *
41  *  Version History
42  *  ---------------
43  *
44  *  Date      Version   Description
45  *  --------  --------  ------------------------------------------------------
46  *  05-06-09  02.00.00  Initial version.
47  *  --------------------------------------------------------------------------
48  */
49
50 #ifndef MPI2_RA_H
51 #define MPI2_RA_H
52
53 /* generic structure for RAID Accelerator Control Block */
54 typedef struct _MPI2_RAID_ACCELERATOR_CONTROL_BLOCK
55 {
56     U32                 Reserved[8];                /* 0x00 */
57     U32                 RaidAcceleratorCDB[1];      /* 0x20 */
58 } MPI2_RAID_ACCELERATOR_CONTROL_BLOCK,
59   MPI2_POINTER PTR_MPI2_RAID_ACCELERATOR_CONTROL_BLOCK,
60   Mpi2RAIDAcceleratorControlBlock_t,
61   MPI2_POINTER pMpi2RAIDAcceleratorControlBlock_t;
62
63
64 /******************************************************************************
65 *
66 *        RAID Accelerator Messages
67 *
68 *******************************************************************************/
69
70 /* RAID Accelerator Request Message */
71 typedef struct _MPI2_RAID_ACCELERATOR_REQUEST
72 {
73     U16                     Reserved0;                          /* 0x00 */
74     U8                      ChainOffset;                        /* 0x02 */
75     U8                      Function;                           /* 0x03 */
76     U16                     Reserved1;                          /* 0x04 */
77     U8                      Reserved2;                          /* 0x06 */
78     U8                      MsgFlags;                           /* 0x07 */
79     U8                      VP_ID;                              /* 0x08 */
80     U8                      VF_ID;                              /* 0x09 */
81     U16                     Reserved3;                          /* 0x0A */
82     U64                     RaidAcceleratorControlBlockAddress; /* 0x0C */
83     U8                      DmaEngineNumber;                    /* 0x14 */
84     U8                      Reserved4;                          /* 0x15 */
85     U16                     Reserved5;                          /* 0x16 */
86     U32                     Reserved6;                          /* 0x18 */
87     U32                     Reserved7;                          /* 0x1C */
88     U32                     Reserved8;                          /* 0x20 */
89 } MPI2_RAID_ACCELERATOR_REQUEST, MPI2_POINTER PTR_MPI2_RAID_ACCELERATOR_REQUEST,
90   Mpi2RAIDAcceleratorRequest_t, MPI2_POINTER pMpi2RAIDAcceleratorRequest_t;
91
92
93 /* RAID Accelerator Error Reply Message */
94 typedef struct _MPI2_RAID_ACCELERATOR_REPLY
95 {
96     U16                     Reserved0;                      /* 0x00 */
97     U8                      MsgLength;                      /* 0x02 */
98     U8                      Function;                       /* 0x03 */
99     U16                     Reserved1;                      /* 0x04 */
100     U8                      Reserved2;                      /* 0x06 */
101     U8                      MsgFlags;                       /* 0x07 */
102     U8                      VP_ID;                          /* 0x08 */
103     U8                      VF_ID;                          /* 0x09 */
104     U16                     Reserved3;                      /* 0x0A */
105     U16                     Reserved4;                      /* 0x0C */
106     U16                     IOCStatus;                      /* 0x0E */
107     U32                     IOCLogInfo;                     /* 0x10 */
108     U32                     ProductSpecificData[3];         /* 0x14 */
109 } MPI2_RAID_ACCELERATOR_REPLY, MPI2_POINTER PTR_MPI2_RAID_ACCELERATOR_REPLY,
110   Mpi2RAIDAcceleratorReply_t, MPI2_POINTER pMpi2RAIDAcceleratorReply_t;
111
112
113 #endif