19b631363SMatt Jacob /* $FreeBSD$ */ 29b631363SMatt Jacob /* 39b631363SMatt Jacob * Copyright (c) 2001 LSI Logic Corporation. 49b631363SMatt Jacob * 59b631363SMatt Jacob * 69b631363SMatt Jacob * Name: MPI_RAID.H 79b631363SMatt Jacob * Title: MPI RAID message and structures 89b631363SMatt Jacob * Creation Date: February 27, 2001 99b631363SMatt Jacob * 109b631363SMatt Jacob * MPI Version: 01.02.04 119b631363SMatt Jacob * 129b631363SMatt Jacob * Version History 139b631363SMatt Jacob * --------------- 149b631363SMatt Jacob * 159b631363SMatt Jacob * Date Version Description 169b631363SMatt Jacob * -------- -------- ------------------------------------------------------ 179b631363SMatt Jacob * 02-27-01 01.01.01 Original release for this file. 189b631363SMatt Jacob * 03-27-01 01.01.02 Added structure offset comments. 199b631363SMatt Jacob * 08-08-01 01.02.01 Original release for v1.2 work. 209b631363SMatt Jacob * 09-28-01 01.02.02 Major rework for MPI v1.2 Integrated RAID changes. 219b631363SMatt Jacob * 10-04-01 01.02.03 Added ActionData defines for 229b631363SMatt Jacob * MPI_RAID_ACTION_DELETE_VOLUME action. 239b631363SMatt Jacob * 11-01-01 01.02.04 Added define for MPI_RAID_ACTION_ADATA_DO_NOT_SYNC. 249b631363SMatt Jacob * -------------------------------------------------------------------------- 259b631363SMatt Jacob */ 269b631363SMatt Jacob 279b631363SMatt Jacob #ifndef MPI_RAID_H 289b631363SMatt Jacob #define MPI_RAID_H 299b631363SMatt Jacob 309b631363SMatt Jacob 319b631363SMatt Jacob /****************************************************************************** 329b631363SMatt Jacob * 339b631363SMatt Jacob * R A I D M e s s a g e s 349b631363SMatt Jacob * 359b631363SMatt Jacob *******************************************************************************/ 369b631363SMatt Jacob 379b631363SMatt Jacob 389b631363SMatt Jacob /****************************************************************************/ 399b631363SMatt Jacob /* RAID Volume Request */ 409b631363SMatt Jacob /****************************************************************************/ 419b631363SMatt Jacob 429b631363SMatt Jacob typedef struct _MSG_RAID_ACTION 439b631363SMatt Jacob { 449b631363SMatt Jacob U8 Action; /* 00h */ 459b631363SMatt Jacob U8 Reserved1; /* 01h */ 469b631363SMatt Jacob U8 ChainOffset; /* 02h */ 479b631363SMatt Jacob U8 Function; /* 03h */ 489b631363SMatt Jacob U8 VolumeID; /* 04h */ 499b631363SMatt Jacob U8 VolumeBus; /* 05h */ 509b631363SMatt Jacob U8 PhysDiskNum; /* 06h */ 519b631363SMatt Jacob U8 MsgFlags; /* 07h */ 529b631363SMatt Jacob U32 MsgContext; /* 08h */ 539b631363SMatt Jacob U32 Reserved2; /* 0Ch */ 549b631363SMatt Jacob U32 ActionDataWord; /* 10h */ 559b631363SMatt Jacob SGE_SIMPLE_UNION ActionDataSGE; /* 14h */ 569b631363SMatt Jacob } MSG_RAID_ACTION_REQUEST, MPI_POINTER PTR_MSG_RAID_ACTION_REQUEST, 579b631363SMatt Jacob MpiRaidActionRequest_t , MPI_POINTER pMpiRaidActionRequest_t; 589b631363SMatt Jacob 599b631363SMatt Jacob 609b631363SMatt Jacob /* RAID Action request Action values */ 619b631363SMatt Jacob 629b631363SMatt Jacob #define MPI_RAID_ACTION_STATUS (0x00) 639b631363SMatt Jacob #define MPI_RAID_ACTION_INDICATOR_STRUCT (0x01) 649b631363SMatt Jacob #define MPI_RAID_ACTION_CREATE_VOLUME (0x02) 659b631363SMatt Jacob #define MPI_RAID_ACTION_DELETE_VOLUME (0x03) 669b631363SMatt Jacob #define MPI_RAID_ACTION_DISABLE_VOLUME (0x04) 679b631363SMatt Jacob #define MPI_RAID_ACTION_ENABLE_VOLUME (0x05) 689b631363SMatt Jacob #define MPI_RAID_ACTION_QUIESCE_PHYS_IO (0x06) 699b631363SMatt Jacob #define MPI_RAID_ACTION_ENABLE_PHYS_IO (0x07) 709b631363SMatt Jacob #define MPI_RAID_ACTION_CHANGE_VOLUME_SETTINGS (0x08) 719b631363SMatt Jacob #define MPI_RAID_ACTION_PHYSDISK_OFFLINE (0x0A) 729b631363SMatt Jacob #define MPI_RAID_ACTION_PHYSDISK_ONLINE (0x0B) 739b631363SMatt Jacob #define MPI_RAID_ACTION_CHANGE_PHYSDISK_SETTINGS (0x0C) 749b631363SMatt Jacob #define MPI_RAID_ACTION_CREATE_PHYSDISK (0x0D) 759b631363SMatt Jacob #define MPI_RAID_ACTION_DELETE_PHYSDISK (0x0E) 769b631363SMatt Jacob #define MPI_RAID_ACTION_FAIL_PHYSDISK (0x0F) 779b631363SMatt Jacob #define MPI_RAID_ACTION_REPLACE_PHYSDISK (0x10) 789b631363SMatt Jacob 799b631363SMatt Jacob /* ActionDataWord defines for use with MPI_RAID_ACTION_CREATE_VOLUME action */ 809b631363SMatt Jacob #define MPI_RAID_ACTION_ADATA_DO_NOT_SYNC (0x00000001) 819b631363SMatt Jacob 829b631363SMatt Jacob /* ActionDataWord defines for use with MPI_RAID_ACTION_DELETE_VOLUME action */ 839b631363SMatt Jacob #define MPI_RAID_ACTION_ADATA_KEEP_PHYS_DISKS (0x00000000) 849b631363SMatt Jacob #define MPI_RAID_ACTION_ADATA_DEL_PHYS_DISKS (0x00000001) 859b631363SMatt Jacob 869b631363SMatt Jacob 879b631363SMatt Jacob /* RAID Action reply message */ 889b631363SMatt Jacob 899b631363SMatt Jacob typedef struct _MSG_RAID_ACTION_REPLY 909b631363SMatt Jacob { 919b631363SMatt Jacob U8 Action; /* 00h */ 929b631363SMatt Jacob U8 Reserved; /* 01h */ 939b631363SMatt Jacob U8 MsgLength; /* 02h */ 949b631363SMatt Jacob U8 Function; /* 03h */ 959b631363SMatt Jacob U8 VolumeID; /* 04h */ 969b631363SMatt Jacob U8 VolumeBus; /* 05h */ 979b631363SMatt Jacob U8 PhysDiskNum; /* 06h */ 989b631363SMatt Jacob U8 MsgFlags; /* 07h */ 999b631363SMatt Jacob U32 MsgContext; /* 08h */ 1009b631363SMatt Jacob U16 ActionStatus; /* 0Ch */ 1019b631363SMatt Jacob U16 IOCStatus; /* 0Eh */ 1029b631363SMatt Jacob U32 IOCLogInfo; /* 10h */ 1039b631363SMatt Jacob U32 VolumeStatus; /* 14h */ 1049b631363SMatt Jacob U32 ActionData; /* 18h */ 1059b631363SMatt Jacob } MSG_RAID_ACTION_REPLY, MPI_POINTER PTR_MSG_RAID_ACTION_REPLY, 1069b631363SMatt Jacob MpiRaidActionReply_t, MPI_POINTER pMpiRaidActionReply_t; 1079b631363SMatt Jacob 1089b631363SMatt Jacob 1099b631363SMatt Jacob /* RAID Volume reply ActionStatus values */ 1109b631363SMatt Jacob 1119b631363SMatt Jacob #define MPI_RAID_ACTION_ASTATUS_SUCCESS (0x0000) 1129b631363SMatt Jacob #define MPI_RAID_ACTION_ASTATUS_INVALID_ACTION (0x0001) 1139b631363SMatt Jacob #define MPI_RAID_ACTION_ASTATUS_FAILURE (0x0002) 1149b631363SMatt Jacob #define MPI_RAID_ACTION_ASTATUS_IN_PROGRESS (0x0003) 1159b631363SMatt Jacob 1169b631363SMatt Jacob 1179b631363SMatt Jacob /* RAID Volume reply RAID Volume Indicator structure */ 1189b631363SMatt Jacob 1199b631363SMatt Jacob typedef struct _MPI_RAID_VOL_INDICATOR 1209b631363SMatt Jacob { 1219b631363SMatt Jacob U64 TotalBlocks; /* 00h */ 1229b631363SMatt Jacob U64 BlocksRemaining; /* 08h */ 1239b631363SMatt Jacob } MPI_RAID_VOL_INDICATOR, MPI_POINTER PTR_MPI_RAID_VOL_INDICATOR, 1249b631363SMatt Jacob MpiRaidVolIndicator_t, MPI_POINTER pMpiRaidVolIndicator_t; 1259b631363SMatt Jacob 1269b631363SMatt Jacob 1279b631363SMatt Jacob /****************************************************************************/ 1289b631363SMatt Jacob /* SCSI IO RAID Passthrough Request */ 1299b631363SMatt Jacob /****************************************************************************/ 1309b631363SMatt Jacob 1319b631363SMatt Jacob typedef struct _MSG_SCSI_IO_RAID_PT_REQUEST 1329b631363SMatt Jacob { 1339b631363SMatt Jacob U8 PhysDiskNum; /* 00h */ 1349b631363SMatt Jacob U8 Reserved1; /* 01h */ 1359b631363SMatt Jacob U8 ChainOffset; /* 02h */ 1369b631363SMatt Jacob U8 Function; /* 03h */ 1379b631363SMatt Jacob U8 CDBLength; /* 04h */ 1389b631363SMatt Jacob U8 SenseBufferLength; /* 05h */ 1399b631363SMatt Jacob U8 Reserved2; /* 06h */ 1409b631363SMatt Jacob U8 MsgFlags; /* 07h */ 1419b631363SMatt Jacob U32 MsgContext; /* 08h */ 1429b631363SMatt Jacob U8 LUN[8]; /* 0Ch */ 1439b631363SMatt Jacob U32 Control; /* 14h */ 1449b631363SMatt Jacob U8 CDB[16]; /* 18h */ 1459b631363SMatt Jacob U32 DataLength; /* 28h */ 1469b631363SMatt Jacob U32 SenseBufferLowAddr; /* 2Ch */ 1479b631363SMatt Jacob SGE_IO_UNION SGL; /* 30h */ 1489b631363SMatt Jacob } MSG_SCSI_IO_RAID_PT_REQUEST, MPI_POINTER PTR_MSG_SCSI_IO_RAID_PT_REQUEST, 1499b631363SMatt Jacob SCSIIORaidPassthroughRequest_t, MPI_POINTER pSCSIIORaidPassthroughRequest_t; 1509b631363SMatt Jacob 1519b631363SMatt Jacob 1529b631363SMatt Jacob /* SCSI IO RAID Passthrough reply structure */ 1539b631363SMatt Jacob 1549b631363SMatt Jacob typedef struct _MSG_SCSI_IO_RAID_PT_REPLY 1559b631363SMatt Jacob { 1569b631363SMatt Jacob U8 PhysDiskNum; /* 00h */ 1579b631363SMatt Jacob U8 Reserved1; /* 01h */ 1589b631363SMatt Jacob U8 MsgLength; /* 02h */ 1599b631363SMatt Jacob U8 Function; /* 03h */ 1609b631363SMatt Jacob U8 CDBLength; /* 04h */ 1619b631363SMatt Jacob U8 SenseBufferLength; /* 05h */ 1629b631363SMatt Jacob U8 Reserved2; /* 06h */ 1639b631363SMatt Jacob U8 MsgFlags; /* 07h */ 1649b631363SMatt Jacob U32 MsgContext; /* 08h */ 1659b631363SMatt Jacob U8 SCSIStatus; /* 0Ch */ 1669b631363SMatt Jacob U8 SCSIState; /* 0Dh */ 1679b631363SMatt Jacob U16 IOCStatus; /* 0Eh */ 1689b631363SMatt Jacob U32 IOCLogInfo; /* 10h */ 1699b631363SMatt Jacob U32 TransferCount; /* 14h */ 1709b631363SMatt Jacob U32 SenseCount; /* 18h */ 1719b631363SMatt Jacob U32 ResponseInfo; /* 1Ch */ 1729b631363SMatt Jacob } MSG_SCSI_IO_RAID_PT_REPLY, MPI_POINTER PTR_MSG_SCSI_IO_RAID_PT_REPLY, 1739b631363SMatt Jacob SCSIIORaidPassthroughReply_t, MPI_POINTER pSCSIIORaidPassthroughReply_t; 1749b631363SMatt Jacob 1759b631363SMatt Jacob 1769b631363SMatt Jacob #endif 1779b631363SMatt Jacob 1789b631363SMatt Jacob 1799b631363SMatt Jacob 180