mpi_ioc.h revision 139749
1231990Smp/* $FreeBSD: head/sys/dev/mpt/mpilib/mpi_ioc.h 139749 2005-01-06 01:43:34Z imp $ */ 259243Sobrien/*- 359243Sobrien * Copyright (c) 2000, 2001 by LSI Logic Corporation 459243Sobrien * 559243Sobrien * Redistribution and use in source and binary forms, with or without 659243Sobrien * modification, are permitted provided that the following conditions 759243Sobrien * are met: 859243Sobrien * 1. Redistributions of source code must retain the above copyright 959243Sobrien * notice immediately at the beginning of the file, without modification, 1059243Sobrien * this list of conditions, and the following disclaimer. 1159243Sobrien * 2. The name of the author may not be used to endorse or promote products 1259243Sobrien * derived from this software without specific prior written permission. 1359243Sobrien * 1459243Sobrien * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1559243Sobrien * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1659243Sobrien * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1759243Sobrien * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR 18100616Smp * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1959243Sobrien * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2059243Sobrien * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2159243Sobrien * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2259243Sobrien * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2359243Sobrien * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2459243Sobrien * SUCH DAMAGE. 2559243Sobrien * 2659243Sobrien * 2759243Sobrien * Name: MPI_IOC.H 2859243Sobrien * Title: MPI IOC, Port, Event, FW Download, and FW Upload messages 2959243Sobrien * Creation Date: August 11, 2000 3059243Sobrien * 3159243Sobrien * MPI_IOC.H Version: 01.02.07 3259243Sobrien * 3359243Sobrien * Version History 3459243Sobrien * --------------- 3559243Sobrien * 3659243Sobrien * Date Version Description 3759243Sobrien * -------- -------- ------------------------------------------------------ 3859243Sobrien * 05-08-00 00.10.01 Original release for 0.10 spec dated 4/26/2000. 3959243Sobrien * 05-24-00 00.10.02 Added _MSG_IOC_INIT_REPLY structure. 40167465Smp * 06-06-00 01.00.01 Added CurReplyFrameSize field to _MSG_IOC_FACTS_REPLY. 41145479Smp * 06-12-00 01.00.02 Added _MSG_PORT_ENABLE_REPLY structure. 42145479Smp * Added _MSG_EVENT_ACK_REPLY structure. 43145479Smp * Added _MSG_FW_DOWNLOAD_REPLY structure. 44145479Smp * Added _MSG_TOOLBOX_REPLY structure. 45145479Smp * 06-30-00 01.00.03 Added MaxLanBuckets to _PORT_FACT_REPLY structure. 46145479Smp * 07-27-00 01.00.04 Added _EVENT_DATA structure definitions for _SCSI, 4759243Sobrien * _LINK_STATUS, _LOOP_STATE and _LOGOUT. 4859243Sobrien * 08-11-00 01.00.05 Switched positions of MsgLength and Function fields in 4959243Sobrien * _MSG_EVENT_ACK_REPLY structure to match specification. 5059243Sobrien * 11-02-00 01.01.01 Original release for post 1.0 work. 5159243Sobrien * Added a value for Manufacturer to WhoInit. 5259243Sobrien * 12-04-00 01.01.02 Modified IOCFacts reply, added FWUpload messages, and 5359243Sobrien * removed toolbox message. 5459243Sobrien * 01-09-01 01.01.03 Added event enabled and disabled defines. 5559243Sobrien * Added structures for FwHeader and DataHeader. 5659243Sobrien * Added ImageType to FwUpload reply. 5759243Sobrien * 02-20-01 01.01.04 Started using MPI_POINTER. 5859243Sobrien * 02-27-01 01.01.05 Added event for RAID status change and its event data. 5959243Sobrien * Added IocNumber field to MSG_IOC_FACTS_REPLY. 6059243Sobrien * 03-27-01 01.01.06 Added defines for ProductId field of MPI_FW_HEADER. 6159243Sobrien * Added structure offset comments. 6259243Sobrien * 04-09-01 01.01.07 Added structure EVENT_DATA_EVENT_CHANGE. 6383098Smp * 08-08-01 01.02.01 Original release for v1.2 work. 64100616Smp * New format for FWVersion and ProductId in 6559243Sobrien * MSG_IOC_FACTS_REPLY and MPI_FW_HEADER. 6659243Sobrien * 08-31-01 01.02.02 Addded event MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE and 67195609Smp * related structure and defines. 6859243Sobrien * Added event MPI_EVENT_ON_BUS_TIMER_EXPIRED. 69195609Smp * Added MPI_IOCINIT_FLAGS_DISCARD_FW_IMAGE. 7059243Sobrien * Replaced a reserved field in MSG_IOC_FACTS_REPLY with 7159243Sobrien * IOCExceptions and changed DataImageSize to reserved. 7259243Sobrien * Added MPI_FW_DOWNLOAD_ITYPE_NVSTORE_DATA and 7359243Sobrien * MPI_FW_UPLOAD_ITYPE_NVDATA. 7459243Sobrien * 09-28-01 01.02.03 Modified Event Data for Integrated RAID. 7559243Sobrien * 11-01-01 01.02.04 Added defines for MPI_EXT_IMAGE_HEADER ImageType field. 7659243Sobrien * 03-14-02 01.02.05 Added HeaderVersion field to MSG_IOC_FACTS_REPLY. 77195609Smp * 05-31-02 01.02.06 Added define for 78195609Smp * MPI_IOCFACTS_EXCEPT_RAID_CONFIG_INVALID. 7959243Sobrien * Added AliasIndex to EVENT_DATA_LOGOUT structure. 80195609Smp * 04-01-03 01.02.07 Added defines for MPI_FW_HEADER_SIGNATURE_. 8159243Sobrien * -------------------------------------------------------------------------- 82195609Smp */ 8359243Sobrien 84195609Smp#ifndef MPI_IOC_H 85195609Smp#define MPI_IOC_H 86195609Smp 87195609Smp 88195609Smp/***************************************************************************** 89195609Smp* 90195609Smp* I O C M e s s a g e s 91195609Smp* 92195609Smp*****************************************************************************/ 9359243Sobrien 94195609Smp/****************************************************************************/ 9559243Sobrien/* IOCInit message */ 96195609Smp/****************************************************************************/ 9759243Sobrien 98195609Smptypedef struct _MSG_IOC_INIT 9959243Sobrien{ 100195609Smp U8 WhoInit; /* 00h */ 10159243Sobrien U8 Reserved; /* 01h */ 102195609Smp U8 ChainOffset; /* 02h */ 10359243Sobrien U8 Function; /* 03h */ 104195609Smp U8 Flags; /* 04h */ 105145479Smp U8 MaxDevices; /* 05h */ 106195609Smp U8 MaxBuses; /* 06h */ 107195609Smp U8 MsgFlags; /* 07h */ 108145479Smp U32 MsgContext; /* 08h */ 109195609Smp U16 ReplyFrameSize; /* 0Ch */ 110195609Smp U8 Reserved1[2]; /* 0Eh */ 111195609Smp U32 HostMfaHighAddr; /* 10h */ 112195609Smp U32 SenseBufferHighAddr; /* 14h */ 113195609Smp} MSG_IOC_INIT, MPI_POINTER PTR_MSG_IOC_INIT, 114145479Smp IOCInit_t, MPI_POINTER pIOCInit_t; 115195609Smp 116195609Smp/* WhoInit values */ 11759243Sobrien#define MPI_WHOINIT_NO_ONE (0x00) 118195609Smp#define MPI_WHOINIT_SYSTEM_BIOS (0x01) 119195609Smp#define MPI_WHOINIT_ROM_BIOS (0x02) 120195609Smp#define MPI_WHOINIT_PCI_PEER (0x03) 121195609Smp#define MPI_WHOINIT_HOST_DRIVER (0x04) 122195609Smp#define MPI_WHOINIT_MANUFACTURER (0x05) 12359243Sobrien 124195609Smp/* Flags values */ 12559243Sobrien#define MPI_IOCINIT_FLAGS_DISCARD_FW_IMAGE (0x01) 126195609Smp 12759243Sobrientypedef struct _MSG_IOC_INIT_REPLY 12859243Sobrien{ 129145479Smp U8 WhoInit; /* 00h */ 130167465Smp U8 Reserved; /* 01h */ 131167465Smp U8 MsgLength; /* 02h */ 132145479Smp U8 Function; /* 03h */ 133145479Smp U8 Flags; /* 04h */ 13459243Sobrien U8 MaxDevices; /* 05h */ 135145479Smp U8 MaxBuses; /* 06h */ 136145479Smp U8 MsgFlags; /* 07h */ 13769408Sache U32 MsgContext; /* 08h */ 138145479Smp U16 Reserved2; /* 0Ch */ 139145479Smp U16 IOCStatus; /* 0Eh */ 140145479Smp U32 IOCLogInfo; /* 10h */ 14159243Sobrien} MSG_IOC_INIT_REPLY, MPI_POINTER PTR_MSG_IOC_INIT_REPLY, 14259243Sobrien IOCInitReply_t, MPI_POINTER pIOCInitReply_t; 143167465Smp 14459243Sobrien 14559243Sobrien 14659243Sobrien/****************************************************************************/ 14759243Sobrien/* IOC Facts message */ 148167465Smp/****************************************************************************/ 149145479Smp 15059243Sobrientypedef struct _MSG_IOC_FACTS 151145479Smp{ 152145479Smp U8 Reserved[2]; /* 00h */ 153231990Smp U8 ChainOffset; /* 01h */ 154231990Smp U8 Function; /* 02h */ 155145479Smp U8 Reserved1[3]; /* 03h */ 15669408Sache U8 MsgFlags; /* 04h */ 157231990Smp U32 MsgContext; /* 08h */ 158145479Smp} MSG_IOC_FACTS, MPI_POINTER PTR_IOC_FACTS, 159145479Smp IOCFacts_t, MPI_POINTER pIOCFacts_t; 160145479Smp 161231990Smptypedef struct _MPI_FW_VERSION_STRUCT 16269408Sache{ 16359243Sobrien U8 Dev; /* 00h */ 164167465Smp U8 Unit; /* 01h */ 165167465Smp U8 Minor; /* 02h */ 166167465Smp U8 Major; /* 03h */ 167167465Smp} MPI_FW_VERSION_STRUCT; 168145479Smp 169145479Smptypedef union _MPI_FW_VERSION 170145479Smp{ 171145479Smp MPI_FW_VERSION_STRUCT Struct; 172145479Smp U32 Word; 173145479Smp} MPI_FW_VERSION; 174145479Smp 175195609Smp/* IOC Facts Reply */ 176195609Smptypedef struct _MSG_IOC_FACTS_REPLY 177145479Smp{ 178195609Smp U16 MsgVersion; /* 00h */ 179195609Smp U8 MsgLength; /* 02h */ 180195609Smp U8 Function; /* 03h */ 181145479Smp U16 HeaderVersion; /* 04h */ 18259243Sobrien U8 IOCNumber; /* 06h */ 18359243Sobrien U8 MsgFlags; /* 07h */ 18459243Sobrien U32 MsgContext; /* 08h */ 18559243Sobrien U16 IOCExceptions; /* 0Ch */ 18659243Sobrien U16 IOCStatus; /* 0Eh */ 18759243Sobrien U32 IOCLogInfo; /* 10h */ 188145479Smp U8 MaxChainDepth; /* 14h */ 189145479Smp U8 WhoInit; /* 15h */ 190145479Smp U8 BlockSize; /* 16h */ 191145479Smp U8 Flags; /* 17h */ 192145479Smp U16 ReplyQueueDepth; /* 18h */ 193145479Smp U16 RequestFrameSize; /* 1Ah */ 194145479Smp U16 Reserved_0101_FWVersion; /* 1Ch */ /* obsolete 16-bit FWVersion */ 195145479Smp U16 ProductID; /* 1Eh */ 196145479Smp U32 CurrentHostMfaHighAddr; /* 20h */ 197145479Smp U16 GlobalCredits; /* 24h */ 198145479Smp U8 NumberOfPorts; /* 26h */ 199145479Smp U8 EventState; /* 27h */ 200145479Smp U32 CurrentSenseBufferHighAddr; /* 28h */ 201145479Smp U16 CurReplyFrameSize; /* 2Ch */ 20259243Sobrien U8 MaxDevices; /* 2Eh */ 20359243Sobrien U8 MaxBuses; /* 2Fh */ 20459243Sobrien U32 FWImageSize; /* 30h */ 20559243Sobrien U32 Reserved4; /* 34h */ 20659243Sobrien MPI_FW_VERSION FWVersion; /* 38h */ 20759243Sobrien} MSG_IOC_FACTS_REPLY, MPI_POINTER PTR_MSG_IOC_FACTS_REPLY, 20859243Sobrien IOCFactsReply_t, MPI_POINTER pIOCFactsReply_t; 20959243Sobrien 21059243Sobrien#define MPI_IOCFACTS_MSGVERSION_MAJOR_MASK (0xFF00) 21159243Sobrien#define MPI_IOCFACTS_MSGVERSION_MINOR_MASK (0x00FF) 21259243Sobrien 21359243Sobrien#define MPI_IOCFACTS_HEADERVERSION_UNIT_MASK (0xFF00) 21459243Sobrien#define MPI_IOCFACTS_HEADERVERSION_DEV_MASK (0x00FF) 21559243Sobrien 21659243Sobrien#define MPI_IOCFACTS_EXCEPT_CONFIG_CHECKSUM_FAIL (0x0001) 21759243Sobrien#define MPI_IOCFACTS_EXCEPT_RAID_CONFIG_INVALID (0x0002) 21859243Sobrien 21959243Sobrien#define MPI_IOCFACTS_FLAGS_FW_DOWNLOAD_BOOT (0x01) 22059243Sobrien 22159243Sobrien#define MPI_IOCFACTS_EVENTSTATE_DISABLED (0x00) 22269408Sache#define MPI_IOCFACTS_EVENTSTATE_ENABLED (0x01) 22359243Sobrien 22459243Sobrien 22559243Sobrien 22659243Sobrien/***************************************************************************** 22759243Sobrien* 22859243Sobrien* P o r t M e s s a g e s 22959243Sobrien* 23059243Sobrien*****************************************************************************/ 23159243Sobrien 23259243Sobrien/****************************************************************************/ 23359243Sobrien/* Port Facts message and Reply */ 23459243Sobrien/****************************************************************************/ 23559243Sobrien 23659243Sobrientypedef struct _MSG_PORT_FACTS 23759243Sobrien{ 23859243Sobrien U8 Reserved[2]; /* 00h */ 23959243Sobrien U8 ChainOffset; /* 02h */ 24059243Sobrien U8 Function; /* 03h */ 24159243Sobrien U8 Reserved1[2]; /* 04h */ 24259243Sobrien U8 PortNumber; /* 06h */ 24359243Sobrien U8 MsgFlags; /* 07h */ 24459243Sobrien U32 MsgContext; /* 08h */ 24559243Sobrien} MSG_PORT_FACTS, MPI_POINTER PTR_MSG_PORT_FACTS, 24659243Sobrien PortFacts_t, MPI_POINTER pPortFacts_t; 24759243Sobrien 24859243Sobrientypedef struct _MSG_PORT_FACTS_REPLY 24959243Sobrien{ 25059243Sobrien U16 Reserved; /* 00h */ 25159243Sobrien U8 MsgLength; /* 02h */ 25259243Sobrien U8 Function; /* 03h */ 25359243Sobrien U16 Reserved1; /* 04h */ 25459243Sobrien U8 PortNumber; /* 06h */ 25559243Sobrien U8 MsgFlags; /* 07h */ 25659243Sobrien U32 MsgContext; /* 08h */ 25759243Sobrien U16 Reserved2; /* 0Ch */ 25859243Sobrien U16 IOCStatus; /* 0Eh */ 25959243Sobrien U32 IOCLogInfo; /* 10h */ 26059243Sobrien U8 Reserved3; /* 14h */ 26159243Sobrien U8 PortType; /* 15h */ 26259243Sobrien U16 MaxDevices; /* 16h */ 26369408Sache U16 PortSCSIID; /* 18h */ 26459243Sobrien U16 ProtocolFlags; /* 1Ah */ 26559243Sobrien U16 MaxPostedCmdBuffers; /* 1Ch */ 26659243Sobrien U16 MaxPersistentIDs; /* 1Eh */ 26759243Sobrien U16 MaxLanBuckets; /* 20h */ 26859243Sobrien U16 Reserved4; /* 22h */ 26959243Sobrien U32 Reserved5; /* 24h */ 27059243Sobrien} MSG_PORT_FACTS_REPLY, MPI_POINTER PTR_MSG_PORT_FACTS_REPLY, 27159243Sobrien PortFactsReply_t, MPI_POINTER pPortFactsReply_t; 27259243Sobrien 27359243Sobrien 27459243Sobrien/* PortTypes values */ 27559243Sobrien 27659243Sobrien#define MPI_PORTFACTS_PORTTYPE_INACTIVE (0x00) 27759243Sobrien#define MPI_PORTFACTS_PORTTYPE_SCSI (0x01) 27859243Sobrien#define MPI_PORTFACTS_PORTTYPE_FC (0x10) 27959243Sobrien 28059243Sobrien/* ProtocolFlags values */ 28159243Sobrien 28259243Sobrien#define MPI_PORTFACTS_PROTOCOL_LOGBUSADDR (0x01) 28369408Sache#define MPI_PORTFACTS_PROTOCOL_LAN (0x02) 28459243Sobrien#define MPI_PORTFACTS_PROTOCOL_TARGET (0x04) 28559243Sobrien#define MPI_PORTFACTS_PROTOCOL_INITIATOR (0x08) 286167465Smp 287167465Smp 288167465Smp/****************************************************************************/ 289167465Smp/* Port Enable Message */ 290167465Smp/****************************************************************************/ 291145479Smp 292145479Smptypedef struct _MSG_PORT_ENABLE 293167465Smp{ 294167465Smp U8 Reserved[2]; /* 00h */ 29559243Sobrien U8 ChainOffset; /* 02h */ 296167465Smp U8 Function; /* 03h */ 29759243Sobrien U8 Reserved1[2]; /* 04h */ 298167465Smp U8 PortNumber; /* 06h */ 29959243Sobrien U8 MsgFlags; /* 07h */ 30059243Sobrien U32 MsgContext; /* 08h */ 301167465Smp} MSG_PORT_ENABLE, MPI_POINTER PTR_MSG_PORT_ENABLE, 302167465Smp PortEnable_t, MPI_POINTER pPortEnable_t; 30359243Sobrien 304167465Smptypedef struct _MSG_PORT_ENABLE_REPLY 30559243Sobrien{ 30659243Sobrien U8 Reserved[2]; /* 00h */ 30759243Sobrien U8 MsgLength; /* 02h */ 30859243Sobrien U8 Function; /* 03h */ 30959243Sobrien U8 Reserved1[2]; /* 04h */ 31059243Sobrien U8 PortNumber; /* 05h */ 31159243Sobrien U8 MsgFlags; /* 07h */ 31259243Sobrien U32 MsgContext; /* 08h */ 31359243Sobrien U16 Reserved2; /* 0Ch */ 314 U16 IOCStatus; /* 0Eh */ 315 U32 IOCLogInfo; /* 10h */ 316} MSG_PORT_ENABLE_REPLY, MPI_POINTER PTR_MSG_PORT_ENABLE_REPLY, 317 PortEnableReply_t, MPI_POINTER pPortEnableReply_t; 318 319 320/***************************************************************************** 321* 322* E v e n t M e s s a g e s 323* 324*****************************************************************************/ 325 326/****************************************************************************/ 327/* Event Notification messages */ 328/****************************************************************************/ 329 330typedef struct _MSG_EVENT_NOTIFY 331{ 332 U8 Switch; /* 00h */ 333 U8 Reserved; /* 01h */ 334 U8 ChainOffset; /* 02h */ 335 U8 Function; /* 03h */ 336 U8 Reserved1[3]; /* 04h */ 337 U8 MsgFlags; /* 07h */ 338 U32 MsgContext; /* 08h */ 339} MSG_EVENT_NOTIFY, MPI_POINTER PTR_MSG_EVENT_NOTIFY, 340 EventNotification_t, MPI_POINTER pEventNotification_t; 341 342/* Event Notification Reply */ 343 344typedef struct _MSG_EVENT_NOTIFY_REPLY 345{ 346 U16 EventDataLength; /* 00h */ 347 U8 MsgLength; /* 02h */ 348 U8 Function; /* 03h */ 349 U8 Reserved1[2]; /* 04h */ 350 U8 AckRequired; /* 06h */ 351 U8 MsgFlags; /* 07h */ 352 U32 MsgContext; /* 08h */ 353 U8 Reserved2[2]; /* 0Ch */ 354 U16 IOCStatus; /* 0Eh */ 355 U32 IOCLogInfo; /* 10h */ 356 U32 Event; /* 14h */ 357 U32 EventContext; /* 18h */ 358 U32 Data[1]; /* 1Ch */ 359} MSG_EVENT_NOTIFY_REPLY, MPI_POINTER PTR_MSG_EVENT_NOTIFY_REPLY, 360 EventNotificationReply_t, MPI_POINTER pEventNotificationReply_t; 361 362/* Event Acknowledge */ 363 364typedef struct _MSG_EVENT_ACK 365{ 366 U8 Reserved[2]; /* 00h */ 367 U8 ChainOffset; /* 02h */ 368 U8 Function; /* 03h */ 369 U8 Reserved1[3]; /* 04h */ 370 U8 MsgFlags; /* 07h */ 371 U32 MsgContext; /* 08h */ 372 U32 Event; /* 0Ch */ 373 U32 EventContext; /* 10h */ 374} MSG_EVENT_ACK, MPI_POINTER PTR_MSG_EVENT_ACK, 375 EventAck_t, MPI_POINTER pEventAck_t; 376 377typedef struct _MSG_EVENT_ACK_REPLY 378{ 379 U8 Reserved[2]; /* 00h */ 380 U8 MsgLength; /* 02h */ 381 U8 Function; /* 03h */ 382 U8 Reserved1[3]; /* 04h */ 383 U8 MsgFlags; /* 07h */ 384 U32 MsgContext; /* 08h */ 385 U16 Reserved2; /* 0Ch */ 386 U16 IOCStatus; /* 0Eh */ 387 U32 IOCLogInfo; /* 10h */ 388} MSG_EVENT_ACK_REPLY, MPI_POINTER PTR_MSG_EVENT_ACK_REPLY, 389 EventAckReply_t, MPI_POINTER pEventAckReply_t; 390 391/* Switch */ 392 393#define MPI_EVENT_NOTIFICATION_SWITCH_OFF (0x00) 394#define MPI_EVENT_NOTIFICATION_SWITCH_ON (0x01) 395 396/* Event */ 397 398#define MPI_EVENT_NONE (0x00000000) 399#define MPI_EVENT_LOG_DATA (0x00000001) 400#define MPI_EVENT_STATE_CHANGE (0x00000002) 401#define MPI_EVENT_UNIT_ATTENTION (0x00000003) 402#define MPI_EVENT_IOC_BUS_RESET (0x00000004) 403#define MPI_EVENT_EXT_BUS_RESET (0x00000005) 404#define MPI_EVENT_RESCAN (0x00000006) 405#define MPI_EVENT_LINK_STATUS_CHANGE (0x00000007) 406#define MPI_EVENT_LOOP_STATE_CHANGE (0x00000008) 407#define MPI_EVENT_LOGOUT (0x00000009) 408#define MPI_EVENT_EVENT_CHANGE (0x0000000A) 409#define MPI_EVENT_INTEGRATED_RAID (0x0000000B) 410#define MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE (0x0000000C) 411#define MPI_EVENT_ON_BUS_TIMER_EXPIRED (0x0000000D) 412 413/* AckRequired field values */ 414 415#define MPI_EVENT_NOTIFICATION_ACK_NOT_REQUIRED (0x00) 416#define MPI_EVENT_NOTIFICATION_ACK_REQUIRED (0x01) 417 418/* EventChange Event data */ 419 420typedef struct _EVENT_DATA_EVENT_CHANGE 421{ 422 U8 EventState; /* 00h */ 423 U8 Reserved; /* 01h */ 424 U16 Reserved1; /* 02h */ 425} EVENT_DATA_EVENT_CHANGE, MPI_POINTER PTR_EVENT_DATA_EVENT_CHANGE, 426 EventDataEventChange_t, MPI_POINTER pEventDataEventChange_t; 427 428/* SCSI Event data for Port, Bus and Device forms */ 429 430typedef struct _EVENT_DATA_SCSI 431{ 432 U8 TargetID; /* 00h */ 433 U8 BusPort; /* 01h */ 434 U16 Reserved; /* 02h */ 435} EVENT_DATA_SCSI, MPI_POINTER PTR_EVENT_DATA_SCSI, 436 EventDataScsi_t, MPI_POINTER pEventDataScsi_t; 437 438/* SCSI Device Status Change Event data */ 439 440typedef struct _EVENT_DATA_SCSI_DEVICE_STATUS_CHANGE 441{ 442 U8 TargetID; /* 00h */ 443 U8 Bus; /* 01h */ 444 U8 ReasonCode; /* 02h */ 445 U8 LUN; /* 03h */ 446 U8 ASC; /* 04h */ 447 U8 ASCQ; /* 05h */ 448 U16 Reserved; /* 06h */ 449} EVENT_DATA_SCSI_DEVICE_STATUS_CHANGE, 450 MPI_POINTER PTR_EVENT_DATA_SCSI_DEVICE_STATUS_CHANGE, 451 MpiEventDataScsiDeviceStatusChange_t, 452 MPI_POINTER pMpiEventDataScsiDeviceStatusChange_t; 453 454/* MPI SCSI Device Status Change Event data ReasonCode values */ 455#define MPI_EVENT_SCSI_DEV_STAT_RC_ADDED (0x03) 456#define MPI_EVENT_SCSI_DEV_STAT_RC_NOT_RESPONDING (0x04) 457#define MPI_EVENT_SCSI_DEV_STAT_RC_SMART_DATA (0x05) 458 459/* MPI Link Status Change Event data */ 460 461typedef struct _EVENT_DATA_LINK_STATUS 462{ 463 U8 State; /* 00h */ 464 U8 Reserved; /* 01h */ 465 U16 Reserved1; /* 02h */ 466 U8 Reserved2; /* 04h */ 467 U8 Port; /* 05h */ 468 U16 Reserved3; /* 06h */ 469} EVENT_DATA_LINK_STATUS, MPI_POINTER PTR_EVENT_DATA_LINK_STATUS, 470 EventDataLinkStatus_t, MPI_POINTER pEventDataLinkStatus_t; 471 472#define MPI_EVENT_LINK_STATUS_FAILURE (0x00000000) 473#define MPI_EVENT_LINK_STATUS_ACTIVE (0x00000001) 474 475/* MPI Loop State Change Event data */ 476 477typedef struct _EVENT_DATA_LOOP_STATE 478{ 479 U8 Character4; /* 00h */ 480 U8 Character3; /* 01h */ 481 U8 Type; /* 02h */ 482 U8 Reserved; /* 03h */ 483 U8 Reserved1; /* 04h */ 484 U8 Port; /* 05h */ 485 U16 Reserved2; /* 06h */ 486} EVENT_DATA_LOOP_STATE, MPI_POINTER PTR_EVENT_DATA_LOOP_STATE, 487 EventDataLoopState_t, MPI_POINTER pEventDataLoopState_t; 488 489#define MPI_EVENT_LOOP_STATE_CHANGE_LIP (0x0001) 490#define MPI_EVENT_LOOP_STATE_CHANGE_LPE (0x0002) 491#define MPI_EVENT_LOOP_STATE_CHANGE_LPB (0x0003) 492 493/* MPI LOGOUT Event data */ 494 495typedef struct _EVENT_DATA_LOGOUT 496{ 497 U32 NPortID; /* 00h */ 498 U8 AliasIndex; /* 04h */ 499 U8 Port; /* 05h */ 500 U16 Reserved1; /* 06h */ 501} EVENT_DATA_LOGOUT, MPI_POINTER PTR_EVENT_DATA_LOGOUT, 502 EventDataLogout_t, MPI_POINTER pEventDataLogout_t; 503 504#define MPI_EVENT_LOGOUT_ALL_ALIASES (0xFF) 505 506 507/* MPI Integrated RAID Event data */ 508 509typedef struct _EVENT_DATA_RAID 510{ 511 U8 VolumeID; /* 00h */ 512 U8 VolumeBus; /* 01h */ 513 U8 ReasonCode; /* 02h */ 514 U8 PhysDiskNum; /* 03h */ 515 U8 ASC; /* 04h */ 516 U8 ASCQ; /* 05h */ 517 U16 Reserved; /* 06h */ 518 U32 SettingsStatus; /* 08h */ 519} EVENT_DATA_RAID, MPI_POINTER PTR_EVENT_DATA_RAID, 520 MpiEventDataRaid_t, MPI_POINTER pMpiEventDataRaid_t; 521 522/* MPI Integrated RAID Event data ReasonCode values */ 523#define MPI_EVENT_RAID_RC_VOLUME_CREATED (0x00) 524#define MPI_EVENT_RAID_RC_VOLUME_DELETED (0x01) 525#define MPI_EVENT_RAID_RC_VOLUME_SETTINGS_CHANGED (0x02) 526#define MPI_EVENT_RAID_RC_VOLUME_STATUS_CHANGED (0x03) 527#define MPI_EVENT_RAID_RC_VOLUME_PHYSDISK_CHANGED (0x04) 528#define MPI_EVENT_RAID_RC_PHYSDISK_CREATED (0x05) 529#define MPI_EVENT_RAID_RC_PHYSDISK_DELETED (0x06) 530#define MPI_EVENT_RAID_RC_PHYSDISK_SETTINGS_CHANGED (0x07) 531#define MPI_EVENT_RAID_RC_PHYSDISK_STATUS_CHANGED (0x08) 532#define MPI_EVENT_RAID_RC_DOMAIN_VAL_NEEDED (0x09) 533#define MPI_EVENT_RAID_RC_SMART_DATA (0x0A) 534#define MPI_EVENT_RAID_RC_REPLACE_ACTION_STARTED (0x0B) 535 536 537/***************************************************************************** 538* 539* F i r m w a r e L o a d M e s s a g e s 540* 541*****************************************************************************/ 542 543/****************************************************************************/ 544/* Firmware Download message and associated structures */ 545/****************************************************************************/ 546 547typedef struct _MSG_FW_DOWNLOAD 548{ 549 U8 ImageType; /* 00h */ 550 U8 Reserved; /* 01h */ 551 U8 ChainOffset; /* 02h */ 552 U8 Function; /* 03h */ 553 U8 Reserved1[3]; /* 04h */ 554 U8 MsgFlags; /* 07h */ 555 U32 MsgContext; /* 08h */ 556 SGE_MPI_UNION SGL; /* 0Ch */ 557} MSG_FW_DOWNLOAD, MPI_POINTER PTR_MSG_FW_DOWNLOAD, 558 FWDownload_t, MPI_POINTER pFWDownload_t; 559 560#define MPI_FW_DOWNLOAD_ITYPE_RESERVED (0x00) 561#define MPI_FW_DOWNLOAD_ITYPE_FW (0x01) 562#define MPI_FW_DOWNLOAD_ITYPE_BIOS (0x02) 563#define MPI_FW_DOWNLOAD_ITYPE_NVDATA (0x03) 564 565 566typedef struct _FWDownloadTCSGE 567{ 568 U8 Reserved; /* 00h */ 569 U8 ContextSize; /* 01h */ 570 U8 DetailsLength; /* 02h */ 571 U8 Flags; /* 03h */ 572 U32 Reserved_0100_Checksum; /* 04h */ /* obsolete Checksum */ 573 U32 ImageOffset; /* 08h */ 574 U32 ImageSize; /* 0Ch */ 575} FW_DOWNLOAD_TCSGE, MPI_POINTER PTR_FW_DOWNLOAD_TCSGE, 576 FWDownloadTCSGE_t, MPI_POINTER pFWDownloadTCSGE_t; 577 578/* Firmware Download reply */ 579typedef struct _MSG_FW_DOWNLOAD_REPLY 580{ 581 U8 ImageType; /* 00h */ 582 U8 Reserved; /* 01h */ 583 U8 MsgLength; /* 02h */ 584 U8 Function; /* 03h */ 585 U8 Reserved1[3]; /* 04h */ 586 U8 MsgFlags; /* 07h */ 587 U32 MsgContext; /* 08h */ 588 U16 Reserved2; /* 0Ch */ 589 U16 IOCStatus; /* 0Eh */ 590 U32 IOCLogInfo; /* 10h */ 591} MSG_FW_DOWNLOAD_REPLY, MPI_POINTER PTR_MSG_FW_DOWNLOAD_REPLY, 592 FWDownloadReply_t, MPI_POINTER pFWDownloadReply_t; 593 594 595/****************************************************************************/ 596/* Firmware Upload message and associated structures */ 597/****************************************************************************/ 598 599typedef struct _MSG_FW_UPLOAD 600{ 601 U8 ImageType; /* 00h */ 602 U8 Reserved; /* 01h */ 603 U8 ChainOffset; /* 02h */ 604 U8 Function; /* 03h */ 605 U8 Reserved1[3]; /* 04h */ 606 U8 MsgFlags; /* 07h */ 607 U32 MsgContext; /* 08h */ 608 SGE_MPI_UNION SGL; /* 0Ch */ 609} MSG_FW_UPLOAD, MPI_POINTER PTR_MSG_FW_UPLOAD, 610 FWUpload_t, MPI_POINTER pFWUpload_t; 611 612#define MPI_FW_UPLOAD_ITYPE_FW_IOC_MEM (0x00) 613#define MPI_FW_UPLOAD_ITYPE_FW_FLASH (0x01) 614#define MPI_FW_UPLOAD_ITYPE_BIOS_FLASH (0x02) 615#define MPI_FW_UPLOAD_ITYPE_NVDATA (0x03) 616 617typedef struct _FWUploadTCSGE 618{ 619 U8 Reserved; /* 00h */ 620 U8 ContextSize; /* 01h */ 621 U8 DetailsLength; /* 02h */ 622 U8 Flags; /* 03h */ 623 U32 Reserved1; /* 04h */ 624 U32 ImageOffset; /* 08h */ 625 U32 ImageSize; /* 0Ch */ 626} FW_UPLOAD_TCSGE, MPI_POINTER PTR_FW_UPLOAD_TCSGE, 627 FWUploadTCSGE_t, MPI_POINTER pFWUploadTCSGE_t; 628 629/* Firmware Upload reply */ 630typedef struct _MSG_FW_UPLOAD_REPLY 631{ 632 U8 ImageType; /* 00h */ 633 U8 Reserved; /* 01h */ 634 U8 MsgLength; /* 02h */ 635 U8 Function; /* 03h */ 636 U8 Reserved1[3]; /* 04h */ 637 U8 MsgFlags; /* 07h */ 638 U32 MsgContext; /* 08h */ 639 U16 Reserved2; /* 0Ch */ 640 U16 IOCStatus; /* 0Eh */ 641 U32 IOCLogInfo; /* 10h */ 642 U32 ActualImageSize; /* 14h */ 643} MSG_FW_UPLOAD_REPLY, MPI_POINTER PTR_MSG_FW_UPLOAD_REPLY, 644 FWUploadReply_t, MPI_POINTER pFWUploadReply_t; 645 646 647typedef struct _MPI_FW_HEADER 648{ 649 U32 ArmBranchInstruction0; /* 00h */ 650 U32 Signature0; /* 04h */ 651 U32 Signature1; /* 08h */ 652 U32 Signature2; /* 0Ch */ 653 U32 ArmBranchInstruction1; /* 10h */ 654 U32 ArmBranchInstruction2; /* 14h */ 655 U32 Reserved; /* 18h */ 656 U32 Checksum; /* 1Ch */ 657 U16 VendorId; /* 20h */ 658 U16 ProductId; /* 22h */ 659 MPI_FW_VERSION FWVersion; /* 24h */ 660 U32 SeqCodeVersion; /* 28h */ 661 U32 ImageSize; /* 2Ch */ 662 U32 NextImageHeaderOffset; /* 30h */ 663 U32 LoadStartAddress; /* 34h */ 664 U32 IopResetVectorValue; /* 38h */ 665 U32 IopResetRegAddr; /* 3Ch */ 666 U32 VersionNameWhat; /* 40h */ 667 U8 VersionName[32]; /* 44h */ 668 U32 VendorNameWhat; /* 64h */ 669 U8 VendorName[32]; /* 68h */ 670} MPI_FW_HEADER, MPI_POINTER PTR_MPI_FW_HEADER, 671 MpiFwHeader_t, MPI_POINTER pMpiFwHeader_t; 672 673#define MPI_FW_HEADER_WHAT_SIGNATURE (0x29232840) 674 675/* defines for using the ProductId field */ 676#define MPI_FW_HEADER_PID_TYPE_MASK (0xF000) 677#define MPI_FW_HEADER_PID_TYPE_SCSI (0x0000) 678#define MPI_FW_HEADER_PID_TYPE_FC (0x1000) 679 680#define MPI_FW_HEADER_SIGNATURE_0 (0x5AEAA55A) 681#define MPI_FW_HEADER_SIGNATURE_1 (0xA55AEAA5) 682#define MPI_FW_HEADER_SIGNATURE_2 (0x5AA55AEA) 683 684#define MPI_FW_HEADER_PID_PROD_MASK (0x0F00) 685#define MPI_FW_HEADER_PID_PROD_INITIATOR_SCSI (0x0100) 686#define MPI_FW_HEADER_PID_PROD_TARGET_INITIATOR_SCSI (0x0200) 687#define MPI_FW_HEADER_PID_PROD_TARGET_SCSI (0x0300) 688#define MPI_FW_HEADER_PID_PROD_IM_SCSI (0x0400) 689#define MPI_FW_HEADER_PID_PROD_IS_SCSI (0x0500) 690#define MPI_FW_HEADER_PID_PROD_CTX_SCSI (0x0600) 691 692#define MPI_FW_HEADER_PID_FAMILY_MASK (0x00FF) 693#define MPI_FW_HEADER_PID_FAMILY_1030A0_SCSI (0x0001) 694#define MPI_FW_HEADER_PID_FAMILY_1030B0_SCSI (0x0002) 695#define MPI_FW_HEADER_PID_FAMILY_1030B1_SCSI (0x0003) 696#define MPI_FW_HEADER_PID_FAMILY_1030C0_SCSI (0x0004) 697#define MPI_FW_HEADER_PID_FAMILY_1020A0_SCSI (0x0005) 698#define MPI_FW_HEADER_PID_FAMILY_1020B0_SCSI (0x0006) 699#define MPI_FW_HEADER_PID_FAMILY_1020B1_SCSI (0x0007) 700#define MPI_FW_HEADER_PID_FAMILY_1020C0_SCSI (0x0008) 701#define MPI_FW_HEADER_PID_FAMILY_1035A0_SCSI (0x0009) 702#define MPI_FW_HEADER_PID_FAMILY_1035B0_SCSI (0x000A) 703#define MPI_FW_HEADER_PID_FAMILY_909_FC (0x0000) 704#define MPI_FW_HEADER_PID_FAMILY_919_FC (0x0001) 705#define MPI_FW_HEADER_PID_FAMILY_919X_FC (0x0002) 706 707typedef struct _MPI_EXT_IMAGE_HEADER 708{ 709 U8 ImageType; /* 00h */ 710 U8 Reserved; /* 01h */ 711 U16 Reserved1; /* 02h */ 712 U32 Checksum; /* 04h */ 713 U32 ImageSize; /* 08h */ 714 U32 NextImageHeaderOffset; /* 0Ch */ 715 U32 LoadStartAddress; /* 10h */ 716 U32 Reserved2; /* 14h */ 717} MPI_EXT_IMAGE_HEADER, MPI_POINTER PTR_MPI_EXT_IMAGE_HEADER, 718 MpiExtImageHeader_t, MPI_POINTER pMpiExtImageHeader_t; 719 720/* defines for the ImageType field */ 721#define MPI_EXT_IMAGE_TYPE_UNSPECIFIED (0x00) 722#define MPI_EXT_IMAGE_TYPE_FW (0x01) 723#define MPI_EXT_IMAGE_TYPE_NVDATA (0x03) 724 725#endif 726