Deleted Added
full compact
mpi.h (139749) mpi.h (147883)
1/* $FreeBSD: head/sys/dev/mpt/mpilib/mpi.h 139749 2005-01-06 01:43:34Z imp $ */
1/* $FreeBSD: head/sys/dev/mpt/mpilib/mpi.h 147883 2005-07-10 15:05:39Z scottl $ */
2/*-
2/*-
3 * Copyright (c) 2000, 2001 by LSI Logic Corporation
4 *
3 * Copyright (c) 2000-2005, LSI Logic Corporation and its contributors.
4 * All rights reserved.
5 *
5 * Redistribution and use in source and binary forms, with or without
6 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
7 * modification, are permitted provided that the following conditions are
8 * met:
8 * 1. Redistributions of source code must retain the above copyright
9 * 1. Redistributions of source code must retain the above copyright
9 * notice immediately at the beginning of the file, without modification,
10 * this list of conditions, and the following disclaimer.
11 * 2. The name of the author may not be used to endorse or promote products
12 * derived from this software without specific prior written permission.
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
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
12 * substantially similar to the "NO WARRANTY" disclaimer below
13 * ("Disclaimer") and any redistribution must be conditioned upon including
14 * a substantially similar Disclaimer requirement for further binary
15 * redistribution.
16 * 3. Neither the name of the LSI Logic Corporation nor the names of its
17 * contributors may be used to endorse or promote products derived from
18 * this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
18 * 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.
23 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
24 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF THE COPYRIGHT
30 * OWNER OR CONTRIBUTOR IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
26 *
27 * Name: MPI.H
28 * Title: MPI Message independent structures and definitions
29 * Creation Date: July 27, 2000
30 *
31 *
32 *
33 * Name: MPI.H
34 * Title: MPI Message independent structures and definitions
35 * Creation Date: July 27, 2000
36 *
31 * MPI.H Version: 01.02.09
37 * MPI.H Version: 01.02.11
32 *
33 * Version History
34 * ---------------
35 *
36 * Date Version Description
37 * -------- -------- ------------------------------------------------------
38 * 05-08-00 00.10.01 Original release for 0.10 spec dated 4/26/2000.
39 * 05-24-00 00.10.02 Added MPI_IOCSTATUS_SCSI_RESIDUAL_MISMATCH definition.

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

68 * 11-01-01 01.02.03 Changed name to MPI_FUNCTION_SCSI_ENCLOSURE_PROCESSOR.
69 * 03-14-02 01.02.04 Added MPI_HEADER_VERSION_ defines.
70 * 05-31-02 01.02.05 Bumped MPI_HEADER_VERSION_UNIT.
71 * 07-12-02 01.02.06 Added define for MPI_FUNCTION_MAILBOX.
72 * 09-16-02 01.02.07 Bumped value for MPI_HEADER_VERSION_UNIT.
73 * 11-15-02 01.02.08 Added define MPI_IOCSTATUS_TARGET_INVALID_IO_INDEX and
74 * obsoleted define MPI_IOCSTATUS_TARGET_INVALID_IOCINDEX.
75 * 04-01-03 01.02.09 New IOCStatus code: MPI_IOCSTATUS_FC_EXCHANGE_CANCELED
38 *
39 * Version History
40 * ---------------
41 *
42 * Date Version Description
43 * -------- -------- ------------------------------------------------------
44 * 05-08-00 00.10.01 Original release for 0.10 spec dated 4/26/2000.
45 * 05-24-00 00.10.02 Added MPI_IOCSTATUS_SCSI_RESIDUAL_MISMATCH definition.

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

74 * 11-01-01 01.02.03 Changed name to MPI_FUNCTION_SCSI_ENCLOSURE_PROCESSOR.
75 * 03-14-02 01.02.04 Added MPI_HEADER_VERSION_ defines.
76 * 05-31-02 01.02.05 Bumped MPI_HEADER_VERSION_UNIT.
77 * 07-12-02 01.02.06 Added define for MPI_FUNCTION_MAILBOX.
78 * 09-16-02 01.02.07 Bumped value for MPI_HEADER_VERSION_UNIT.
79 * 11-15-02 01.02.08 Added define MPI_IOCSTATUS_TARGET_INVALID_IO_INDEX and
80 * obsoleted define MPI_IOCSTATUS_TARGET_INVALID_IOCINDEX.
81 * 04-01-03 01.02.09 New IOCStatus code: MPI_IOCSTATUS_FC_EXCHANGE_CANCELED
82 * 06-26-03 01.02.10 Bumped MPI_HEADER_VERSION_UNIT value.
83 * 01-16-04 01.02.11 Added define for MPI_IOCLOGINFO_TYPE_SHIFT.
76 * --------------------------------------------------------------------------
77 */
78
79#ifndef MPI_H
80#define MPI_H
81
82
83/*****************************************************************************

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

96 MPI_VERSION_MINOR)
97
98#define MPI_VERSION_01_00 (0x0100)
99#define MPI_VERSION_01_01 (0x0101)
100#define MPI_VERSION_01_02 (0x0102)
101/* Note: The major versions of 0xe0 through 0xff are reserved */
102
103/* versioning for this MPI header set */
84 * --------------------------------------------------------------------------
85 */
86
87#ifndef MPI_H
88#define MPI_H
89
90
91/*****************************************************************************

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

104 MPI_VERSION_MINOR)
105
106#define MPI_VERSION_01_00 (0x0100)
107#define MPI_VERSION_01_01 (0x0101)
108#define MPI_VERSION_01_02 (0x0102)
109/* Note: The major versions of 0xe0 through 0xff are reserved */
110
111/* versioning for this MPI header set */
104#define MPI_HEADER_VERSION_UNIT (0x09)
112#define MPI_HEADER_VERSION_UNIT (0x0D)
105#define MPI_HEADER_VERSION_DEV (0x00)
106#define MPI_HEADER_VERSION_UNIT_MASK (0xFF00)
107#define MPI_HEADER_VERSION_UNIT_SHIFT (8)
108#define MPI_HEADER_VERSION_DEV_MASK (0x00FF)
109#define MPI_HEADER_VERSION_DEV_SHIFT (0)
110#define MPI_HEADER_VERSION ((MPI_HEADER_VERSION_UNIT << 8) | MPI_HEADER_VERSION_DEV)
111
112/*****************************************************************************

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

313
314typedef struct _SGE_SIMPLE_UNION
315{
316 U32 FlagsLength;
317 union
318 {
319 U32 Address32;
320 U64 Address64;
113#define MPI_HEADER_VERSION_DEV (0x00)
114#define MPI_HEADER_VERSION_UNIT_MASK (0xFF00)
115#define MPI_HEADER_VERSION_UNIT_SHIFT (8)
116#define MPI_HEADER_VERSION_DEV_MASK (0x00FF)
117#define MPI_HEADER_VERSION_DEV_SHIFT (0)
118#define MPI_HEADER_VERSION ((MPI_HEADER_VERSION_UNIT << 8) | MPI_HEADER_VERSION_DEV)
119
120/*****************************************************************************

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

321
322typedef struct _SGE_SIMPLE_UNION
323{
324 U32 FlagsLength;
325 union
326 {
327 U32 Address32;
328 U64 Address64;
321 } _u;
329 }u;
322} SGESimpleUnion_t, MPI_POINTER pSGESimpleUnion_t,
323 SGE_SIMPLE_UNION, MPI_POINTER PTR_SGE_SIMPLE_UNION;
324
325/****************************************************************************/
326/* Chain element structures */
327/****************************************************************************/
328
329typedef struct _SGE_CHAIN32

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

348{
349 U16 Length;
350 U8 NextChainOffset;
351 U8 Flags;
352 union
353 {
354 U32 Address32;
355 U64 Address64;
330} SGESimpleUnion_t, MPI_POINTER pSGESimpleUnion_t,
331 SGE_SIMPLE_UNION, MPI_POINTER PTR_SGE_SIMPLE_UNION;
332
333/****************************************************************************/
334/* Chain element structures */
335/****************************************************************************/
336
337typedef struct _SGE_CHAIN32

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

356{
357 U16 Length;
358 U8 NextChainOffset;
359 U8 Flags;
360 union
361 {
362 U32 Address32;
363 U64 Address64;
356 } _u;
364 }u;
357} SGE_CHAIN_UNION, MPI_POINTER PTR_SGE_CHAIN_UNION,
358 SGEChainUnion_t, MPI_POINTER pSGEChainUnion_t;
359
360/****************************************************************************/
361/* Transaction Context element */
362/****************************************************************************/
363
364typedef struct _SGE_TRANSACTION32

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

412 U8 DetailsLength;
413 U8 Flags;
414 union
415 {
416 U32 TransactionContext32[1];
417 U32 TransactionContext64[2];
418 U32 TransactionContext96[3];
419 U32 TransactionContext128[4];
365} SGE_CHAIN_UNION, MPI_POINTER PTR_SGE_CHAIN_UNION,
366 SGEChainUnion_t, MPI_POINTER pSGEChainUnion_t;
367
368/****************************************************************************/
369/* Transaction Context element */
370/****************************************************************************/
371
372typedef struct _SGE_TRANSACTION32

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

420 U8 DetailsLength;
421 U8 Flags;
422 union
423 {
424 U32 TransactionContext32[1];
425 U32 TransactionContext64[2];
426 U32 TransactionContext96[3];
427 U32 TransactionContext128[4];
420 } _u;
428 }u;
421 U32 TransactionDetails[1];
422} SGE_TRANSACTION_UNION, MPI_POINTER PTR_SGE_TRANSACTION_UNION,
423 SGETransactionUnion_t, MPI_POINTER pSGETransactionUnion_t;
424
425
426/****************************************************************************/
427/* SGE IO types union for IO SGL's */
428/****************************************************************************/
429
430typedef struct _SGE_IO_UNION
431{
432 union
433 {
434 SGE_SIMPLE_UNION Simple;
435 SGE_CHAIN_UNION Chain;
429 U32 TransactionDetails[1];
430} SGE_TRANSACTION_UNION, MPI_POINTER PTR_SGE_TRANSACTION_UNION,
431 SGETransactionUnion_t, MPI_POINTER pSGETransactionUnion_t;
432
433
434/****************************************************************************/
435/* SGE IO types union for IO SGL's */
436/****************************************************************************/
437
438typedef struct _SGE_IO_UNION
439{
440 union
441 {
442 SGE_SIMPLE_UNION Simple;
443 SGE_CHAIN_UNION Chain;
436 } _u;
444 } u;
437} SGE_IO_UNION, MPI_POINTER PTR_SGE_IO_UNION,
438 SGEIOUnion_t, MPI_POINTER pSGEIOUnion_t;
439
440/****************************************************************************/
441/* SGE union for SGL's with Simple and Transaction elements */
442/****************************************************************************/
443
444typedef struct _SGE_TRANS_SIMPLE_UNION
445{
446 union
447 {
448 SGE_SIMPLE_UNION Simple;
449 SGE_TRANSACTION_UNION Transaction;
445} SGE_IO_UNION, MPI_POINTER PTR_SGE_IO_UNION,
446 SGEIOUnion_t, MPI_POINTER pSGEIOUnion_t;
447
448/****************************************************************************/
449/* SGE union for SGL's with Simple and Transaction elements */
450/****************************************************************************/
451
452typedef struct _SGE_TRANS_SIMPLE_UNION
453{
454 union
455 {
456 SGE_SIMPLE_UNION Simple;
457 SGE_TRANSACTION_UNION Transaction;
450 } _u;
458 } u;
451} SGE_TRANS_SIMPLE_UNION, MPI_POINTER PTR_SGE_TRANS_SIMPLE_UNION,
452 SGETransSimpleUnion_t, MPI_POINTER pSGETransSimpleUnion_t;
453
454/****************************************************************************/
455/* All SGE types union */
456/****************************************************************************/
457
458typedef struct _SGE_MPI_UNION
459{
460 union
461 {
462 SGE_SIMPLE_UNION Simple;
463 SGE_CHAIN_UNION Chain;
464 SGE_TRANSACTION_UNION Transaction;
459} SGE_TRANS_SIMPLE_UNION, MPI_POINTER PTR_SGE_TRANS_SIMPLE_UNION,
460 SGETransSimpleUnion_t, MPI_POINTER pSGETransSimpleUnion_t;
461
462/****************************************************************************/
463/* All SGE types union */
464/****************************************************************************/
465
466typedef struct _SGE_MPI_UNION
467{
468 union
469 {
470 SGE_SIMPLE_UNION Simple;
471 SGE_CHAIN_UNION Chain;
472 SGE_TRANSACTION_UNION Transaction;
465 } _u;
473 } u;
466} SGE_MPI_UNION, MPI_POINTER PTR_SGE_MPI_UNION,
467 MPI_SGE_UNION_t, MPI_POINTER pMPI_SGE_UNION_t,
468 SGEAllUnion_t, MPI_POINTER pSGEAllUnion_t;
469
470
471/****************************************************************************/
472/* SGE field definition and masks */
473/****************************************************************************/

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

691#define MPI_IOCSTATUS_FLAG_LOG_INFO_AVAILABLE (0x8000)
692#define MPI_IOCSTATUS_MASK (0x7FFF)
693
694/****************************************************************************/
695/* LogInfo Types */
696/****************************************************************************/
697
698#define MPI_IOCLOGINFO_TYPE_MASK (0xF0000000)
474} SGE_MPI_UNION, MPI_POINTER PTR_SGE_MPI_UNION,
475 MPI_SGE_UNION_t, MPI_POINTER pMPI_SGE_UNION_t,
476 SGEAllUnion_t, MPI_POINTER pSGEAllUnion_t;
477
478
479/****************************************************************************/
480/* SGE field definition and masks */
481/****************************************************************************/

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

699#define MPI_IOCSTATUS_FLAG_LOG_INFO_AVAILABLE (0x8000)
700#define MPI_IOCSTATUS_MASK (0x7FFF)
701
702/****************************************************************************/
703/* LogInfo Types */
704/****************************************************************************/
705
706#define MPI_IOCLOGINFO_TYPE_MASK (0xF0000000)
707#define MPI_IOCLOGINFO_TYPE_SHIFT (28)
699#define MPI_IOCLOGINFO_TYPE_NONE (0x0)
700#define MPI_IOCLOGINFO_TYPE_SCSI (0x1)
701#define MPI_IOCLOGINFO_TYPE_FC (0x2)
702#define MPI_IOCLOGINFO_LOG_DATA_MASK (0x0FFFFFFF)
703
704
705#endif
708#define MPI_IOCLOGINFO_TYPE_NONE (0x0)
709#define MPI_IOCLOGINFO_TYPE_SCSI (0x1)
710#define MPI_IOCLOGINFO_TYPE_FC (0x2)
711#define MPI_IOCLOGINFO_LOG_DATA_MASK (0x0FFFFFFF)
712
713
714#endif