xref: /freebsd/sys/dev/mps/mpi/mpi2_ra.h (revision d8a0fe102c0cfdfcd5b818f850eff09d8536c9bc)
1 /*-
2  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3  *
4  * Copyright (c) 2009-2015 LSI Corp.
5  * Copyright (c) 2013-2015 Avago Technologies
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  * 1. Redistributions of source code must retain the above copyright
12  *    notice, this list of conditions and the following disclaimer.
13  * 2. Redistributions in binary form must reproduce the above copyright
14  *    notice, this list of conditions and the following disclaimer in the
15  *    documentation and/or other materials provided with the distribution.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27  * SUCH DAMAGE.
28  *
29  * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD
30  *
31  * $FreeBSD$
32  */
33 
34 /*
35  *  Copyright (c) 2009-2015 LSI Corporation.
36  *  Copyright (c) 2013-2015 Avago Technologies
37  *
38  *
39  *           Name:  mpi2_ra.h
40  *          Title:  MPI RAID Accelerator messages and structures
41  *  Creation Date:  April 13, 2009
42  *
43  *  mpi2_ra.h Version:  02.00.00
44  *
45  *  Version History
46  *  ---------------
47  *
48  *  Date      Version   Description
49  *  --------  --------  ------------------------------------------------------
50  *  05-06-09  02.00.00  Initial version.
51  *  --------------------------------------------------------------------------
52  */
53 
54 #ifndef MPI2_RA_H
55 #define MPI2_RA_H
56 
57 /* generic structure for RAID Accelerator Control Block */
58 typedef struct _MPI2_RAID_ACCELERATOR_CONTROL_BLOCK
59 {
60     U32                 Reserved[8];                /* 0x00 */
61     U32                 RaidAcceleratorCDB[1];      /* 0x20 */
62 } MPI2_RAID_ACCELERATOR_CONTROL_BLOCK,
63   MPI2_POINTER PTR_MPI2_RAID_ACCELERATOR_CONTROL_BLOCK,
64   Mpi2RAIDAcceleratorControlBlock_t,
65   MPI2_POINTER pMpi2RAIDAcceleratorControlBlock_t;
66 
67 
68 /******************************************************************************
69 *
70 *        RAID Accelerator Messages
71 *
72 *******************************************************************************/
73 
74 /* RAID Accelerator Request Message */
75 typedef struct _MPI2_RAID_ACCELERATOR_REQUEST
76 {
77     U16                     Reserved0;                          /* 0x00 */
78     U8                      ChainOffset;                        /* 0x02 */
79     U8                      Function;                           /* 0x03 */
80     U16                     Reserved1;                          /* 0x04 */
81     U8                      Reserved2;                          /* 0x06 */
82     U8                      MsgFlags;                           /* 0x07 */
83     U8                      VP_ID;                              /* 0x08 */
84     U8                      VF_ID;                              /* 0x09 */
85     U16                     Reserved3;                          /* 0x0A */
86     U64                     RaidAcceleratorControlBlockAddress; /* 0x0C */
87     U8                      DmaEngineNumber;                    /* 0x14 */
88     U8                      Reserved4;                          /* 0x15 */
89     U16                     Reserved5;                          /* 0x16 */
90     U32                     Reserved6;                          /* 0x18 */
91     U32                     Reserved7;                          /* 0x1C */
92     U32                     Reserved8;                          /* 0x20 */
93 } MPI2_RAID_ACCELERATOR_REQUEST, MPI2_POINTER PTR_MPI2_RAID_ACCELERATOR_REQUEST,
94   Mpi2RAIDAcceleratorRequest_t, MPI2_POINTER pMpi2RAIDAcceleratorRequest_t;
95 
96 
97 /* RAID Accelerator Error Reply Message */
98 typedef struct _MPI2_RAID_ACCELERATOR_REPLY
99 {
100     U16                     Reserved0;                      /* 0x00 */
101     U8                      MsgLength;                      /* 0x02 */
102     U8                      Function;                       /* 0x03 */
103     U16                     Reserved1;                      /* 0x04 */
104     U8                      Reserved2;                      /* 0x06 */
105     U8                      MsgFlags;                       /* 0x07 */
106     U8                      VP_ID;                          /* 0x08 */
107     U8                      VF_ID;                          /* 0x09 */
108     U16                     Reserved3;                      /* 0x0A */
109     U16                     Reserved4;                      /* 0x0C */
110     U16                     IOCStatus;                      /* 0x0E */
111     U32                     IOCLogInfo;                     /* 0x10 */
112     U32                     ProductSpecificData[3];         /* 0x14 */
113 } MPI2_RAID_ACCELERATOR_REPLY, MPI2_POINTER PTR_MPI2_RAID_ACCELERATOR_REPLY,
114   Mpi2RAIDAcceleratorReply_t, MPI2_POINTER pMpi2RAIDAcceleratorReply_t;
115 
116 
117 #endif
118 
119 
120