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