19b631363SMatt Jacob /* $FreeBSD$ */ 2098ca2bdSWarner Losh /*- 3d3ecac66SMatt Jacob * Copyright (c) 2000, 2001 by LSI Logic Corporation 4d3ecac66SMatt Jacob * 5d3ecac66SMatt Jacob * Redistribution and use in source and binary forms, with or without 6d3ecac66SMatt Jacob * modification, are permitted provided that the following conditions 7d3ecac66SMatt Jacob * are met: 8d3ecac66SMatt Jacob * 1. Redistributions of source code must retain the above copyright 9d3ecac66SMatt Jacob * notice immediately at the beginning of the file, without modification, 10d3ecac66SMatt Jacob * this list of conditions, and the following disclaimer. 11d3ecac66SMatt Jacob * 2. The name of the author may not be used to endorse or promote products 12d3ecac66SMatt Jacob * derived from this software without specific prior written permission. 13d3ecac66SMatt Jacob * 14d3ecac66SMatt Jacob * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15d3ecac66SMatt Jacob * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16d3ecac66SMatt Jacob * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17d3ecac66SMatt Jacob * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR 18d3ecac66SMatt Jacob * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19d3ecac66SMatt Jacob * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20d3ecac66SMatt Jacob * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21d3ecac66SMatt Jacob * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22d3ecac66SMatt Jacob * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23d3ecac66SMatt Jacob * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24d3ecac66SMatt Jacob * SUCH DAMAGE. 259b631363SMatt Jacob * 269b631363SMatt Jacob * 279b631363SMatt Jacob * Name: MPI_RAID.H 289b631363SMatt Jacob * Title: MPI RAID message and structures 299b631363SMatt Jacob * Creation Date: February 27, 2001 309b631363SMatt Jacob * 317fed69eeSMatt Jacob * MPI_RAID.H Version: 01.02.09 329b631363SMatt Jacob * 339b631363SMatt Jacob * Version History 349b631363SMatt Jacob * --------------- 359b631363SMatt Jacob * 369b631363SMatt Jacob * Date Version Description 379b631363SMatt Jacob * -------- -------- ------------------------------------------------------ 389b631363SMatt Jacob * 02-27-01 01.01.01 Original release for this file. 399b631363SMatt Jacob * 03-27-01 01.01.02 Added structure offset comments. 409b631363SMatt Jacob * 08-08-01 01.02.01 Original release for v1.2 work. 419b631363SMatt Jacob * 09-28-01 01.02.02 Major rework for MPI v1.2 Integrated RAID changes. 429b631363SMatt Jacob * 10-04-01 01.02.03 Added ActionData defines for 439b631363SMatt Jacob * MPI_RAID_ACTION_DELETE_VOLUME action. 449b631363SMatt Jacob * 11-01-01 01.02.04 Added define for MPI_RAID_ACTION_ADATA_DO_NOT_SYNC. 457fed69eeSMatt Jacob * 03-14-02 01.02.05 Added define for MPI_RAID_ACTION_ADATA_LOW_LEVEL_INIT. 467fed69eeSMatt Jacob * 05-07-02 01.02.06 Added define for MPI_RAID_ACTION_ACTIVATE_VOLUME, 477fed69eeSMatt Jacob * MPI_RAID_ACTION_INACTIVATE_VOLUME, and 487fed69eeSMatt Jacob * MPI_RAID_ACTION_ADATA_INACTIVATE_ALL. 497fed69eeSMatt Jacob * 07-12-02 01.02.07 Added structures for Mailbox request and reply. 507fed69eeSMatt Jacob * 11-15-02 01.02.08 Added missing MsgContext field to MSG_MAILBOX_REQUEST. 517fed69eeSMatt Jacob * 04-01-03 01.02.09 New action data option flag for 527fed69eeSMatt Jacob * MPI_RAID_ACTION_DELETE_VOLUME. 539b631363SMatt Jacob * -------------------------------------------------------------------------- 549b631363SMatt Jacob */ 559b631363SMatt Jacob 569b631363SMatt Jacob #ifndef MPI_RAID_H 579b631363SMatt Jacob #define MPI_RAID_H 589b631363SMatt Jacob 599b631363SMatt Jacob 609b631363SMatt Jacob /****************************************************************************** 619b631363SMatt Jacob * 629b631363SMatt Jacob * R A I D M e s s a g e s 639b631363SMatt Jacob * 649b631363SMatt Jacob *******************************************************************************/ 659b631363SMatt Jacob 669b631363SMatt Jacob 679b631363SMatt Jacob /****************************************************************************/ 689b631363SMatt Jacob /* RAID Volume Request */ 699b631363SMatt Jacob /****************************************************************************/ 709b631363SMatt Jacob 719b631363SMatt Jacob typedef struct _MSG_RAID_ACTION 729b631363SMatt Jacob { 739b631363SMatt Jacob U8 Action; /* 00h */ 749b631363SMatt Jacob U8 Reserved1; /* 01h */ 759b631363SMatt Jacob U8 ChainOffset; /* 02h */ 769b631363SMatt Jacob U8 Function; /* 03h */ 779b631363SMatt Jacob U8 VolumeID; /* 04h */ 789b631363SMatt Jacob U8 VolumeBus; /* 05h */ 799b631363SMatt Jacob U8 PhysDiskNum; /* 06h */ 809b631363SMatt Jacob U8 MsgFlags; /* 07h */ 819b631363SMatt Jacob U32 MsgContext; /* 08h */ 829b631363SMatt Jacob U32 Reserved2; /* 0Ch */ 839b631363SMatt Jacob U32 ActionDataWord; /* 10h */ 849b631363SMatt Jacob SGE_SIMPLE_UNION ActionDataSGE; /* 14h */ 859b631363SMatt Jacob } MSG_RAID_ACTION_REQUEST, MPI_POINTER PTR_MSG_RAID_ACTION_REQUEST, 869b631363SMatt Jacob MpiRaidActionRequest_t , MPI_POINTER pMpiRaidActionRequest_t; 879b631363SMatt Jacob 889b631363SMatt Jacob 899b631363SMatt Jacob /* RAID Action request Action values */ 909b631363SMatt Jacob 919b631363SMatt Jacob #define MPI_RAID_ACTION_STATUS (0x00) 929b631363SMatt Jacob #define MPI_RAID_ACTION_INDICATOR_STRUCT (0x01) 939b631363SMatt Jacob #define MPI_RAID_ACTION_CREATE_VOLUME (0x02) 949b631363SMatt Jacob #define MPI_RAID_ACTION_DELETE_VOLUME (0x03) 959b631363SMatt Jacob #define MPI_RAID_ACTION_DISABLE_VOLUME (0x04) 969b631363SMatt Jacob #define MPI_RAID_ACTION_ENABLE_VOLUME (0x05) 979b631363SMatt Jacob #define MPI_RAID_ACTION_QUIESCE_PHYS_IO (0x06) 989b631363SMatt Jacob #define MPI_RAID_ACTION_ENABLE_PHYS_IO (0x07) 999b631363SMatt Jacob #define MPI_RAID_ACTION_CHANGE_VOLUME_SETTINGS (0x08) 1009b631363SMatt Jacob #define MPI_RAID_ACTION_PHYSDISK_OFFLINE (0x0A) 1019b631363SMatt Jacob #define MPI_RAID_ACTION_PHYSDISK_ONLINE (0x0B) 1029b631363SMatt Jacob #define MPI_RAID_ACTION_CHANGE_PHYSDISK_SETTINGS (0x0C) 1039b631363SMatt Jacob #define MPI_RAID_ACTION_CREATE_PHYSDISK (0x0D) 1049b631363SMatt Jacob #define MPI_RAID_ACTION_DELETE_PHYSDISK (0x0E) 1059b631363SMatt Jacob #define MPI_RAID_ACTION_FAIL_PHYSDISK (0x0F) 1069b631363SMatt Jacob #define MPI_RAID_ACTION_REPLACE_PHYSDISK (0x10) 1077fed69eeSMatt Jacob #define MPI_RAID_ACTION_ACTIVATE_VOLUME (0x11) 1087fed69eeSMatt Jacob #define MPI_RAID_ACTION_INACTIVATE_VOLUME (0x12) 1099b631363SMatt Jacob 1109b631363SMatt Jacob /* ActionDataWord defines for use with MPI_RAID_ACTION_CREATE_VOLUME action */ 1119b631363SMatt Jacob #define MPI_RAID_ACTION_ADATA_DO_NOT_SYNC (0x00000001) 1127fed69eeSMatt Jacob #define MPI_RAID_ACTION_ADATA_LOW_LEVEL_INIT (0x00000002) 1139b631363SMatt Jacob 1149b631363SMatt Jacob /* ActionDataWord defines for use with MPI_RAID_ACTION_DELETE_VOLUME action */ 1159b631363SMatt Jacob #define MPI_RAID_ACTION_ADATA_KEEP_PHYS_DISKS (0x00000000) 1169b631363SMatt Jacob #define MPI_RAID_ACTION_ADATA_DEL_PHYS_DISKS (0x00000001) 1179b631363SMatt Jacob 1187fed69eeSMatt Jacob #define MPI_RAID_ACTION_ADATA_KEEP_LBA0 (0x00000000) 1197fed69eeSMatt Jacob #define MPI_RAID_ACTION_ADATA_ZERO_LBA0 (0x00000002) 1207fed69eeSMatt Jacob 1217fed69eeSMatt Jacob /* ActionDataWord defines for use with MPI_RAID_ACTION_ACTIVATE_VOLUME action */ 1227fed69eeSMatt Jacob #define MPI_RAID_ACTION_ADATA_INACTIVATE_ALL (0x00000001) 1237fed69eeSMatt Jacob 1249b631363SMatt Jacob 1259b631363SMatt Jacob /* RAID Action reply message */ 1269b631363SMatt Jacob 1279b631363SMatt Jacob typedef struct _MSG_RAID_ACTION_REPLY 1289b631363SMatt Jacob { 1299b631363SMatt Jacob U8 Action; /* 00h */ 1309b631363SMatt Jacob U8 Reserved; /* 01h */ 1319b631363SMatt Jacob U8 MsgLength; /* 02h */ 1329b631363SMatt Jacob U8 Function; /* 03h */ 1339b631363SMatt Jacob U8 VolumeID; /* 04h */ 1349b631363SMatt Jacob U8 VolumeBus; /* 05h */ 1359b631363SMatt Jacob U8 PhysDiskNum; /* 06h */ 1369b631363SMatt Jacob U8 MsgFlags; /* 07h */ 1379b631363SMatt Jacob U32 MsgContext; /* 08h */ 1389b631363SMatt Jacob U16 ActionStatus; /* 0Ch */ 1399b631363SMatt Jacob U16 IOCStatus; /* 0Eh */ 1409b631363SMatt Jacob U32 IOCLogInfo; /* 10h */ 1419b631363SMatt Jacob U32 VolumeStatus; /* 14h */ 1429b631363SMatt Jacob U32 ActionData; /* 18h */ 1439b631363SMatt Jacob } MSG_RAID_ACTION_REPLY, MPI_POINTER PTR_MSG_RAID_ACTION_REPLY, 1449b631363SMatt Jacob MpiRaidActionReply_t, MPI_POINTER pMpiRaidActionReply_t; 1459b631363SMatt Jacob 1469b631363SMatt Jacob 1479b631363SMatt Jacob /* RAID Volume reply ActionStatus values */ 1489b631363SMatt Jacob 1499b631363SMatt Jacob #define MPI_RAID_ACTION_ASTATUS_SUCCESS (0x0000) 1509b631363SMatt Jacob #define MPI_RAID_ACTION_ASTATUS_INVALID_ACTION (0x0001) 1519b631363SMatt Jacob #define MPI_RAID_ACTION_ASTATUS_FAILURE (0x0002) 1529b631363SMatt Jacob #define MPI_RAID_ACTION_ASTATUS_IN_PROGRESS (0x0003) 1539b631363SMatt Jacob 1549b631363SMatt Jacob 1559b631363SMatt Jacob /* RAID Volume reply RAID Volume Indicator structure */ 1569b631363SMatt Jacob 1579b631363SMatt Jacob typedef struct _MPI_RAID_VOL_INDICATOR 1589b631363SMatt Jacob { 1599b631363SMatt Jacob U64 TotalBlocks; /* 00h */ 1609b631363SMatt Jacob U64 BlocksRemaining; /* 08h */ 1619b631363SMatt Jacob } MPI_RAID_VOL_INDICATOR, MPI_POINTER PTR_MPI_RAID_VOL_INDICATOR, 1629b631363SMatt Jacob MpiRaidVolIndicator_t, MPI_POINTER pMpiRaidVolIndicator_t; 1639b631363SMatt Jacob 1649b631363SMatt Jacob 1659b631363SMatt Jacob /****************************************************************************/ 1669b631363SMatt Jacob /* SCSI IO RAID Passthrough Request */ 1679b631363SMatt Jacob /****************************************************************************/ 1689b631363SMatt Jacob 1699b631363SMatt Jacob typedef struct _MSG_SCSI_IO_RAID_PT_REQUEST 1709b631363SMatt Jacob { 1719b631363SMatt Jacob U8 PhysDiskNum; /* 00h */ 1729b631363SMatt Jacob U8 Reserved1; /* 01h */ 1739b631363SMatt Jacob U8 ChainOffset; /* 02h */ 1749b631363SMatt Jacob U8 Function; /* 03h */ 1759b631363SMatt Jacob U8 CDBLength; /* 04h */ 1769b631363SMatt Jacob U8 SenseBufferLength; /* 05h */ 1779b631363SMatt Jacob U8 Reserved2; /* 06h */ 1789b631363SMatt Jacob U8 MsgFlags; /* 07h */ 1799b631363SMatt Jacob U32 MsgContext; /* 08h */ 1809b631363SMatt Jacob U8 LUN[8]; /* 0Ch */ 1819b631363SMatt Jacob U32 Control; /* 14h */ 1829b631363SMatt Jacob U8 CDB[16]; /* 18h */ 1839b631363SMatt Jacob U32 DataLength; /* 28h */ 1849b631363SMatt Jacob U32 SenseBufferLowAddr; /* 2Ch */ 1859b631363SMatt Jacob SGE_IO_UNION SGL; /* 30h */ 1869b631363SMatt Jacob } MSG_SCSI_IO_RAID_PT_REQUEST, MPI_POINTER PTR_MSG_SCSI_IO_RAID_PT_REQUEST, 1879b631363SMatt Jacob SCSIIORaidPassthroughRequest_t, MPI_POINTER pSCSIIORaidPassthroughRequest_t; 1889b631363SMatt Jacob 1899b631363SMatt Jacob 1909b631363SMatt Jacob /* SCSI IO RAID Passthrough reply structure */ 1919b631363SMatt Jacob 1929b631363SMatt Jacob typedef struct _MSG_SCSI_IO_RAID_PT_REPLY 1939b631363SMatt Jacob { 1949b631363SMatt Jacob U8 PhysDiskNum; /* 00h */ 1959b631363SMatt Jacob U8 Reserved1; /* 01h */ 1969b631363SMatt Jacob U8 MsgLength; /* 02h */ 1979b631363SMatt Jacob U8 Function; /* 03h */ 1989b631363SMatt Jacob U8 CDBLength; /* 04h */ 1999b631363SMatt Jacob U8 SenseBufferLength; /* 05h */ 2009b631363SMatt Jacob U8 Reserved2; /* 06h */ 2019b631363SMatt Jacob U8 MsgFlags; /* 07h */ 2029b631363SMatt Jacob U32 MsgContext; /* 08h */ 2039b631363SMatt Jacob U8 SCSIStatus; /* 0Ch */ 2049b631363SMatt Jacob U8 SCSIState; /* 0Dh */ 2059b631363SMatt Jacob U16 IOCStatus; /* 0Eh */ 2069b631363SMatt Jacob U32 IOCLogInfo; /* 10h */ 2079b631363SMatt Jacob U32 TransferCount; /* 14h */ 2089b631363SMatt Jacob U32 SenseCount; /* 18h */ 2099b631363SMatt Jacob U32 ResponseInfo; /* 1Ch */ 2109b631363SMatt Jacob } MSG_SCSI_IO_RAID_PT_REPLY, MPI_POINTER PTR_MSG_SCSI_IO_RAID_PT_REPLY, 2119b631363SMatt Jacob SCSIIORaidPassthroughReply_t, MPI_POINTER pSCSIIORaidPassthroughReply_t; 2129b631363SMatt Jacob 2139b631363SMatt Jacob 2147fed69eeSMatt Jacob /****************************************************************************/ 2157fed69eeSMatt Jacob /* Mailbox reqeust structure */ 2167fed69eeSMatt Jacob /****************************************************************************/ 2177fed69eeSMatt Jacob 2187fed69eeSMatt Jacob typedef struct _MSG_MAILBOX_REQUEST 2197fed69eeSMatt Jacob { 2207fed69eeSMatt Jacob U16 Reserved1; 2217fed69eeSMatt Jacob U8 ChainOffset; 2227fed69eeSMatt Jacob U8 Function; 2237fed69eeSMatt Jacob U16 Reserved2; 2247fed69eeSMatt Jacob U8 Reserved3; 2257fed69eeSMatt Jacob U8 MsgFlags; 2267fed69eeSMatt Jacob U32 MsgContext; 2277fed69eeSMatt Jacob U8 Command[10]; 2287fed69eeSMatt Jacob U16 Reserved4; 2297fed69eeSMatt Jacob SGE_IO_UNION SGL; 2307fed69eeSMatt Jacob } MSG_MAILBOX_REQUEST, MPI_POINTER PTR_MSG_MAILBOX_REQUEST, 2317fed69eeSMatt Jacob MailboxRequest_t, MPI_POINTER pMailboxRequest_t; 2327fed69eeSMatt Jacob 2337fed69eeSMatt Jacob 2347fed69eeSMatt Jacob /* Mailbox reply structure */ 2357fed69eeSMatt Jacob typedef struct _MSG_MAILBOX_REPLY 2367fed69eeSMatt Jacob { 2377fed69eeSMatt Jacob U16 Reserved1; /* 00h */ 2387fed69eeSMatt Jacob U8 MsgLength; /* 02h */ 2397fed69eeSMatt Jacob U8 Function; /* 03h */ 2407fed69eeSMatt Jacob U16 Reserved2; /* 04h */ 2417fed69eeSMatt Jacob U8 Reserved3; /* 06h */ 2427fed69eeSMatt Jacob U8 MsgFlags; /* 07h */ 2437fed69eeSMatt Jacob U32 MsgContext; /* 08h */ 2447fed69eeSMatt Jacob U16 MailboxStatus; /* 0Ch */ 2457fed69eeSMatt Jacob U16 IOCStatus; /* 0Eh */ 2467fed69eeSMatt Jacob U32 IOCLogInfo; /* 10h */ 2477fed69eeSMatt Jacob U32 Reserved4; /* 14h */ 2487fed69eeSMatt Jacob } MSG_MAILBOX_REPLY, MPI_POINTER PTR_MSG_MAILBOX_REPLY, 2497fed69eeSMatt Jacob MailboxReply_t, MPI_POINTER pMailboxReply_t; 2507fed69eeSMatt Jacob 2519b631363SMatt Jacob #endif 2529b631363SMatt Jacob 2539b631363SMatt Jacob 2549b631363SMatt Jacob 255