1 /* $FreeBSD$ */ 2 /* 3 * Copyright (c) 2000, 2001 by LSI Logic Corporation 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 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 16 * 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. 25 * 26 * 27 * Name: MPI_IOC.H 28 * Title: MPI IOC, Port, Event, FW Download, and FW Upload messages 29 * Creation Date: August 11, 2000 30 * 31 * MPI_IOC.H Version: 01.02.07 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 _MSG_IOC_INIT_REPLY structure. 40 * 06-06-00 01.00.01 Added CurReplyFrameSize field to _MSG_IOC_FACTS_REPLY. 41 * 06-12-00 01.00.02 Added _MSG_PORT_ENABLE_REPLY structure. 42 * Added _MSG_EVENT_ACK_REPLY structure. 43 * Added _MSG_FW_DOWNLOAD_REPLY structure. 44 * Added _MSG_TOOLBOX_REPLY structure. 45 * 06-30-00 01.00.03 Added MaxLanBuckets to _PORT_FACT_REPLY structure. 46 * 07-27-00 01.00.04 Added _EVENT_DATA structure definitions for _SCSI, 47 * _LINK_STATUS, _LOOP_STATE and _LOGOUT. 48 * 08-11-00 01.00.05 Switched positions of MsgLength and Function fields in 49 * _MSG_EVENT_ACK_REPLY structure to match specification. 50 * 11-02-00 01.01.01 Original release for post 1.0 work. 51 * Added a value for Manufacturer to WhoInit. 52 * 12-04-00 01.01.02 Modified IOCFacts reply, added FWUpload messages, and 53 * removed toolbox message. 54 * 01-09-01 01.01.03 Added event enabled and disabled defines. 55 * Added structures for FwHeader and DataHeader. 56 * Added ImageType to FwUpload reply. 57 * 02-20-01 01.01.04 Started using MPI_POINTER. 58 * 02-27-01 01.01.05 Added event for RAID status change and its event data. 59 * Added IocNumber field to MSG_IOC_FACTS_REPLY. 60 * 03-27-01 01.01.06 Added defines for ProductId field of MPI_FW_HEADER. 61 * Added structure offset comments. 62 * 04-09-01 01.01.07 Added structure EVENT_DATA_EVENT_CHANGE. 63 * 08-08-01 01.02.01 Original release for v1.2 work. 64 * New format for FWVersion and ProductId in 65 * MSG_IOC_FACTS_REPLY and MPI_FW_HEADER. 66 * 08-31-01 01.02.02 Addded event MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE and 67 * related structure and defines. 68 * Added event MPI_EVENT_ON_BUS_TIMER_EXPIRED. 69 * Added MPI_IOCINIT_FLAGS_DISCARD_FW_IMAGE. 70 * Replaced a reserved field in MSG_IOC_FACTS_REPLY with 71 * IOCExceptions and changed DataImageSize to reserved. 72 * Added MPI_FW_DOWNLOAD_ITYPE_NVSTORE_DATA and 73 * MPI_FW_UPLOAD_ITYPE_NVDATA. 74 * 09-28-01 01.02.03 Modified Event Data for Integrated RAID. 75 * 11-01-01 01.02.04 Added defines for MPI_EXT_IMAGE_HEADER ImageType field. 76 * 03-14-02 01.02.05 Added HeaderVersion field to MSG_IOC_FACTS_REPLY. 77 * 05-31-02 01.02.06 Added define for 78 * MPI_IOCFACTS_EXCEPT_RAID_CONFIG_INVALID. 79 * Added AliasIndex to EVENT_DATA_LOGOUT structure. 80 * 04-01-03 01.02.07 Added defines for MPI_FW_HEADER_SIGNATURE_. 81 * -------------------------------------------------------------------------- 82 */ 83 84 #ifndef MPI_IOC_H 85 #define MPI_IOC_H 86 87 88 /***************************************************************************** 89 * 90 * I O C M e s s a g e s 91 * 92 *****************************************************************************/ 93 94 /****************************************************************************/ 95 /* IOCInit message */ 96 /****************************************************************************/ 97 98 typedef struct _MSG_IOC_INIT 99 { 100 U8 WhoInit; /* 00h */ 101 U8 Reserved; /* 01h */ 102 U8 ChainOffset; /* 02h */ 103 U8 Function; /* 03h */ 104 U8 Flags; /* 04h */ 105 U8 MaxDevices; /* 05h */ 106 U8 MaxBuses; /* 06h */ 107 U8 MsgFlags; /* 07h */ 108 U32 MsgContext; /* 08h */ 109 U16 ReplyFrameSize; /* 0Ch */ 110 U8 Reserved1[2]; /* 0Eh */ 111 U32 HostMfaHighAddr; /* 10h */ 112 U32 SenseBufferHighAddr; /* 14h */ 113 } MSG_IOC_INIT, MPI_POINTER PTR_MSG_IOC_INIT, 114 IOCInit_t, MPI_POINTER pIOCInit_t; 115 116 /* WhoInit values */ 117 #define MPI_WHOINIT_NO_ONE (0x00) 118 #define MPI_WHOINIT_SYSTEM_BIOS (0x01) 119 #define MPI_WHOINIT_ROM_BIOS (0x02) 120 #define MPI_WHOINIT_PCI_PEER (0x03) 121 #define MPI_WHOINIT_HOST_DRIVER (0x04) 122 #define MPI_WHOINIT_MANUFACTURER (0x05) 123 124 /* Flags values */ 125 #define MPI_IOCINIT_FLAGS_DISCARD_FW_IMAGE (0x01) 126 127 typedef struct _MSG_IOC_INIT_REPLY 128 { 129 U8 WhoInit; /* 00h */ 130 U8 Reserved; /* 01h */ 131 U8 MsgLength; /* 02h */ 132 U8 Function; /* 03h */ 133 U8 Flags; /* 04h */ 134 U8 MaxDevices; /* 05h */ 135 U8 MaxBuses; /* 06h */ 136 U8 MsgFlags; /* 07h */ 137 U32 MsgContext; /* 08h */ 138 U16 Reserved2; /* 0Ch */ 139 U16 IOCStatus; /* 0Eh */ 140 U32 IOCLogInfo; /* 10h */ 141 } MSG_IOC_INIT_REPLY, MPI_POINTER PTR_MSG_IOC_INIT_REPLY, 142 IOCInitReply_t, MPI_POINTER pIOCInitReply_t; 143 144 145 146 /****************************************************************************/ 147 /* IOC Facts message */ 148 /****************************************************************************/ 149 150 typedef struct _MSG_IOC_FACTS 151 { 152 U8 Reserved[2]; /* 00h */ 153 U8 ChainOffset; /* 01h */ 154 U8 Function; /* 02h */ 155 U8 Reserved1[3]; /* 03h */ 156 U8 MsgFlags; /* 04h */ 157 U32 MsgContext; /* 08h */ 158 } MSG_IOC_FACTS, MPI_POINTER PTR_IOC_FACTS, 159 IOCFacts_t, MPI_POINTER pIOCFacts_t; 160 161 typedef struct _MPI_FW_VERSION_STRUCT 162 { 163 U8 Dev; /* 00h */ 164 U8 Unit; /* 01h */ 165 U8 Minor; /* 02h */ 166 U8 Major; /* 03h */ 167 } MPI_FW_VERSION_STRUCT; 168 169 typedef union _MPI_FW_VERSION 170 { 171 MPI_FW_VERSION_STRUCT Struct; 172 U32 Word; 173 } MPI_FW_VERSION; 174 175 /* IOC Facts Reply */ 176 typedef struct _MSG_IOC_FACTS_REPLY 177 { 178 U16 MsgVersion; /* 00h */ 179 U8 MsgLength; /* 02h */ 180 U8 Function; /* 03h */ 181 U16 HeaderVersion; /* 04h */ 182 U8 IOCNumber; /* 06h */ 183 U8 MsgFlags; /* 07h */ 184 U32 MsgContext; /* 08h */ 185 U16 IOCExceptions; /* 0Ch */ 186 U16 IOCStatus; /* 0Eh */ 187 U32 IOCLogInfo; /* 10h */ 188 U8 MaxChainDepth; /* 14h */ 189 U8 WhoInit; /* 15h */ 190 U8 BlockSize; /* 16h */ 191 U8 Flags; /* 17h */ 192 U16 ReplyQueueDepth; /* 18h */ 193 U16 RequestFrameSize; /* 1Ah */ 194 U16 Reserved_0101_FWVersion; /* 1Ch */ /* obsolete 16-bit FWVersion */ 195 U16 ProductID; /* 1Eh */ 196 U32 CurrentHostMfaHighAddr; /* 20h */ 197 U16 GlobalCredits; /* 24h */ 198 U8 NumberOfPorts; /* 26h */ 199 U8 EventState; /* 27h */ 200 U32 CurrentSenseBufferHighAddr; /* 28h */ 201 U16 CurReplyFrameSize; /* 2Ch */ 202 U8 MaxDevices; /* 2Eh */ 203 U8 MaxBuses; /* 2Fh */ 204 U32 FWImageSize; /* 30h */ 205 U32 Reserved4; /* 34h */ 206 MPI_FW_VERSION FWVersion; /* 38h */ 207 } MSG_IOC_FACTS_REPLY, MPI_POINTER PTR_MSG_IOC_FACTS_REPLY, 208 IOCFactsReply_t, MPI_POINTER pIOCFactsReply_t; 209 210 #define MPI_IOCFACTS_MSGVERSION_MAJOR_MASK (0xFF00) 211 #define MPI_IOCFACTS_MSGVERSION_MINOR_MASK (0x00FF) 212 213 #define MPI_IOCFACTS_HEADERVERSION_UNIT_MASK (0xFF00) 214 #define MPI_IOCFACTS_HEADERVERSION_DEV_MASK (0x00FF) 215 216 #define MPI_IOCFACTS_EXCEPT_CONFIG_CHECKSUM_FAIL (0x0001) 217 #define MPI_IOCFACTS_EXCEPT_RAID_CONFIG_INVALID (0x0002) 218 219 #define MPI_IOCFACTS_FLAGS_FW_DOWNLOAD_BOOT (0x01) 220 221 #define MPI_IOCFACTS_EVENTSTATE_DISABLED (0x00) 222 #define MPI_IOCFACTS_EVENTSTATE_ENABLED (0x01) 223 224 225 226 /***************************************************************************** 227 * 228 * P o r t M e s s a g e s 229 * 230 *****************************************************************************/ 231 232 /****************************************************************************/ 233 /* Port Facts message and Reply */ 234 /****************************************************************************/ 235 236 typedef struct _MSG_PORT_FACTS 237 { 238 U8 Reserved[2]; /* 00h */ 239 U8 ChainOffset; /* 02h */ 240 U8 Function; /* 03h */ 241 U8 Reserved1[2]; /* 04h */ 242 U8 PortNumber; /* 06h */ 243 U8 MsgFlags; /* 07h */ 244 U32 MsgContext; /* 08h */ 245 } MSG_PORT_FACTS, MPI_POINTER PTR_MSG_PORT_FACTS, 246 PortFacts_t, MPI_POINTER pPortFacts_t; 247 248 typedef struct _MSG_PORT_FACTS_REPLY 249 { 250 U16 Reserved; /* 00h */ 251 U8 MsgLength; /* 02h */ 252 U8 Function; /* 03h */ 253 U16 Reserved1; /* 04h */ 254 U8 PortNumber; /* 06h */ 255 U8 MsgFlags; /* 07h */ 256 U32 MsgContext; /* 08h */ 257 U16 Reserved2; /* 0Ch */ 258 U16 IOCStatus; /* 0Eh */ 259 U32 IOCLogInfo; /* 10h */ 260 U8 Reserved3; /* 14h */ 261 U8 PortType; /* 15h */ 262 U16 MaxDevices; /* 16h */ 263 U16 PortSCSIID; /* 18h */ 264 U16 ProtocolFlags; /* 1Ah */ 265 U16 MaxPostedCmdBuffers; /* 1Ch */ 266 U16 MaxPersistentIDs; /* 1Eh */ 267 U16 MaxLanBuckets; /* 20h */ 268 U16 Reserved4; /* 22h */ 269 U32 Reserved5; /* 24h */ 270 } MSG_PORT_FACTS_REPLY, MPI_POINTER PTR_MSG_PORT_FACTS_REPLY, 271 PortFactsReply_t, MPI_POINTER pPortFactsReply_t; 272 273 274 /* PortTypes values */ 275 276 #define MPI_PORTFACTS_PORTTYPE_INACTIVE (0x00) 277 #define MPI_PORTFACTS_PORTTYPE_SCSI (0x01) 278 #define MPI_PORTFACTS_PORTTYPE_FC (0x10) 279 280 /* ProtocolFlags values */ 281 282 #define MPI_PORTFACTS_PROTOCOL_LOGBUSADDR (0x01) 283 #define MPI_PORTFACTS_PROTOCOL_LAN (0x02) 284 #define MPI_PORTFACTS_PROTOCOL_TARGET (0x04) 285 #define MPI_PORTFACTS_PROTOCOL_INITIATOR (0x08) 286 287 288 /****************************************************************************/ 289 /* Port Enable Message */ 290 /****************************************************************************/ 291 292 typedef struct _MSG_PORT_ENABLE 293 { 294 U8 Reserved[2]; /* 00h */ 295 U8 ChainOffset; /* 02h */ 296 U8 Function; /* 03h */ 297 U8 Reserved1[2]; /* 04h */ 298 U8 PortNumber; /* 06h */ 299 U8 MsgFlags; /* 07h */ 300 U32 MsgContext; /* 08h */ 301 } MSG_PORT_ENABLE, MPI_POINTER PTR_MSG_PORT_ENABLE, 302 PortEnable_t, MPI_POINTER pPortEnable_t; 303 304 typedef struct _MSG_PORT_ENABLE_REPLY 305 { 306 U8 Reserved[2]; /* 00h */ 307 U8 MsgLength; /* 02h */ 308 U8 Function; /* 03h */ 309 U8 Reserved1[2]; /* 04h */ 310 U8 PortNumber; /* 05h */ 311 U8 MsgFlags; /* 07h */ 312 U32 MsgContext; /* 08h */ 313 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 330 typedef 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 344 typedef 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 364 typedef 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 377 typedef 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 420 typedef 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 430 typedef 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 440 typedef 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 461 typedef 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 477 typedef 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 495 typedef 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 509 typedef 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 547 typedef 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 566 typedef 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 */ 579 typedef 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 599 typedef 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 617 typedef 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 */ 630 typedef 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 647 typedef 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 707 typedef 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