aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/fusion/lsi/mpi_tool.h
blob: 536d197c4142f3239e440d4c8206486915f010f2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
/*
 *  Copyright (c) 2001-2003 LSI Logic Corporation.
 *
 *
 *           Name:  mpi_tool.h
 *          Title:  MPI Toolbox structures and definitions
 *  Creation Date:  July 30, 2001
 *
 *    mpi_tool.h Version:  01.05.xx
 *
 *  Version History
 *  ---------------
 *
 *  Date      Version   Description
 *  --------  --------  ------------------------------------------------------
 *  08-08-01  01.02.01  Original release.
 *  08-29-01  01.02.02  Added DIAG_DATA_UPLOAD_HEADER and related defines.
 *  --------------------------------------------------------------------------
 */

#ifndef MPI_TOOL_H
#define MPI_TOOL_H

#define MPI_TOOLBOX_CLEAN_TOOL                      (0x00)
#define MPI_TOOLBOX_MEMORY_MOVE_TOOL                (0x01)
#define MPI_TOOLBOX_DIAG_DATA_UPLOAD_TOOL           (0x02)
#define MPI_TOOLBOX_ISTWI_READ_WRITE_TOOL           (0x03)
#define MPI_TOOLBOX_FC_MANAGEMENT_TOOL              (0x04)


/****************************************************************************/
/* Toolbox reply                                                            */
/****************************************************************************/

typedef struct _MSG_TOOLBOX_REPLY
{
    U8                      Tool;                       /* 00h */
    U8                      Reserved;                   /* 01h */
    U8                      MsgLength;                  /* 02h */
    U8                      Function;                   /* 03h */
    U16                     Reserved1;                  /* 04h */
    U8                      Reserved2;                  /* 06h */
    U8                      MsgFlags;                   /* 07h */
    U32                     MsgContext;                 /* 08h */
    U16                     Reserved3;                  /* 0Ch */
    U16                     IOCStatus;                  /* 0Eh */
    U32                     IOCLogInfo;                 /* 10h */
} MSG_TOOLBOX_REPLY, MPI_POINTER PTR_MSG_TOOLBOX_REPLY,
  ToolboxReply_t, MPI_POINTER pToolboxReply_t;


/****************************************************************************/
/* Toolbox Clean Tool request                                               */
/****************************************************************************/

typedef struct _MSG_TOOLBOX_CLEAN_REQUEST
{
    U8                      Tool;                       /* 00h */
    U8                      Reserved;                   /* 01h */
    U8                      ChainOffset;                /* 02h */
    U8                      Function;                   /* 03h */
    U16                     Reserved1;                  /* 04h */
    U8                      Reserved2;                  /* 06h */
    U8                      MsgFlags;                   /* 07h */
    U32                     MsgContext;                 /* 08h */
    U32                     Flags;                      /* 0Ch */
} MSG_TOOLBOX_CLEAN_REQUEST, MPI_POINTER PTR_MSG_TOOLBOX_CLEAN_REQUEST,
  ToolboxCleanRequest_t, MPI_POINTER pToolboxCleanRequest_t;

#define MPI_TOOLBOX_CLEAN_NVSRAM                    (0x00000001)
#define MPI_TOOLBOX_CLEAN_SEEPROM                   (0x00000002)
#define MPI_TOOLBOX_CLEAN_FLASH                     (0x00000004)
#define MPI_TOOLBOX_CLEAN_BOOTLOADER                (0x04000000)
#define MPI_TOOLBOX_CLEAN_FW_BACKUP                 (0x08000000)
#define MPI_TOOLBOX_CLEAN_FW_CURRENT                (0x10000000)
#define MPI_TOOLBOX_CLEAN_OTHER_PERSIST_PAGES       (0x20000000)
#define MPI_TOOLBOX_CLEAN_PERSIST_MANUFACT_PAGES    (0x40000000)
#define MPI_TOOLBOX_CLEAN_BOOT_SERVICES             (0x80000000)


/****************************************************************************/
/* Toolbox Memory Move request                                              */
/****************************************************************************/

typedef struct _MSG_TOOLBOX_MEM_MOVE_REQUEST
{
    U8                      Tool;                       /* 00h */
    U8                      Reserved;                   /* 01h */
    U8                      ChainOffset;                /* 02h */
    U8                      Function;                   /* 03h */
    U16                     Reserved1;                  /* 04h */
    U8                      Reserved2;                  /* 06h */
    U8                      MsgFlags;                   /* 07h */
    U32                     MsgContext;                 /* 08h */
    SGE_SIMPLE_UNION        SGL;                        /* 0Ch */
} MSG_TOOLBOX_MEM_MOVE_REQUEST, MPI_POINTER PTR_MSG_TOOLBOX_MEM_MOVE_REQUEST,
  ToolboxMemMoveRequest_t, MPI_POINTER pToolboxMemMoveRequest_t;


/****************************************************************************/
/* Toolbox Diagnostic Data Upload request                                   */
/****************************************************************************/

typedef struct _MSG_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST
{
    U8                      Tool;                       /* 00h */
    U8                      Reserved;                   /* 01h */
    U8                      ChainOffset;                /* 02h */
    U8                      Function;                   /* 03h */
    U16                     Reserved1;                  /* 04h */
    U8                      Reserved2;                  /* 06h */
    U8                      MsgFlags;                   /* 07h */
    U32                     MsgContext;                 /* 08h */
    U32                     Flags;                      /* 0Ch */
    U32                     Reserved3;                  /* 10h */
    SGE_SIMPLE_UNION        SGL;                        /* 14h */
} MSG_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST, MPI_POINTER PTR_MSG_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST,
  ToolboxDiagDataUploadRequest_t, MPI_POINTER pToolboxDiagDataUploadRequest_t;

typedef struct _DIAG_DATA_UPLOAD_HEADER
{
    U32                     DiagDataLength;             /* 00h */
    U8                      FormatCode;                 /* 04h */
    U8                      Reserved;                   /* 05h */
    U16                     Reserved1;                  /* 06h */
} DIAG_DATA_UPLOAD_HEADER, MPI_POINTER PTR_DIAG_DATA_UPLOAD_HEADER,
  DiagDataUploadHeader_t, MPI_POINTER pDiagDataUploadHeader_t;

#define MPI_TB_DIAG_FORMAT_SCSI_PRINTF_1            (0x01)
#define MPI_TB_DIAG_FORMAT_SCSI_2                   (0x02)
#define MPI_TB_DIAG_FORMAT_SCSI_3                   (0x03)
#define MPI_TB_DIAG_FORMAT_FC_TRACE_1               (0x04)


/****************************************************************************/
/* Toolbox ISTWI Read Write request                                         */
/****************************************************************************/

typedef struct _MSG_TOOLBOX_ISTWI_READ_WRITE_REQUEST
{
    U8                      Tool;                       /* 00h */
    U8                      Reserved;                   /* 01h */
    U8                      ChainOffset;                /* 02h */
    U8                      Function;                   /* 03h */
    U16                     Reserved1;                  /* 04h */
    U8                      Reserved2;                  /* 06h */
    U8                      MsgFlags;                   /* 07h */
    U32                     MsgContext;                 /* 08h */
    U8                      Flags;                      /* 0Ch */
    U8                      BusNum;                     /* 0Dh */
    U16                     Reserved3;                  /* 0Eh */
    U8                      NumAddressBytes;            /* 10h */
    U8                      Reserved4;                  /* 11h */
    U16                     DataLength;                 /* 12h */
    U8                      DeviceAddr;                 /* 14h */
    U8                      Addr1;                      /* 15h */
    U8                      Addr2;                      /* 16h */
    U8                      Addr3;                      /* 17h */
    U32                     Reserved5;                  /* 18h */
    SGE_SIMPLE_UNION        SGL;                        /* 1Ch */
} MSG_TOOLBOX_ISTWI_READ_WRITE_REQUEST, MPI_POINTER PTR_MSG_TOOLBOX_ISTWI_READ_WRITE_REQUEST,
  ToolboxIstwiReadWriteRequest_t, MPI_POINTER pToolboxIstwiReadWriteRequest_t;

#define MPI_TB_ISTWI_FLAGS_WRITE                    (0x00)
#define MPI_TB_ISTWI_FLAGS_READ                     (0x01)


/****************************************************************************/
/* Toolbox FC Management request                                            */
/****************************************************************************/

/* ActionInfo for Bus and TargetId */
typedef struct _MPI_TB_FC_MANAGE_BUS_TID_AI
{
    U16                     Reserved;                   /* 00h */
    U8                      Bus;                        /* 02h */
    U8                      TargetId;                   /* 03h */
} MPI_TB_FC_MANAGE_BUS_TID_AI, MPI_POINTER PTR_MPI_TB_FC_MANAGE_BUS_TID_AI,
  MpiTbFcManageBusTidAi_t, MPI_POINTER pMpiTbFcManageBusTidAi_t;

/* ActionInfo for port identifier */
typedef struct _MPI_TB_FC_MANAGE_PID_AI
{
    U32                     PortIdentifier;             /* 00h */
} MPI_TB_FC_MANAGE_PID_AI, MPI_POINTER PTR_MPI_TB_FC_MANAGE_PID_AI,
  MpiTbFcManagePidAi_t, MPI_POINTER pMpiTbFcManagePidAi_t;

/* union of ActionInfo */
typedef union _MPI_TB_FC_MANAGE_AI_UNION
{
    MPI_TB_FC_MANAGE_BUS_TID_AI     BusTid;
    MPI_TB_FC_MANAGE_PID_AI         Port;
} MPI_TB_FC_MANAGE_AI_UNION, MPI_POINTER PTR_MPI_TB_FC_MANAGE_AI_UNION,
  MpiTbFcManageAiUnion_t, MPI_POINTER pMpiTbFcManageAiUnion_t;

typedef struct _MSG_TOOLBOX_FC_MANAGE_REQUEST
{
    U8                          Tool;                   /* 00h */
    U8                          Reserved;               /* 01h */
    U8                          ChainOffset;            /* 02h */
    U8                          Function;               /* 03h */
    U16                         Reserved1;              /* 04h */
    U8                          Reserved2;              /* 06h */
    U8                          MsgFlags;               /* 07h */
    U32                         MsgContext;             /* 08h */
    U8                          Action;                 /* 0Ch */
    U8                          Reserved3;              /* 0Dh */
    U16                         Reserved4;              /* 0Eh */
    MPI_TB_FC_MANAGE_AI_UNION   ActionInfo;             /* 10h */
} MSG_TOOLBOX_FC_MANAGE_REQUEST, MPI_POINTER PTR_MSG_TOOLBOX_FC_MANAGE_REQUEST,
  ToolboxFcManageRequest_t, MPI_POINTER pToolboxFcManageRequest_t;

/* defines for the Action field */
#define MPI_TB_FC_MANAGE_ACTION_DISC_ALL            (0x00)
#define MPI_TB_FC_MANAGE_ACTION_DISC_PID            (0x01)
#define MPI_TB_FC_MANAGE_ACTION_DISC_BUS_TID        (0x02)


/****************************************************************************/
/* Diagnostic Buffer Post request                                           */
/****************************************************************************/

typedef struct _MSG_DIAG_BUFFER_POST_REQUEST
{
    U8                      TraceLevel;                 /* 00h */
    U8                      BufferType;                 /* 01h */
    U8                      ChainOffset;                /* 02h */
    U8                      Function;                   /* 03h */
    U16                     Reserved1;                  /* 04h */
    U8                      Reserved2;                  /* 06h */
    U8                      MsgFlags;                   /* 07h */
    U32                     MsgContext;                 /* 08h */
    U32                     ExtendedType;               /* 0Ch */
    U32                     BufferLength;               /* 10h */
    U32                     ProductSpecific[4];         /* 14h */
    U32                     Reserved3;                  /* 18h */
    SGE_SIMPLE_UNION        SGL;                        /* 28h */
} MSG_DIAG_BUFFER_POST_REQUEST, MPI_POINTER PTR_MSG_DIAG_BUFFER_POST_REQUEST,
  DiagBufferPostRequest_t, MPI_POINTER pDiagBufferPostRequest_t;

#define MPI_DIAG_BUF_TYPE_TRACE                     (0x00)
#define MPI_DIAG_BUF_TYPE_SNAPSHOT                  (0x01)
#define MPI_DIAG_BUF_TYPE_EXTENDED                  (0x02)

#define MPI_DIAG_EXTENDED_QTAG                      (0x00000001)


/* Diagnostic Buffer Post reply */
typedef struct _MSG_DIAG_BUFFER_POST_REPLY
{
    U8                      Reserved1;                  /* 00h */
    U8                      BufferType;                 /* 01h */
    U8                      MsgLength;                  /* 02h */
    U8                      Function;                   /* 03h */
    U16                     Reserved2;                  /* 04h */
    U8                      Reserved3;                  /* 06h */
    U8                      MsgFlags;                   /* 07h */
    U32                     MsgContext;                 /* 08h */
    U16                     Reserved4;                  /* 0Ch */
    U16                     IOCStatus;                  /* 0Eh */
    U32                     IOCLogInfo;                 /* 10h */
    U32                     TransferLength;             /* 14h */
} MSG_DIAG_BUFFER_POST_REPLY, MPI_POINTER PTR_MSG_DIAG_BUFFER_POST_REPLY,
  DiagBufferPostReply_t, MPI_POINTER pDiagBufferPostReply_t;


/****************************************************************************/
/* Diagnostic Release request                                               */
/****************************************************************************/

typedef struct _MSG_DIAG_RELEASE_REQUEST
{
    U8                      Reserved1;                  /* 00h */
    U8                      BufferType;                 /* 01h */
    U8                      ChainOffset;                /* 02h */
    U8                      Function;                   /* 03h */
    U16                     Reserved2;                  /* 04h */
    U8                      Reserved3;                  /* 06h */
    U8                      MsgFlags;                   /* 07h */
    U32                     MsgContext;                 /* 08h */
} MSG_DIAG_RELEASE_REQUEST, MPI_POINTER PTR_MSG_DIAG_RELEASE_REQUEST,
  DiagReleaseRequest_t, MPI_POINTER pDiagReleaseRequest_t;


/* Diagnostic Release reply */
typedef struct _MSG_DIAG_RELEASE_REPLY
{
    U8                      Reserved1;                  /* 00h */
    U8                      BufferType;                 /* 01h */
    U8                      MsgLength;                  /* 02h */
    U8                      Function;                   /* 03h */
    U16                     Reserved2;                  /* 04h */
    U8                      Reserved3;                  /* 06h */
    U8                      MsgFlags;                   /* 07h */
    U32                     MsgContext;                 /* 08h */
    U16                     Reserved4;                  /* 0Ch */
    U16                     IOCStatus;                  /* 0Eh */
    U32                     IOCLogInfo;                 /* 10h */
} MSG_DIAG_RELEASE_REPLY, MPI_POINTER PTR_MSG_DIAG_RELEASE_REPLY,
  DiagReleaseReply_t, MPI_POINTER pDiagReleaseReply_t;


#endif