1139749Simp/*- 2139749Simp **************************************************************** 365312Smsmith * Copyright (c) 1996-2000 Distributed Processing Technology Corporation 465312Smsmith * Copyright (c) 2000 Adaptec Corporation. 565312Smsmith * All rights reserved. 682092Sscottl * 796554Sobrien * Copyright 1999 I2O Special Interest Group (I2O SIG). All rights reserved. 865312Smsmith * All rights reserved 982092Sscottl * 1065312Smsmith * TERMS AND CONDITIONS OF USE 1182092Sscottl * 1265312Smsmith * Redistribution and use in source form, with or without modification, are 1365312Smsmith * permitted provided that redistributions of source code must retain the 1465312Smsmith * above copyright notice, this list of conditions and the following disclaimer. 1582092Sscottl * 1665312Smsmith * This software is provided `as is' by Distributed Processing Technology and 1765312Smsmith * any express or implied warranties, including, but not limited to, the 1865312Smsmith * implied warranties of merchantability and fitness for a particular purpose, 1965312Smsmith * are disclaimed. In no event shall Distributed Processing Technology be 2065312Smsmith * liable for any direct, indirect, incidental, special, exemplary or 2165312Smsmith * consequential damages (including, but not limited to, procurement of 2265312Smsmith * substitute goods or services; loss of use, data, or profits; or business 2365312Smsmith * interruptions) however caused and on any theory of liability, whether in 2465312Smsmith * contract, strict liability, or tort (including negligence or otherwise) 2565312Smsmith * arising in any way out of the use of this driver software, even if advised 2665312Smsmith * of the possibility of such damage. 2782092Sscottl * 2865312Smsmith * This header file, and any modifications of this header file, are provided 2965312Smsmith * contingent upon your agreement and adherence to the here-listed terms and 3096554Sobrien * conditions. By accepting and/or using this header file, you agree to abide 3165312Smsmith * by these terms and conditions and that these terms and conditions will be 3265312Smsmith * construed and governed in accordance with the laws of the State of California, 3365312Smsmith * without reference to conflict-of-law provisions. If you do not agree 3465312Smsmith * to these terms and conditions, please delete this file, and any copies, 3565312Smsmith * permanently, without making any use thereof. 3682092Sscottl * 3765312Smsmith * THIS HEADER FILE IS PROVIDED FREE OF CHARGE ON AN AS-IS BASIS WITHOUT 3865312Smsmith * WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 3965312Smsmith * TO IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 4065312Smsmith * PURPOSE. I2O SIG DOES NOT WARRANT THAT THIS HEADER FILE WILL MEET THE 4165312Smsmith * USER'S REQUIREMENTS OR THAT ITS OPERATION WILL BE UNINTERRUPTED OR 4265312Smsmith * ERROR-FREE. 4382092Sscottl * 4465312Smsmith * I2O SIG DISCLAIMS ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF 4565312Smsmith * ANY PROPRIETARY RIGHTS, RELATING TO THE IMPLEMENTATION OF THE I2O 4665312Smsmith * SPECIFICATIONS. I2O SIG DOES NOT WARRANT OR REPRESENT THAT SUCH 4765312Smsmith * IMPLEMENTATIONS WILL NOT INFRINGE SUCH RIGHTS. 4882092Sscottl * 4965312Smsmith * THE USER OF THIS HEADER FILE SHALL HAVE NO RECOURSE TO I2O SIG FOR ANY 5065312Smsmith * ACTUAL OR CONSEQUENTIAL DAMAGES INCLUDING, BUT NOT LIMITED TO, LOST DATA 5165312Smsmith * OR LOST PROFITS ARISING OUT OF THE USE OR INABILITY TO USE THIS PROGRAM. 5282092Sscottl * 5365312Smsmith * I2O SIG grants the user of this header file a license to copy, distribute, 5465312Smsmith * and modify it, for any purpose, under the following terms. Any copying, 5565312Smsmith * distribution, or modification of this header file must not delete or alter 5665312Smsmith * the copyright notice of I2O SIG or any of these Terms and Conditions. 5782092Sscottl * 5865312Smsmith * Any distribution of this header file must not include a charge for the 5965312Smsmith * header file (unless such charges are strictly for the physical acts of 6065312Smsmith * copying or transferring copies). However, distribution of a product in 6165312Smsmith * which this header file is embedded may include a charge so long as any 6265312Smsmith * such charge does not include any charge for the header file itself. 6382092Sscottl * 6465312Smsmith * Any modification of this header file constitutes a derivative work based 6596554Sobrien * on this header file. Any distribution of such derivative work: (1) must 6665312Smsmith * include prominent notices that the header file has been changed from the 6782092Sscottl * original, together with the dates of any changes; (2) automatically includes 6865312Smsmith * this same license to the original header file from I2O SIG, without any 6965312Smsmith * restriction thereon from the distributing user; and (3) must include a 7065312Smsmith * grant of license of the modified file under the same terms and conditions 7165312Smsmith * as these Terms and Conditions. 7282092Sscottl * 7365312Smsmith * The I2O SIG Web site can be found at: http://www.i2osig.org 7482092Sscottl * 7565312Smsmith * The I2O SIG encourages you to deposit derivative works based on this 7696554Sobrien * header file at the I2O SIG Web site. Furthermore, to become a Registered 7765312Smsmith * Developer of the I2O SIG, sign up at the Web site or call 415.750.8352 7865312Smsmith * (United States). 7987826Sobrien * 8087826Sobrien * $FreeBSD$ 8187826Sobrien * 8265312Smsmith ****************************************************************/ 8365312Smsmith 8465312Smsmith/********************************************************************* 8565312Smsmith * I2OMsg.h -- I2O Message defintion file 8665312Smsmith * 8765312Smsmith * This file contains information presented in Chapter 3, 4 and 6 of 8865312Smsmith * the I2O(tm) Specification and most of the I2O Global defines and 8965312Smsmith * Typedefs. 9065312Smsmith **********************************************************************/ 9165312Smsmith 9265312Smsmith#if !defined(I2O_MESSAGE_HDR) 9396615Sobrien#define I2O_MESSAGE_HDR 9465312Smsmith 9596615Sobrien#define I2OMSG_REV 1_5_4 /* I2OMsg header file revision string */ 9665312Smsmith 9765312Smsmith/* 9865312Smsmith 9965312Smsmith NOTES: 10065312Smsmith 10165312Smsmith Gets, reads, receives, etc. are all even numbered functions. 10265312Smsmith Sets, writes, sends, etc. are all odd numbered functions. 10365312Smsmith Functions that both send and receive data can be either but an attempt is 10465312Smsmith made to use the function number that indicates the greater transfer amount. 10565312Smsmith Functions that do not send or receive data use odd function numbers. 10665312Smsmith 10765312Smsmith Some functions are synonyms like read, receive and send, write. 10865312Smsmith 10965312Smsmith All common functions will have a code of less than 0x80. 11065312Smsmith Unique functions to a class will start at 0x80. 11165312Smsmith Executive Functions start at 0xA0. 11265312Smsmith 11365312Smsmith Utility Message function codes range from 0 - 0x1f 11465312Smsmith Base Message function codes range from 0x20 - 0xfe 11565312Smsmith Private Message function code is 0xff. 11665312Smsmith*/ 11765312Smsmith 11865312Smsmith 11965312Smsmith 12065312Smsmith#if ((defined(KERNEL) || defined(_KERNEL)) && defined(__FreeBSD__)) 12165312Smsmith# if (KERN_VERSION < 3) 12265312Smsmith# include "i386/pci/i2otypes.h" 12365312Smsmith# else 12465312Smsmith# include "dev/asr/i2otypes.h" 12565312Smsmith# endif 12665312Smsmith#else 12765312Smsmith# include "i2otypes.h" 12865312Smsmith#endif 12965312Smsmith 13065312Smsmith 13165312SmsmithPRAGMA_ALIGN_PUSH 13265312Smsmith 13365312SmsmithPRAGMA_PACK_PUSH 13465312Smsmith 13565312Smsmith/* Set to 1 for 64 bit Context Fields */ 13696554Sobrien#define I2O_64BIT_CONTEXT 0 13765312Smsmith 13865312Smsmith/****************************************************************************/ 13965312Smsmith 14065312Smsmith/* Common functions accross all classes. */ 14165312Smsmith 14296554Sobrien#define I2O_PRIVATE_MESSAGE 0xFF 14365312Smsmith 14465312Smsmith/****************************************************************************/ 14565312Smsmith/* Class ID and Code Assignments */ 14665312Smsmith 14765312Smsmith 14896554Sobrien#define I2O_CLASS_VERSION_10 0x00 14996554Sobrien#define I2O_CLASS_VERSION_11 0x01 15065312Smsmith 15196554Sobrien/* Class Code Names: Table 6-1 Class Code Assignments. */ 15296554Sobrien#define I2O_CLASS_EXECUTIVE 0x000 15396554Sobrien#define I2O_CLASS_DDM 0x001 15496554Sobrien#define I2O_CLASS_RANDOM_BLOCK_STORAGE 0x010 15596554Sobrien#define I2O_CLASS_SEQUENTIAL_STORAGE 0x011 15696554Sobrien#define I2O_CLASS_LAN 0x020 15796554Sobrien#define I2O_CLASS_WAN 0x030 15896554Sobrien#define I2O_CLASS_FIBRE_CHANNEL_PORT 0x040 15996554Sobrien#define I2O_CLASS_FIBRE_CHANNEL_PERIPHERAL 0x041 16096554Sobrien#define I2O_CLASS_SCSI_PERIPHERAL 0x051 16196554Sobrien#define I2O_CLASS_ATE_PORT 0x060 16296554Sobrien#define I2O_CLASS_ATE_PERIPHERAL 0x061 16396554Sobrien#define I2O_CLASS_FLOPPY_CONTROLLER 0x070 16496554Sobrien#define I2O_CLASS_FLOPPY_DEVICE 0x071 16596554Sobrien#define I2O_CLASS_BUS_ADAPTER_PORT 0x080 16665312Smsmith/* Class Codes 0x090 - 0x09f are reserved for Peer-to-Peer classes */ 16796554Sobrien#define I2O_CLASS_MATCH_ANYCLASS 0xffffffff 16865312Smsmith 16996554Sobrien#define I2O_SUBCLASS_i960 0x001 17096554Sobrien#define I2O_SUBCLASS_HDM 0x020 17196554Sobrien#define I2O_SUBCLASS_ISM 0x021 17265312Smsmith 17365312Smsmith 17465312Smsmith/****************************************************************************/ 17596554Sobrien/* Message Frame defines and structures */ 17665312Smsmith 17765312Smsmith/* Defines for the Version_Status field. */ 17865312Smsmith 17996554Sobrien#define I2O_VERSION_10 0x00 18096554Sobrien#define I2O_VERSION_11 0x01 18165312Smsmith 18296554Sobrien#define I2O_VERSION_OFFSET_NUMBER_MASK 0x07 18396551Sobrien#define I2O_VERSION_OFFSET_SGL_TRL_OFFSET_MASK 0xF0 18465312Smsmith 18565312Smsmith/* Defines for the Message Flags Field. */ 186218909Sbrucec/* Please Note the FAIL bit is only set in the Transport Fail Message. */ 18796554Sobrien#define I2O_MESSAGE_FLAGS_STATIC 0x01 18896554Sobrien#define I2O_MESSAGE_FLAGS_64BIT_CONTEXT 0x02 18996554Sobrien#define I2O_MESSAGE_FLAGS_MULTIPLE 0x10 19096554Sobrien#define I2O_MESSAGE_FLAGS_FAIL 0x20 19196554Sobrien#define I2O_MESSAGE_FLAGS_LAST 0x40 19296554Sobrien#define I2O_MESSAGE_FLAGS_REPLY 0x80 19365312Smsmith 19465312Smsmith/* Defines for Request Status Codes: Table 3-1 Reply Status Codes. */ 19565312Smsmith 19696554Sobrien#define I2O_REPLY_STATUS_SUCCESS 0x00 19796554Sobrien#define I2O_REPLY_STATUS_ABORT_DIRTY 0x01 19896551Sobrien#define I2O_REPLY_STATUS_ABORT_NO_DATA_TRANSFER 0x02 19996551Sobrien#define I2O_REPLY_STATUS_ABORT_PARTIAL_TRANSFER 0x03 20096554Sobrien#define I2O_REPLY_STATUS_ERROR_DIRTY 0x04 20196551Sobrien#define I2O_REPLY_STATUS_ERROR_NO_DATA_TRANSFER 0x05 20296551Sobrien#define I2O_REPLY_STATUS_ERROR_PARTIAL_TRANSFER 0x06 20396554Sobrien#define I2O_REPLY_STATUS_PROCESS_ABORT_DIRTY 0x08 20496551Sobrien#define I2O_REPLY_STATUS_PROCESS_ABORT_NO_DATA_TRANSFER 0x09 20596551Sobrien#define I2O_REPLY_STATUS_PROCESS_ABORT_PARTIAL_TRANSFER 0x0A 20696554Sobrien#define I2O_REPLY_STATUS_TRANSACTION_ERROR 0x0B 20796554Sobrien#define I2O_REPLY_STATUS_PROGRESS_REPORT 0x80 20865312Smsmith 20965312Smsmith/* DetailedStatusCode defines for ALL messages: Table 3-2 Detailed Status Codes. */ 21065312Smsmith 21196554Sobrien#define I2O_DETAIL_STATUS_SUCCESS 0x0000 21296554Sobrien#define I2O_DETAIL_STATUS_BAD_KEY 0x0002 21396554Sobrien#define I2O_DETAIL_STATUS_TCL_ERROR 0x0003 21496554Sobrien#define I2O_DETAIL_STATUS_REPLY_BUFFER_FULL 0x0004 21596554Sobrien#define I2O_DETAIL_STATUS_NO_SUCH_PAGE 0x0005 21696554Sobrien#define I2O_DETAIL_STATUS_INSUFFICIENT_RESOURCE_SOFT 0x0006 21796554Sobrien#define I2O_DETAIL_STATUS_INSUFFICIENT_RESOURCE_HARD 0x0007 21896554Sobrien#define I2O_DETAIL_STATUS_CHAIN_BUFFER_TOO_LARGE 0x0009 21996554Sobrien#define I2O_DETAIL_STATUS_UNSUPPORTED_FUNCTION 0x000A 22096554Sobrien#define I2O_DETAIL_STATUS_DEVICE_LOCKED 0x000B 22196554Sobrien#define I2O_DETAIL_STATUS_DEVICE_RESET 0x000C 22296554Sobrien#define I2O_DETAIL_STATUS_INAPPROPRIATE_FUNCTION 0x000D 22396554Sobrien#define I2O_DETAIL_STATUS_INVALID_INITIATOR_ADDRESS 0x000E 22496554Sobrien#define I2O_DETAIL_STATUS_INVALID_MESSAGE_FLAGS 0x000F 22596554Sobrien#define I2O_DETAIL_STATUS_INVALID_OFFSET 0x0010 22696554Sobrien#define I2O_DETAIL_STATUS_INVALID_PARAMETER 0x0011 22796554Sobrien#define I2O_DETAIL_STATUS_INVALID_REQUEST 0x0012 22896554Sobrien#define I2O_DETAIL_STATUS_INVALID_TARGET_ADDRESS 0x0013 22996554Sobrien#define I2O_DETAIL_STATUS_MESSAGE_TOO_LARGE 0x0014 23096554Sobrien#define I2O_DETAIL_STATUS_MESSAGE_TOO_SMALL 0x0015 23196554Sobrien#define I2O_DETAIL_STATUS_MISSING_PARAMETER 0x0016 23296554Sobrien#define I2O_DETAIL_STATUS_TIMEOUT 0x0017 23396554Sobrien#define I2O_DETAIL_STATUS_UNKNOWN_ERROR 0x0018 23496554Sobrien#define I2O_DETAIL_STATUS_UNKNOWN_FUNCTION 0x0019 23596554Sobrien#define I2O_DETAIL_STATUS_UNSUPPORTED_VERSION 0x001A 23696554Sobrien#define I2O_DEATIL_STATUS_DEVICE_BUSY 0x001B 23796554Sobrien#define I2O_DETAIL_STATUS_DEVICE_NOT_AVAILABLE 0x001C 23865312Smsmith 23965312Smsmith/* Common I2O Field sizes */ 24065312Smsmith 24196554Sobrien#define I2O_TID_SZ 12 24296554Sobrien#define I2O_FUNCTION_SZ 8 24396554Sobrien#define I2O_UNIT_ID_SZ 16 24496554Sobrien#define I2O_SEGMENT_NUMBER_SZ 12 24565312Smsmith 24696554Sobrien#define I2O_IOP_ID_SZ 12 24796554Sobrien#define I2O_GROUP_ID_SZ 16 24896554Sobrien#define I2O_IOP_STATE_SZ 8 24996554Sobrien#define I2O_MESSENGER_TYPE_SZ 8 25065312Smsmith 25196554Sobrien#define I2O_CLASS_ID_SZ 12 25296554Sobrien#define I2O_CLASS_ORGANIZATION_ID_SZ 16 25365312Smsmith 25496554Sobrien#define I2O_4BIT_VERSION_SZ 4 25596554Sobrien#define I2O_8BIT_FLAGS_SZ 8 25696554Sobrien#define I2O_COMMON_LENGTH_FIELD_SZ 16 25765312Smsmith 25896554Sobrien#define I2O_DEVID_DESCRIPTION_SZ 16 25996554Sobrien#define I2O_DEVID_VENDOR_INFO_SZ 16 26096554Sobrien#define I2O_DEVID_PRODUCT_INFO_SZ 16 26196554Sobrien#define I2O_DEVID_REV_LEVEL_SZ 8 26296554Sobrien#define I2O_MODULE_NAME_SZ 24 26365312Smsmith 26496554Sobrien#define I2O_BIOS_INFO_SZ 8 26565312Smsmith 26696554Sobrien#define I2O_RESERVED_4BITS 4 26796554Sobrien#define I2O_RESERVED_8BITS 8 26896554Sobrien#define I2O_RESERVED_12BITS 12 26996554Sobrien#define I2O_RESERVED_16BITS 16 27096554Sobrien#define I2O_RESERVED_20BITS 20 27196554Sobrien#define I2O_RESERVED_24BITS 24 27296554Sobrien#define I2O_RESERVED_28BITS 28 27365312Smsmith 27465312Smsmith 27596554Sobrientypedef U32 I2O_PARAMETER_TID; 27665312Smsmith 27765312Smsmith 27896554Sobrien#if I2O_64BIT_CONTEXT 27996554Sobrientypedef U64 I2O_INITIATOR_CONTEXT; 28096554Sobrientypedef U64 I2O_TRANSACTION_CONTEXT; 28165312Smsmith#else 28296554Sobrientypedef U32 I2O_INITIATOR_CONTEXT; 28396554Sobrientypedef U32 I2O_TRANSACTION_CONTEXT; 28465312Smsmith#endif 28565312Smsmith 28665312Smsmith/* Serial Number format defines */ 28765312Smsmith 28896554Sobrien#define I2O_SERIAL_FORMAT_UNKNOWN 0 28996554Sobrien#define I2O_SERIAL_FORMAT_BINARY 1 29096554Sobrien#define I2O_SERIAL_FORMAT_ASCII 2 29196554Sobrien#define I2O_SERIAL_FORMAT_UNICODE 3 29296554Sobrien#define I2O_SERIAL_FORMAT_LAN_MAC 4 29396554Sobrien#define I2O_SERIAL_FORMAT_WAN 5 29465312Smsmith 29565312Smsmith/* Special TID Assignments */ 29665312Smsmith 29796554Sobrien#define I2O_IOP_TID 0 29896554Sobrien#define I2O_HOST_TID 1 29965312Smsmith 30065312Smsmith 30165312Smsmith/****************************************************************************/ 30265312Smsmith 30365312Smsmith/* I2O Message Frame common for all messages */ 30465312Smsmith 30565312Smsmithtypedef struct _I2O_MESSAGE_FRAME { 30696554Sobrien U8 VersionOffset; 30796554Sobrien U8 MsgFlags; 30896554Sobrien U16 MessageSize; 30965312Smsmith#if (defined(__BORLANDC__)) || defined(_DPT_BIG_ENDIAN) || (defined(sparc)) 31096554Sobrien U32 TargetAddress; 31165312Smsmith#else 31296554Sobrien BF TargetAddress:I2O_TID_SZ; 31396554Sobrien BF InitiatorAddress:I2O_TID_SZ; 31496554Sobrien BF Function:I2O_FUNCTION_SZ; 31565312Smsmith#endif 31665312Smsmith I2O_INITIATOR_CONTEXT InitiatorContext; 31765312Smsmith} I2O_MESSAGE_FRAME, *PI2O_MESSAGE_FRAME; 31865312Smsmith 31965312Smsmith 32065312Smsmith/****************************************************************************/ 32165312Smsmith 32265312Smsmith/* Transaction Reply Lists (TRL) Control Word structure */ 32365312Smsmith 32496554Sobrien#define I2O_TRL_FLAGS_SINGLE_FIXED_LENGTH 0x00 32596554Sobrien#define I2O_TRL_FLAGS_SINGLE_VARIABLE_LENGTH 0x40 32696554Sobrien#define I2O_TRL_FLAGS_MULTIPLE_FIXED_LENGTH 0x80 32765312Smsmith 32865312Smsmithtypedef struct _I2O_TRL_CONTROL_WORD { 32996554Sobrien U8 TrlCount; 33096554Sobrien U8 TrlElementSize; 33196554Sobrien U8 reserved; 33296554Sobrien U8 TrlFlags; 33396554Sobrien#if I2O_64BIT_CONTEXT 33496554Sobrien U32 Padding; /* Padding for 64 bit */ 33565312Smsmith#endif 33665312Smsmith} I2O_TRL_CONTROL_WORD, *PI2O_TRL_CONTROL_WORD; 33765312Smsmith 33865312Smsmith/****************************************************************************/ 33965312Smsmith 34065312Smsmith/* I2O Successful Single Transaction Reply Message Frame structure. */ 34165312Smsmith 34265312Smsmithtypedef struct _I2O_SINGLE_REPLY_MESSAGE_FRAME { 34396554Sobrien I2O_MESSAGE_FRAME StdMessageFrame; 34465312Smsmith I2O_TRANSACTION_CONTEXT TransactionContext; 34596554Sobrien U16 DetailedStatusCode; 34696554Sobrien U8 reserved; 34796554Sobrien U8 ReqStatus; 34896554Sobrien/* ReplyPayload */ 34965312Smsmith} I2O_SINGLE_REPLY_MESSAGE_FRAME, *PI2O_SINGLE_REPLY_MESSAGE_FRAME; 35065312Smsmith 35165312Smsmith 35265312Smsmith/****************************************************************************/ 35365312Smsmith 35465312Smsmith/* I2O Successful Multiple Transaction Reply Message Frame structure. */ 35565312Smsmith 35665312Smsmithtypedef struct _I2O_MULTIPLE_REPLY_MESSAGE_FRAME { 35796554Sobrien I2O_MESSAGE_FRAME StdMessageFrame; 35896554Sobrien I2O_TRL_CONTROL_WORD TrlControlWord; 35996554Sobrien U16 DetailedStatusCode; 36096554Sobrien U8 reserved; 36196554Sobrien U8 ReqStatus; 36296554Sobrien/* TransactionDetails[] */ 36365312Smsmith} I2O_MULTIPLE_REPLY_MESSAGE_FRAME, *PI2O_MULTIPLE_REPLY_MESSAGE_FRAME; 36465312Smsmith 36565312Smsmith 36665312Smsmith/****************************************************************************/ 36765312Smsmith 36865312Smsmith/* I2O Private Message Frame structure. */ 36965312Smsmith 37065312Smsmithtypedef struct _I2O_PRIVATE_MESSAGE_FRAME { 37196554Sobrien I2O_MESSAGE_FRAME StdMessageFrame; 37265312Smsmith I2O_TRANSACTION_CONTEXT TransactionContext; 37396554Sobrien U16 XFunctionCode; 37496554Sobrien U16 OrganizationID; 37596554Sobrien/* PrivatePayload[] */ 37665312Smsmith} I2O_PRIVATE_MESSAGE_FRAME, *PI2O_PRIVATE_MESSAGE_FRAME; 37765312Smsmith 37865312Smsmith 37965312Smsmith/****************************************************************************/ 38065312Smsmith 38165312Smsmith/* Message Failure Severity Codes */ 38265312Smsmith 38396554Sobrien#define I2O_SEVERITY_FORMAT_ERROR 0x1 38496554Sobrien#define I2O_SEVERITY_PATH_ERROR 0x2 38596554Sobrien#define I2O_SEVERITY_PATH_STATE 0x4 38696554Sobrien#define I2O_SEVERITY_CONGESTION 0x8 38765312Smsmith 38865312Smsmith/* Transport Failure Codes: Table 3-3 Mesasge Failure Codes */ 38965312Smsmith 39096554Sobrien#define I2O_FAILURE_CODE_TRANSPORT_SERVICE_SUSPENDED 0x81 39196551Sobrien#define I2O_FAILURE_CODE_TRANSPORT_SERVICE_TERMINATED 0x82 39296554Sobrien#define I2O_FAILURE_CODE_TRANSPORT_CONGESTION 0x83 39396554Sobrien#define I2O_FAILURE_CODE_TRANSPORT_FAIL 0x84 39496554Sobrien#define I2O_FAILURE_CODE_TRANSPORT_STATE_ERROR 0x85 39596554Sobrien#define I2O_FAILURE_CODE_TRANSPORT_TIME_OUT 0x86 39696554Sobrien#define I2O_FAILURE_CODE_TRANSPORT_ROUTING_FAILURE 0x87 39796554Sobrien#define I2O_FAILURE_CODE_TRANSPORT_INVALID_VERSION 0x88 39896554Sobrien#define I2O_FAILURE_CODE_TRANSPORT_INVALID_OFFSET 0x89 39996554Sobrien#define I2O_FAILURE_CODE_TRANSPORT_INVALID_MSG_FLAGS 0x8A 40096554Sobrien#define I2O_FAILURE_CODE_TRANSPORT_FRAME_TOO_SMALL 0x8B 40196554Sobrien#define I2O_FAILURE_CODE_TRANSPORT_FRAME_TOO_LARGE 0x8C 40296554Sobrien#define I2O_FAILURE_CODE_TRANSPORT_INVALID_TARGET_ID 0x8D 40396551Sobrien#define I2O_FAILURE_CODE_TRANSPORT_INVALID_INITIATOR_ID 0x8E 40496554Sobrien#define I2O_FAILURE_CODE_TRANSPORT_INVALID_INITIATOR_CONTEXT 0x8F 40596554Sobrien#define I2O_FAILURE_CODE_TRANSPORT_UNKNOWN_FAILURE 0xFF 40665312Smsmith 40765312Smsmith/* IOP_ID and Severity sizes */ 40865312Smsmith 40996554Sobrien#define I2O_FAILCODE_SEVERITY_SZ 8 41096554Sobrien#define I2O_FAILCODE_CODE_SZ 8 41165312Smsmith 41265312Smsmith/* I2O Transport Message Reply for Message Failure. */ 41365312Smsmith 41465312Smsmithtypedef struct _I2O_FAILURE_REPLY_MESSAGE_FRAME { 41596554Sobrien I2O_MESSAGE_FRAME StdMessageFrame; 41696554Sobrien I2O_TRANSACTION_CONTEXT TransactionContext; 41765312Smsmith# if (defined(_DPT_BIG_ENDIAN) || defined(sparc) || defined(__BORLANDC__)) 41896554Sobrien U32 LowestVersion; 41996554Sobrien U32 reserved; 42065312Smsmith# else 42196554Sobrien U8 LowestVersion; 42296554Sobrien U8 HighestVersion; 42396554Sobrien/* BF Severity:I2O_FAILCODE_SEVERITY_SZ; */ 42496554Sobrien/* BF FailureCode:I2O_FAILCODE_CODE_SZ; */ 42587826Sobrien/* Due to our compiler padding this structure and making it larger than 42687826Sobrien * it really is (4 bytes larger), we are re-defining these two fields 42787826Sobrien */ 42896554Sobrien U8 Severity; 42996554Sobrien U8 FailureCode; 43096554Sobrien BF reserved:I2O_RESERVED_4BITS; 43196554Sobrien BF FailingHostUnitID:I2O_UNIT_ID_SZ; 43296554Sobrien BF reserved1:12; 43365312Smsmith# endif 43496554Sobrien U32 AgeLimit; 43596554Sobrien U32 PreservedMFA; 43665312Smsmith} I2O_FAILURE_REPLY_MESSAGE_FRAME, *PI2O_FAILURE_REPLY_MESSAGE_FRAME; 43765312Smsmith 43865312Smsmith/* I2O Transport Message Reply for Transaction Error. */ 43965312Smsmith 44065312Smsmithtypedef struct _I2O_TRANSACTION_ERROR_REPLY_MESSAGE_FRAME { 44196554Sobrien I2O_MESSAGE_FRAME StdMessageFrame; 44265312Smsmith I2O_TRANSACTION_CONTEXT TransactionContext; 44396554Sobrien U16 DetailedStatusCode; 44496554Sobrien U8 reserved; 44596554Sobrien U8 ReqStatus; /* Should always be Transaction Error */ 44696554Sobrien U32 ErrorOffset; 44796554Sobrien U8 BitOffset; 44896554Sobrien U8 reserved1; 44996554Sobrien U16 reserved2; 45065312Smsmith} I2O_TRANSACTION_ERROR_REPLY_MESSAGE_FRAME, *PI2O_TRANSACTION_ERROR_REPLY_MESSAGE_FRAME; 45165312Smsmith 45265312Smsmith/****************************************************************************/ 45365312Smsmith 45465312Smsmith/* Misc. commonly used structures */ 45565312Smsmith 45665312Smsmith/* Class ID Block */ 45765312Smsmith 45865312Smsmithtypedef struct _I2O_CLASS_ID { 45965312Smsmith#if (defined(_DPT_BIG_ENDIAN) || defined(sparc)) 46096554Sobrien U32 Class; 46165312Smsmith#else 46296554Sobrien BF Class:I2O_CLASS_ID_SZ; 46396554Sobrien BF Version:I2O_4BIT_VERSION_SZ; 46496554Sobrien BF OrganizationID:I2O_CLASS_ORGANIZATION_ID_SZ; 46565312Smsmith#endif 46665312Smsmith} I2O_CLASS_ID, *PI2O_CLASS_ID; 46765312Smsmith 46865312Smsmith 46996554Sobrien#define I2O_MAX_SERIAL_NUMBER_SZ 256 47065312Smsmith 47165312Smsmithtypedef struct _I2O_SERIAL_INFO { 47296554Sobrien U8 SerialNumberLength; 47396554Sobrien U8 SerialNumberFormat; 47496554Sobrien U8 SerialNumber[I2O_MAX_SERIAL_NUMBER_SZ]; 47565312Smsmith} I2O_SERIAL_INFO, *PI2O_SERIAL_INFO; 47665312Smsmith 47765312Smsmith 47865312Smsmith/****************************************************************************/ 47965312Smsmith/* Hardware Resource Table (HRT) and Logical Configuration Table (LCT) */ 48065312Smsmith/****************************************************************************/ 48165312Smsmith 48265312Smsmith/* Bus Type Code defines */ 48365312Smsmith 48496554Sobrien#define I2O_LOCAL_BUS 0 48596554Sobrien#define I2O_ISA_BUS 1 48696554Sobrien#define I2O_EISA_BUS 2 48796554Sobrien#define I2O_MCA_BUS 3 48896554Sobrien#define I2O_PCI_BUS 4 48996554Sobrien#define I2O_PCMCIA_BUS 5 49096554Sobrien#define I2O_NUBUS_BUS 6 49196554Sobrien#define I2O_CARDBUS_BUS 7 49296554Sobrien#define I2O_OTHER_BUS 0x80 49365312Smsmith 49496554Sobrien#define I2O_HRT_STATE_SZ 4 49596554Sobrien#define I2O_HRT_BUS_NUMBER_SZ 8 49696554Sobrien#define I2O_HRT_BUS_TYPE_SZ 8 49765312Smsmith 49865312Smsmith 49965312Smsmith/* Bus Structures */ 50065312Smsmith 50165312Smsmith/* PCI Bus */ 50265312Smsmithtypedef struct _I2O_PCI_BUS_INFO { 50396554Sobrien U8 PciFunctionNumber; 50496554Sobrien U8 PciDeviceNumber; 50596554Sobrien U8 PciBusNumber; 50696554Sobrien U8 reserved; 50796554Sobrien U16 PciVendorID; 50896554Sobrien U16 PciDeviceID; 50965312Smsmith} I2O_PCI_BUS_INFO, *PI2O_PCI_BUS_INFO; 51065312Smsmith 51165312Smsmith/* Local Bus */ 51265312Smsmithtypedef struct _I2O_LOCAL_BUS_INFO { 51396554Sobrien U16 LbBaseIOPort; 51496554Sobrien U16 reserved; 51596554Sobrien U32 LbBaseMemoryAddress; 51665312Smsmith} I2O_LOCAL_BUS_INFO, *PI2O_LOCAL_BUS_INFO; 51765312Smsmith 51865312Smsmith/* ISA Bus */ 51965312Smsmithtypedef struct _I2O_ISA_BUS_INFO { 52096554Sobrien U16 IsaBaseIOPort; 52196554Sobrien U8 CSN; 52296554Sobrien U8 reserved; 52396554Sobrien U32 IsaBaseMemoryAddress; 52465312Smsmith} I2O_ISA_BUS_INFO, *PI2O_ISA_BUS_INFO; 52565312Smsmith 52665312Smsmith/* EISA Bus */ 52765312Smsmithtypedef struct _I2O_EISA_BUS_INFO { 52896554Sobrien U16 EisaBaseIOPort; 52996554Sobrien U8 reserved; 53096554Sobrien U8 EisaSlotNumber; 53196554Sobrien U32 EisaBaseMemoryAddress; 53265312Smsmith} I2O_EISA_BUS_INFO, *PI2O_EISA_BUS_INFO; 53365312Smsmith 53465312Smsmith/* MCA Bus */ 53565312Smsmithtypedef struct _I2O_MCA_BUS_INFO { 53696554Sobrien U16 McaBaseIOPort; 53796554Sobrien U8 reserved; 53896554Sobrien U8 McaSlotNumber; 53996554Sobrien U32 McaBaseMemoryAddress; 54065312Smsmith} I2O_MCA_BUS_INFO, *PI2O_MCA_BUS_INFO; 54165312Smsmith 54265312Smsmith/* Other Bus */ 54365312Smsmithtypedef struct _I2O_OTHER_BUS_INFO { 54496554Sobrien U16 BaseIOPort; 54596554Sobrien U16 reserved; 54696554Sobrien U32 BaseMemoryAddress; 54765312Smsmith} I2O_OTHER_BUS_INFO, *PI2O_OTHER_BUS_INFO; 54865312Smsmith 54965312Smsmith 55065312Smsmith/* HRT Entry Block */ 55165312Smsmith 55265312Smsmithtypedef struct _I2O_HRT_ENTRY { 55396554Sobrien U32 AdapterID; 55465312Smsmith#if (defined(_DPT_BIG_ENDIAN) || defined(sparc)) 55596554Sobrien U32 ControllingTID; 55665312Smsmith#else 55796554Sobrien BF ControllingTID:I2O_TID_SZ; 55896554Sobrien BF AdapterState:I2O_HRT_STATE_SZ; 55996554Sobrien BF BusNumber:I2O_HRT_BUS_NUMBER_SZ; 56096554Sobrien BF BusType:I2O_HRT_BUS_TYPE_SZ; 56165312Smsmith#endif 56265312Smsmith union { 56365312Smsmith /* PCI Bus */ 56496554Sobrien I2O_PCI_BUS_INFO PCIBus; 56565312Smsmith 56665312Smsmith /* Local Bus */ 56765312Smsmith I2O_LOCAL_BUS_INFO LocalBus; 56865312Smsmith 56965312Smsmith /* ISA Bus */ 57096554Sobrien I2O_ISA_BUS_INFO ISABus; 57165312Smsmith 57265312Smsmith /* EISA Bus */ 57365312Smsmith I2O_EISA_BUS_INFO EISABus; 57465312Smsmith 57565312Smsmith /* MCA Bus */ 57696554Sobrien I2O_MCA_BUS_INFO MCABus; 57765312Smsmith 57865312Smsmith /* Other. */ 57965312Smsmith I2O_OTHER_BUS_INFO OtherBus; 58065312Smsmith }uBus; 58165312Smsmith} I2O_HRT_ENTRY, *PI2O_HRT_ENTRY; 58265312Smsmith 58365312Smsmith 58465312Smsmith/* I2O Hardware Resource Table structure. */ 58565312Smsmith 58665312Smsmithtypedef struct _I2O_HRT { 58796554Sobrien U16 NumberEntries; 58896554Sobrien U8 EntryLength; 58996554Sobrien U8 HRTVersion; 59096554Sobrien U32 CurrentChangeIndicator; 59196554Sobrien I2O_HRT_ENTRY HRTEntry[1]; 59265312Smsmith} I2O_HRT, *PI2O_HRT; 59365312Smsmith 59465312Smsmith 59565312Smsmith/****************************************************************************/ 59696554Sobrien/* Logical Configuration Table */ 59765312Smsmith/****************************************************************************/ 59865312Smsmith 59965312Smsmith/* I2O Logical Configuration Table structures. */ 60065312Smsmith 60196554Sobrien#define I2O_IDENTITY_TAG_SZ 8 60265312Smsmith 60365312Smsmith/* I2O Logical Configuration Table Device Flags */ 60465312Smsmith 60596554Sobrien#define I2O_LCT_DEVICE_FLAGS_CONF_DIALOG_REQUEST 0x01 60696554Sobrien#define I2O_LCT_DEVICE_FLAGS_MORE_THAN_1_USER 0x02 60796554Sobrien#define I2O_LCT_DEVICE_FLAGS_PEER_SERVICE_DISABLED 0x10 60896551Sobrien#define I2O_LCT_DEVICE_FLAGS_MANAGEMENT_SERVICE_DISABLED 0x20 60965312Smsmith 61065312Smsmith/* LCT Entry Block */ 61165312Smsmith 61265312Smsmithtypedef struct _I2O_LCT_ENTRY { 61365312Smsmith#if (defined(_DPT_BIG_ENDIAN) || defined(sparc)) 61496554Sobrien U32 TableEntrySize; 61565312Smsmith#else 61696554Sobrien BF TableEntrySize:I2O_COMMON_LENGTH_FIELD_SZ; 61796554Sobrien BF LocalTID:I2O_TID_SZ; 61896554Sobrien BF reserved:I2O_4BIT_VERSION_SZ; 61965312Smsmith#endif 62096554Sobrien U32 ChangeIndicator; 62196554Sobrien U32 DeviceFlags; 62296554Sobrien I2O_CLASS_ID ClassID; 62396554Sobrien U32 SubClassInfo; 62465312Smsmith#if (defined(__BORLANDC__)) || defined(_DPT_BIG_ENDIAN) || (defined(sparc)) 62596554Sobrien U32 UserTID; 62665312Smsmith#else 62796554Sobrien BF UserTID:I2O_TID_SZ; 62896554Sobrien BF ParentTID:I2O_TID_SZ; 62996554Sobrien BF BiosInfo:I2O_BIOS_INFO_SZ; 63065312Smsmith#endif 63196554Sobrien U8 IdentityTag[I2O_IDENTITY_TAG_SZ]; 63296554Sobrien U32 EventCapabilities; 63365312Smsmith} I2O_LCT_ENTRY, *PI2O_LCT_ENTRY; 63465312Smsmith 63565312Smsmith 63665312Smsmith/* I2O Logical Configuration Table structure. */ 63765312Smsmith 63865312Smsmithtypedef struct _I2O_LCT { 63965312Smsmith#if (defined(_DPT_BIG_ENDIAN) || defined(sparc)) 64096554Sobrien U32 TableSize; 64165312Smsmith#else 64296554Sobrien BF TableSize:I2O_COMMON_LENGTH_FIELD_SZ; 64396554Sobrien BF BootDeviceTID:I2O_TID_SZ; 64496554Sobrien BF LctVer:I2O_4BIT_VERSION_SZ; 64565312Smsmith#endif 64696554Sobrien U32 IopFlags; 64796554Sobrien U32 CurrentChangeIndicator; 64896554Sobrien I2O_LCT_ENTRY LCTEntry[1]; 64965312Smsmith} I2O_LCT, *PI2O_LCT; 65065312Smsmith 65165312Smsmith 65265312Smsmith/****************************************************************************/ 65365312Smsmith 65465312Smsmith/* Memory Addressing structures and defines. */ 65565312Smsmith 65665312Smsmith/* SglFlags defines. */ 65765312Smsmith 65896554Sobrien#define I2O_SGL_FLAGS_LAST_ELEMENT 0x80 65996554Sobrien#define I2O_SGL_FLAGS_END_OF_BUFFER 0x40 66065312Smsmith 66196554Sobrien#define I2O_SGL_FLAGS_IGNORE_ELEMENT 0x00 66296554Sobrien#define I2O_SGL_FLAGS_TRANSPORT_ELEMENT 0x04 66396554Sobrien#define I2O_SGL_FLAGS_BIT_BUCKET_ELEMENT 0x08 66496554Sobrien#define I2O_SGL_FLAGS_IMMEDIATE_DATA_ELEMENT 0x0C 66596554Sobrien#define I2O_SGL_FLAGS_SIMPLE_ADDRESS_ELEMENT 0x10 66696551Sobrien#define I2O_SGL_FLAGS_PAGE_LIST_ADDRESS_ELEMENT 0x20 66796554Sobrien#define I2O_SGL_FLAGS_CHAIN_POINTER_ELEMENT 0x30 66896551Sobrien#define I2O_SGL_FLAGS_LONG_TRANSACTION_ELEMENT 0x40 66996551Sobrien#define I2O_SGL_FLAGS_SHORT_TRANSACTION_ELEMENT 0x70 67096554Sobrien#define I2O_SGL_FLAGS_SGL_ATTRIBUTES_ELEMENT 0x7C 67165312Smsmith 67296554Sobrien#define I2O_SGL_FLAGS_BC0 0x01 67396554Sobrien#define I2O_SGL_FLAGS_BC1 0x02 67496554Sobrien#define I2O_SGL_FLAGS_DIR 0x04 67596554Sobrien#define I2O_SGL_FLAGS_LOCAL_ADDRESS 0x08 67665312Smsmith 67796554Sobrien#define I2O_SGL_FLAGS_CONTEXT_COUNT_MASK 0x03 67896554Sobrien#define I2O_SGL_FLAGS_ADDRESS_MODE_MASK 0x3C 67996554Sobrien#define I2O_SGL_FLAGS_NO_CONTEXT 0x00 68065312Smsmith 68165312Smsmith/* Scatter/Gather Truth Table */ 68265312Smsmith 68365312Smsmith/* 68465312Smsmith 68565312Smsmithtypedef enum _SG_TYPE { 68665312Smsmith INVALID, 68765312Smsmith Ignore, 68865312Smsmith TransportDetails, 68965312Smsmith BitBucket, 69065312Smsmith ImmediateData, 69165312Smsmith Simple, 69265312Smsmith PageList, 69365312Smsmith ChainPointer, 69465312Smsmith ShortTransaction, 69565312Smsmith LongTransaction, 69665312Smsmith SGLAttributes, 69765312Smsmith INVALID/ReservedLongFormat, 69865312Smsmith INVALID/ReservedShortFormat 69965312Smsmith} SG_TYPE, *PSG_TYPE; 70065312Smsmith 70165312Smsmith 70296554Sobrien 0x00 Ignore; 70396554Sobrien 0x04 TransportDetails; 70496554Sobrien 0x08 BitBucket; 70596554Sobrien 0x0C ImmediateData; 70696554Sobrien 0x10 Simple; 70796554Sobrien 0x14 Simple; 70896554Sobrien 0x18 Simple; 70996554Sobrien 0x1C Simple; 71096554Sobrien 0x20 PageList; 71196554Sobrien 0x24 PageList; 71296554Sobrien 0x28 PageList; 71396554Sobrien 0x2C PageList; 71496554Sobrien 0x30 ChainPointer; 71596554Sobrien 0x34 INVALID; 71696554Sobrien 0x38 ChainPointer; 71796554Sobrien 0x3C INVALID; 71896554Sobrien 0x40 LongTransaction; 71996554Sobrien 0x44 INVALID/ReservedLongFormat; 72096554Sobrien 0x48 BitBucket; 72196554Sobrien 0x4C ImmediateData; 72296554Sobrien 0x50 Simple; 72396554Sobrien 0x54 Simple; 72496554Sobrien 0x58 Simple; 72596554Sobrien 0x5C Simple; 72696554Sobrien 0x60 PageList; 72796554Sobrien 0x64 PageList; 72896554Sobrien 0x68 PageList; 72996554Sobrien 0x6C PageList; 73096554Sobrien 0x70 ShortTransaction; 73196554Sobrien 0x74 INVALID/ReservedShortFormat; 73296554Sobrien 0x78 INVALID/ReservedShortFormat; 73396554Sobrien 0x7C SGLAttributes; 73465312Smsmith*/ 73565312Smsmith 73665312Smsmith 73765312Smsmith/* 32 Bit Context Field defines */ 73865312Smsmith 73996554Sobrien#define I2O_SGL_FLAGS_CONTEXT32_NULL 0x00 74096554Sobrien#define I2O_SGL_FLAGS_CONTEXT32_U32 0x01 74196554Sobrien#define I2O_SGL_FLAGS_CONTEXT32_U64 0x02 74296554Sobrien#define I2O_SGL_FLAGS_CONTEXT32_U96 0x03 74365312Smsmith 74496554Sobrien#define I2O_SGL_FLAGS_CONTEXT32_NULL_SZ 0x00 74596554Sobrien#define I2O_SGL_FLAGS_CONTEXT32_U32_SZ 0x04 74696554Sobrien#define I2O_SGL_FLAGS_CONTEXT32_U64_SZ 0x08 74796554Sobrien#define I2O_SGL_FLAGS_CONTEXT32_U96_SZ 0x0C 74865312Smsmith 74965312Smsmith/* 64 Bit Context Field defines */ 75065312Smsmith 75196554Sobrien#define I2O_SGL_FLAGS_CONTEXT64_NULL 0x00 75296554Sobrien#define I2O_SGL_FLAGS_CONTEXT64_U64 0x01 75396554Sobrien#define I2O_SGL_FLAGS_CONTEXT64_U128 0x02 75496554Sobrien#define I2O_SGL_FLAGS_CONTEXT64_U192 0x03 75565312Smsmith 75696554Sobrien#define I2O_SGL_FLAGS_CONTEXT64_NULL_SZ 0x00 75796554Sobrien#define I2O_SGL_FLAGS_CONTEXT64_U64_SZ 0x08 75896554Sobrien#define I2O_SGL_FLAGS_CONTEXT64_U128_SZ 0x10 75996554Sobrien#define I2O_SGL_FLAGS_CONTEXT64_U192_SZ 0x18 76065312Smsmith 76165312Smsmith/* SGL Attribute Element defines */ 76265312Smsmith 76396551Sobrien#define I2O_SGL_ATTRIBUTE_FLAGS_BIT_BUCKET_HINT 0x0400 76496551Sobrien#define I2O_SGL_ATTRIBUTE_FLAGS_IMMEDIATE_DATA_HINT 0x0200 76596551Sobrien#define I2O_SGL_ATTRIBUTE_FLAGS_LOCAL_ADDRESS_HINT 0x0100 76696551Sobrien#define I2O_SGL_ATTRIBUTE_FLAGS_32BIT_TRANSACTION 0x0000 76796551Sobrien#define I2O_SGL_ATTRIBUTE_FLAGS_64BIT_TRANSACTION 0x0004 76896551Sobrien#define I2O_SGL_ATTRIBUTE_FLAGS_32BIT_LOCAL_ADDRESS 0x0000 76965312Smsmith 77065312Smsmith/* SG Size defines */ 77165312Smsmith 77296554Sobrien#define I2O_SG_COUNT_SZ 24 77396554Sobrien#define I2O_SG_FLAGS_SZ 8 77465312Smsmith 77565312Smsmith/* Standard Flags and Count fields for SG Elements */ 77665312Smsmith 77765312Smsmithtypedef struct _I2O_FLAGS_COUNT { 77865312Smsmith#if (defined(__BORLANDC__)) || defined(_DPT_BIG_ENDIAN) || (defined(sparc)) 77996554Sobrien U32 Count; 78065312Smsmith#else 78196554Sobrien BF Count:I2O_SG_COUNT_SZ; 78296554Sobrien BF Flags:I2O_SG_FLAGS_SZ; 78365312Smsmith#endif 78465312Smsmith} I2O_FLAGS_COUNT, *PI2O_FLAGS_COUNT; 78565312Smsmith 78665312Smsmith/* Bit Bucket Element */ 78765312Smsmith 78865312Smsmithtypedef struct _I2O_SGE_BIT_BUCKET_ELEMENT { 78996554Sobrien I2O_FLAGS_COUNT FlagsCount; 79096554Sobrien U32 BufferContext; 79165312Smsmith} I2O_SGE_BIT_BUCKET_ELEMENT, *PI2O_SGE_BIT_BUCKET_ELEMENT; 79265312Smsmith 79365312Smsmith/* Chain Addressing Scatter-Gather Element */ 79465312Smsmith 79565312Smsmithtypedef struct _I2O_SGE_CHAIN_ELEMENT { 79696554Sobrien I2O_FLAGS_COUNT FlagsCount; 79796554Sobrien U32 PhysicalAddress; 79865312Smsmith} I2O_SGE_CHAIN_ELEMENT, *PI2O_SGE_CHAIN_ELEMENT; 79965312Smsmith 80065312Smsmith/* Chain Addressing with Context Scatter-Gather Element */ 80165312Smsmith 80265312Smsmithtypedef struct _I2O_SGE_CHAIN_CONTEXT_ELEMENT { 80396554Sobrien I2O_FLAGS_COUNT FlagsCount; 80496554Sobrien U32 Context[1]; 80596554Sobrien U32 PhysicalAddress; 80665312Smsmith} I2O_SGE_CHAIN_CONTEXT_ELEMENT, *PI2O_SGE_CHAIN_CONTEXT_ELEMENT; 80765312Smsmith 80865312Smsmith/* Ignore Scatter-Gather Element */ 80965312Smsmith 81065312Smsmithtypedef struct _I2O_SGE_IGNORE_ELEMENT { 81196554Sobrien I2O_FLAGS_COUNT FlagsCount; 81265312Smsmith} I2O_SGE_IGNORE_ELEMENT, *PI2O_SGE_IGNORE_ELEMENT; 81365312Smsmith 81465312Smsmith/* Immediate Data Element */ 81565312Smsmith 81665312Smsmithtypedef struct _I2O_SGE_IMMEDIATE_DATA_ELEMENT { 81796554Sobrien I2O_FLAGS_COUNT FlagsCount; 81865312Smsmith} I2O_SGE_IMMEDIATE_DATA_ELEMENT, *PI2O_SGE_IMMEDIATE_DATA_ELEMENT; 81965312Smsmith 82065312Smsmith/* Immediate Data with Context Element */ 82165312Smsmith 82265312Smsmithtypedef struct _I2O_SGE_IMMEDIATE_DATA_CONTEXT_ELEMENT { 82396554Sobrien I2O_FLAGS_COUNT FlagsCount; 82496554Sobrien U32 BufferContext; 82565312Smsmith} I2O_SGE_IMMEDIATE_DATA_CONTEXT_ELEMENT, *PI2O_SGE_IMMEDIATE_DATA_CONTEXT_ELEMENT; 82665312Smsmith 82765312Smsmith/* Long Transaction Parameters Element */ 82865312Smsmith 82965312Smsmithtypedef struct _I2O_SGE_LONG_TRANSACTION_ELEMENT { 83065312Smsmith#if (defined(__BORLANDC__)) 83196554Sobrien U32 LongElementLength; 83265312Smsmith#else 83396554Sobrien BF LongElementLength:I2O_SG_COUNT_SZ; 83496554Sobrien BF Flags:I2O_SG_FLAGS_SZ; 83565312Smsmith#endif 83696554Sobrien U32 BufferContext; 83765312Smsmith} I2O_SGE_LONG_TRANSACTION_ELEMENT, *PI2O_SGE_LONG_TRANSACTION_ELEMENT; 83865312Smsmith 83965312Smsmith/* Page List Scatter-Gather Element */ 84065312Smsmith 84165312Smsmithtypedef struct _I2O_SGE_PAGE_ELEMENT { 84296554Sobrien I2O_FLAGS_COUNT FlagsCount; 84396554Sobrien U32 PhysicalAddress[1]; 84465312Smsmith} I2O_SGE_PAGE_ELEMENT , *PI2O_SGE_PAGE_ELEMENT ; 84565312Smsmith 84665312Smsmith/* Page List with Context Scatter-Gather Element */ 84765312Smsmith 84865312Smsmithtypedef struct _I2O_SGE_PAGE_CONTEXT_ELEMENT { 84996554Sobrien I2O_FLAGS_COUNT FlagsCount; 85096554Sobrien U32 BufferContext[1]; 85196554Sobrien U32 PhysicalAddress[1]; 85265312Smsmith} I2O_SGE_PAGE_CONTEXT_ELEMENT, *PI2O_SGE_PAGE_CONTEXT_ELEMENT; 85365312Smsmith 85465312Smsmith/* SGL Attribute Element */ 85565312Smsmith 85665312Smsmithtypedef struct _I2O_SGE_SGL_ATTRIBUTES_ELEMENT { 85796554Sobrien U16 SglAttributeFlags; 85896554Sobrien U8 ElementLength; 85996554Sobrien U8 Flags; 86096554Sobrien U32 PageFrameSize; 86165312Smsmith} I2O_SGE_SGL_ATTRIBUTES_ELEMENT, *PI2O_SGE_SGL_ATTRIBUTES_ELEMENT; 86265312Smsmith 86365312Smsmith/* Short Transaction Parameters Element */ 86465312Smsmith 86565312Smsmithtypedef struct _I2O_SGE_SHORT_TRANSACTION_ELEMENT { 86696554Sobrien U16 ClassFields; 86796554Sobrien U8 ElementLength; 86896554Sobrien U8 Flags; 86996554Sobrien U32 BufferContext; 87065312Smsmith} I2O_SGE_SHORT_TRANSACTION_ELEMENT, *PI2O_SGE_SHORT_TRANSACTION_ELEMENT; 87165312Smsmith 87265312Smsmith/* Simple Addressing Scatter-Gather Element */ 87365312Smsmith 87465312Smsmithtypedef struct _I2O_SGE_SIMPLE_ELEMENT { 87596554Sobrien I2O_FLAGS_COUNT FlagsCount; 87696554Sobrien U32 PhysicalAddress; 87765312Smsmith} I2O_SGE_SIMPLE_ELEMENT, *PI2O_SGE_SIMPLE_ELEMENT; 87865312Smsmith 87965312Smsmith/* Simple Addressing with Context Scatter-Gather Element */ 88065312Smsmith 88165312Smsmithtypedef struct _I2O_SGE_SIMPLE_CONTEXT_ELEMENT { 88296554Sobrien I2O_FLAGS_COUNT FlagsCount; 88396554Sobrien U32 BufferContext[1]; 88496554Sobrien U32 PhysicalAddress; 88565312Smsmith} I2O_SGE_SIMPLE_CONTEXT_ELEMENT, *PI2O_SGE_SIMPLE_CONTEXT_ELEMENT; 88665312Smsmith 88765312Smsmith/* Transport Detail Element */ 88865312Smsmith 88965312Smsmithtypedef struct _I2O_SGE_TRANSPORT_ELEMENT { 89065312Smsmith#if (defined(__BORLANDC__)) 89196554Sobrien U32 LongElementLength; 89265312Smsmith#else 89396554Sobrien BF LongElementLength:I2O_SG_COUNT_SZ; 89496554Sobrien BF Flags:I2O_SG_FLAGS_SZ; 89565312Smsmith#endif 89665312Smsmith} I2O_SGE_TRANSPORT_ELEMENT, *PI2O_SGE_TRANSPORT_ELEMENT; 89765312Smsmith 89865312Smsmithtypedef struct _I2O_SG_ELEMENT { 89965312Smsmith union { 90065312Smsmith /* Bit Bucket Element */ 90196554Sobrien I2O_SGE_BIT_BUCKET_ELEMENT BitBucket; 90265312Smsmith 90365312Smsmith /* Chain Addressing Element */ 90496554Sobrien I2O_SGE_CHAIN_ELEMENT Chain; 90565312Smsmith 90665312Smsmith /* Chain Addressing with Context Element */ 90796554Sobrien I2O_SGE_CHAIN_CONTEXT_ELEMENT ChainContext; 90865312Smsmith 90965312Smsmith /* Ignore Scatter-Gather Element */ 91096554Sobrien I2O_SGE_IGNORE_ELEMENT Ignore; 91165312Smsmith 91265312Smsmith /* Immediate Data Element */ 91396554Sobrien I2O_SGE_IMMEDIATE_DATA_ELEMENT ImmediateData; 91465312Smsmith 91565312Smsmith /* Immediate Data with Context Element */ 91665312Smsmith I2O_SGE_IMMEDIATE_DATA_CONTEXT_ELEMENT ImmediateDataContext; 91765312Smsmith 91865312Smsmith /* Long Transaction Parameters Element */ 91996554Sobrien I2O_SGE_LONG_TRANSACTION_ELEMENT LongTransaction; 92065312Smsmith 92165312Smsmith /* Page List Element */ 92296554Sobrien I2O_SGE_PAGE_ELEMENT Page; 92365312Smsmith 92465312Smsmith /* Page List with Context Element */ 92596554Sobrien I2O_SGE_PAGE_CONTEXT_ELEMENT PageContext; 92665312Smsmith 92765312Smsmith /* SGL Attribute Element */ 92896554Sobrien I2O_SGE_SGL_ATTRIBUTES_ELEMENT SGLAttribute; 92965312Smsmith 93065312Smsmith /* Short Transaction Parameters Element */ 93165312Smsmith I2O_SGE_SHORT_TRANSACTION_ELEMENT ShortTransaction; 93265312Smsmith 93365312Smsmith /* Simple Addressing Element */ 93496554Sobrien I2O_SGE_SIMPLE_ELEMENT Simple[1]; 93565312Smsmith 93665312Smsmith /* Simple Addressing with Context Element */ 93796554Sobrien I2O_SGE_SIMPLE_CONTEXT_ELEMENT SimpleContext[1]; 93865312Smsmith 93965312Smsmith /* Transport Detail Element */ 94096554Sobrien I2O_SGE_TRANSPORT_ELEMENT Transport; 94165312Smsmith#if (defined(sun) && defined(u)) 94287826Sobrien/* there is a macro defined in Solaris sys/user.h for u, rename this to uSG */ 94365312Smsmith } uSG ; 94465312Smsmith#else 94565312Smsmith } u ; 94665312Smsmith#endif 94765312Smsmith} I2O_SG_ELEMENT, *PI2O_SG_ELEMENT; 94865312Smsmith 94965312Smsmith/****************************************************************************/ 95065312Smsmith/* Basic Parameter Group Access */ 95165312Smsmith/****************************************************************************/ 95265312Smsmith 95365312Smsmith/* Operation Function Numbers */ 95465312Smsmith 95596554Sobrien#define I2O_PARAMS_OPERATION_FIELD_GET 0x0001 95696554Sobrien#define I2O_PARAMS_OPERATION_LIST_GET 0x0002 95796554Sobrien#define I2O_PARAMS_OPERATION_MORE_GET 0x0003 95896554Sobrien#define I2O_PARAMS_OPERATION_SIZE_GET 0x0004 95996554Sobrien#define I2O_PARAMS_OPERATION_TABLE_GET 0x0005 96096554Sobrien#define I2O_PARAMS_OPERATION_FIELD_SET 0x0006 96196554Sobrien#define I2O_PARAMS_OPERATION_LIST_SET 0x0007 96296554Sobrien#define I2O_PARAMS_OPERATION_ROW_ADD 0x0008 96396554Sobrien#define I2O_PARAMS_OPERATION_ROW_DELETE 0x0009 96496554Sobrien#define I2O_PARAMS_OPERATION_TABLE_CLEAR 0x000A 96565312Smsmith 96665312Smsmith/* Operations List Header */ 96765312Smsmith 96865312Smsmithtypedef struct _I2O_PARAM_OPERATIONS_LIST_HEADER { 96996554Sobrien U16 OperationCount; 97096554Sobrien U16 Reserved; 97165312Smsmith} I2O_PARAM_OPERATIONS_LIST_HEADER, *PI2O_PARAM_OPERATIONS_LIST_HEADER; 97265312Smsmith 97365312Smsmith/* Results List Header */ 97465312Smsmith 97565312Smsmithtypedef struct _I2O_PARAM_RESULTS_LIST_HEADER { 97696554Sobrien U16 ResultCount; 97796554Sobrien U16 Reserved; 97865312Smsmith} I2O_PARAM_RESULTS_LIST_HEADER, *PI2O_PARAM_RESULTS_LIST_HEADER; 97965312Smsmith 98065312Smsmith/* Read Operation Result Block Template Structure */ 98165312Smsmith 98265312Smsmithtypedef struct _I2O_PARAM_READ_OPERATION_RESULT { 98396554Sobrien U16 BlockSize; 98496554Sobrien U8 BlockStatus; 98596554Sobrien U8 ErrorInfoSize; 98696554Sobrien /* Operations Results */ 98796554Sobrien /* Pad (if any) */ 98896554Sobrien /* ErrorInformation (if any) */ 98965312Smsmith} I2O_PARAM_READ_OPERATION_RESULT, *PI2O_PARAM_READ_OPERATION_RESULT; 99065312Smsmith 99165312Smsmithtypedef struct _I2O_TABLE_READ_OPERATION_RESULT { 99296554Sobrien U16 BlockSize; 99396554Sobrien U8 BlockStatus; 99496554Sobrien U8 ErrorInfoSize; 99596554Sobrien U16 RowCount; 99696554Sobrien U16 MoreFlag; 99796554Sobrien /* Operations Results */ 99896554Sobrien /* Pad (if any) */ 99996554Sobrien /* ErrorInformation (if any) */ 100065312Smsmith} I2O_TABLE_READ_OPERATION_RESULT, *PI2O_TABLE_READ_OPERATION_RESULT; 100165312Smsmith 100265312Smsmith/* Error Information Template Structure */ 100365312Smsmith 100465312Smsmithtypedef struct _I2O_PARAM_ERROR_INFO_TEMPLATE { 100596554Sobrien U16 OperationCode; 100696554Sobrien U16 GroupNumber; 100796554Sobrien U16 FieldIdx; 100896554Sobrien U8 AdditionalStatus; 100996554Sobrien U8 NumberKeys; 101096554Sobrien /* List of Key Values (variable) */ 101196554Sobrien /* Pad (if any) */ 101265312Smsmith} I2O_PARAM_ERROR_INFO_TEMPLATE, *PI2O_PARAM_ERROR_INFO_TEMPLATE; 101365312Smsmith 101465312Smsmith/* Operation Template for Specific Fields */ 101565312Smsmith 101665312Smsmithtypedef struct _I2O_PARAM_OPERATION_SPECIFIC_TEMPLATE { 101796554Sobrien U16 Operation; 101896554Sobrien U16 GroupNumber; 101996554Sobrien U16 FieldCount; 102096554Sobrien U16 FieldIdx[1]; 102196554Sobrien /* Pad (if any) */ 102265312Smsmith} I2O_PARAM_OPERATION_SPECIFIC_TEMPLATE, *PI2O_PARAM_OPERATION_SPECIFIC_TEMPLATE; 102365312Smsmith 102465312Smsmith/* Operation Template for All Fields */ 102565312Smsmith 102665312Smsmithtypedef struct _I2O_PARAM_OPERATION_ALL_TEMPLATE { 102796554Sobrien U16 Operation; 102896554Sobrien U16 GroupNumber; 102996554Sobrien U16 FieldCount; 103096554Sobrien /* Pad (if any) */ 103165312Smsmith} I2O_PARAM_OPERATION_ALL_TEMPLATE, *PI2O_PARAM_OPERATION_ALL_TEMPLATE; 103265312Smsmith 103365312Smsmith/* Operation Template for All List Fields */ 103465312Smsmith 103565312Smsmithtypedef struct _I2O_PARAM_OPERATION_ALL_LIST_TEMPLATE { 103696554Sobrien U16 Operation; 103796554Sobrien U16 GroupNumber; 103896554Sobrien U16 FieldCount; 103996554Sobrien U16 KeyCount; 104096554Sobrien U8 KeyValue; 104196554Sobrien /* Pad (if any) */ 104265312Smsmith} I2O_PARAM_OPERATION_ALL_LIST_TEMPLATE, *PI2O_PARAM_OPERATION_ALL_LIST_TEMPLATE; 104365312Smsmith 104465312Smsmith/* Modify Operation Result Block Template Structure */ 104565312Smsmith 104665312Smsmithtypedef struct _I2O_PARAM_MODIFY_OPERATION_RESULT { 104796554Sobrien U16 BlockSize; 104896554Sobrien U8 BlockStatus; 104996554Sobrien U8 ErrorInfoSize; 105096554Sobrien /* ErrorInformation (if any) */ 105165312Smsmith} I2O_PARAM_MODIFY_OPERATION_RESULT, *PI2O_PARAM_MODIFY_OPERATION_RESULT; 105265312Smsmith 105365312Smsmith/* Operation Template for Row Delete */ 105465312Smsmith 105565312Smsmithtypedef struct _I2O_PARAM_OPERATION_ROW_DELETE_TEMPLATE { 105696554Sobrien U16 Operation; 105796554Sobrien U16 GroupNumber; 105896554Sobrien U16 RowCount; 105996554Sobrien U8 KeyValue; 106065312Smsmith} I2O_PARAM_OPERATION_ROW_DELETE_TEMPLATE, *PI2O_PARAM_OPERATION_ROW_DELETE_TEMPLATE; 106165312Smsmith 106265312Smsmith/* Operation Template for Table Clear */ 106365312Smsmith 106465312Smsmithtypedef struct _I2O_PARAM_OPERATION_TABLE_CLEAR_TEMPLATE { 106596554Sobrien U16 Operation; 106696554Sobrien U16 GroupNumber; 106765312Smsmith} I2O_PARAM_OPERATION_TABLE_CLEAR_TEMPLATE, *PI2O_PARAM_OPERATION_TABLE_CLEAR_TEMPLATE; 106865312Smsmith 106965312Smsmith/* Status codes and Error Information for Parameter functions */ 107065312Smsmith 107196554Sobrien#define I2O_PARAMS_STATUS_SUCCESS 0x00 107296554Sobrien#define I2O_PARAMS_STATUS_BAD_KEY_ABORT 0x01 107396554Sobrien#define I2O_PARAMS_STATUS_BAD_KEY_CONTINUE 0x02 107496554Sobrien#define I2O_PARAMS_STATUS_BUFFER_FULL 0x03 107596554Sobrien#define I2O_PARAMS_STATUS_BUFFER_TOO_SMALL 0x04 107696554Sobrien#define I2O_PARAMS_STATUS_FIELD_UNREADABLE 0x05 107796554Sobrien#define I2O_PARAMS_STATUS_FIELD_UNWRITEABLE 0x06 107896554Sobrien#define I2O_PARAMS_STATUS_INSUFFICIENT_FIELDS 0x07 107996554Sobrien#define I2O_PARAMS_STATUS_INVALID_GROUP_ID 0x08 108096554Sobrien#define I2O_PARAMS_STATUS_INVALID_OPERATION 0x09 108196554Sobrien#define I2O_PARAMS_STATUS_NO_KEY_FIELD 0x0A 108296554Sobrien#define I2O_PARAMS_STATUS_NO_SUCH_FIELD 0x0B 108396554Sobrien#define I2O_PARAMS_STATUS_NON_DYNAMIC_GROUP 0x0C 108496554Sobrien#define I2O_PARAMS_STATUS_OPERATION_ERROR 0x0D 108596554Sobrien#define I2O_PARAMS_STATUS_SCALAR_ERROR 0x0E 108696554Sobrien#define I2O_PARAMS_STATUS_TABLE_ERROR 0x0F 108796554Sobrien#define I2O_PARAMS_STATUS_WRONG_GROUP_TYPE 0x10 108865312Smsmith 108965312Smsmith 109065312Smsmith/****************************************************************************/ 109165312Smsmith/* GROUP Parameter Groups */ 109265312Smsmith/****************************************************************************/ 109365312Smsmith 109465312Smsmith/* GROUP Configuration and Operating Structures and Defines */ 109565312Smsmith 109665312Smsmith/* Groups Numbers */ 109765312Smsmith 109896554Sobrien#define I2O_UTIL_PARAMS_DESCRIPTOR_GROUP_NO 0xF000 109996554Sobrien#define I2O_UTIL_PHYSICAL_DEVICE_TABLE_GROUP_NO 0xF001 110096554Sobrien#define I2O_UTIL_CLAIMED_TABLE_GROUP_NO 0xF002 110196554Sobrien#define I2O_UTIL_USER_TABLE_GROUP_NO 0xF003 110296551Sobrien#define I2O_UTIL_PRIVATE_MESSAGE_EXTENSIONS_GROUP_NO 0xF005 110396554Sobrien#define I2O_UTIL_AUTHORIZED_USER_TABLE_GROUP_NO 0xF006 110496554Sobrien#define I2O_UTIL_DEVICE_IDENTITY_GROUP_NO 0xF100 110596554Sobrien#define I2O_UTIL_DDM_IDENTITY_GROUP_NO 0xF101 110696554Sobrien#define I2O_UTIL_USER_INFORMATION_GROUP_NO 0xF102 110796554Sobrien#define I2O_UTIL_SGL_OPERATING_LIMITS_GROUP_NO 0xF103 110896554Sobrien#define I2O_UTIL_SENSORS_GROUP_NO 0xF200 110965312Smsmith 111065312Smsmith/* UTIL Group F000h - GROUP DESCRIPTORS Parameter Group */ 111165312Smsmith 111296551Sobrien#define I2O_UTIL_GROUP_PROPERTIES_GROUP_TABLE 0x01 111396551Sobrien#define I2O_UTIL_GROUP_PROPERTIES_ROW_ADDITION 0x02 111496551Sobrien#define I2O_UTIL_GROUP_PROPERTIES_ROW_DELETION 0x04 111596551Sobrien#define I2O_UTIL_GROUP_PROPERTIES_CLEAR_OPERATION 0x08 111665312Smsmith 111765312Smsmithtypedef struct _I2O_UTIL_GROUP_DESCRIPTOR_TABLE { 111896554Sobrien U16 GroupNumber; 111996554Sobrien U16 FieldCount; 112096554Sobrien U16 RowCount; 112196554Sobrien U8 Properties; 112296554Sobrien U8 reserved; 112365312Smsmith} I2O_UTIL_GROUP_DESCRIPTOR_TABLE, *PI2O_UTIL_GROUP_DESCRIPTOR_TABLE; 112465312Smsmith 112565312Smsmith/* UTIL Group F001h - Physical Device Table Parameter Group */ 112665312Smsmith 112765312Smsmithtypedef struct _I2O_UTIL_PHYSICAL_DEVICE_TABLE { 112896554Sobrien U32 AdapterID; 112965312Smsmith} I2O_UTIL_PHYSICAL_DEVICE_TABLE, *PI2O_UTIL_PHYSICAL_DEVICE_TABLE; 113065312Smsmith 113165312Smsmith/* UTIL Group F002h - Claimed Table Parameter Group */ 113265312Smsmith 113365312Smsmithtypedef struct _I2O_UTIL_CLAIMED_TABLE { 113496554Sobrien U16 ClaimedTID; 113565312Smsmith} I2O_UTIL_CLAIMED_TABLE, *PI2O_UTIL_CLAIMED_TABLE; 113665312Smsmith 113765312Smsmith/* UTIL Group F003h - User Table Parameter Group */ 113865312Smsmith 113965312Smsmithtypedef struct _I2O_UTIL_USER_TABLE { 114096554Sobrien U16 Instance; 114196554Sobrien U16 UserTID; 114296554Sobrien U8 ClaimType; 114396554Sobrien U8 reserved1; 114496554Sobrien U16 reserved2; 114565312Smsmith} I2O_UTIL_USER_TABLE, *PI2O_UTIL_USER_TABLE; 114665312Smsmith 114765312Smsmith/* UTIL Group F005h - Private Message Extensions Parameter Group */ 114865312Smsmith 114965312Smsmithtypedef struct _I2O_UTIL_PRIVATE_MESSAGE_EXTENSIONS_TABLE { 115096554Sobrien U16 ExtInstance; 115196554Sobrien U16 OrganizationID; 115296554Sobrien U16 XFunctionCode; 115365312Smsmith} I2O_UTIL_PRIVATE_MESSAGE_EXTENSIONS_TABLE, *PI2O_UTIL_PRIVATE_MESSAGE_EXTENSIONS_TABLE; 115465312Smsmith 115565312Smsmith/* UTIL Group F006h - Authorized User Table Parameter Group */ 115665312Smsmith 115765312Smsmithtypedef struct _I2O_UTIL_AUTHORIZED_USER_TABLE { 115896554Sobrien U16 AlternateTID; 115965312Smsmith} I2O_UTIL_AUTHORIZED_USER_TABLE, *PI2O_UTIL_AUTHORIZED_USER_TABLE; 116065312Smsmith 116165312Smsmith/* UTIL Group F100h - Device Identity Parameter Group */ 116265312Smsmith 116365312Smsmithtypedef struct _I2O_UTIL_DEVICE_IDENTITY_SCALAR { 116496554Sobrien U32 ClassID; 116596554Sobrien U16 OwnerTID; 116696554Sobrien U16 ParentTID; 116796554Sobrien U8 VendorInfo[I2O_DEVID_VENDOR_INFO_SZ]; 116896554Sobrien U8 ProductInfo[I2O_DEVID_PRODUCT_INFO_SZ]; 116996554Sobrien U8 Description[I2O_DEVID_DESCRIPTION_SZ]; 117096554Sobrien U8 ProductRevLevel[I2O_DEVID_REV_LEVEL_SZ]; 117196554Sobrien U8 SNFormat; 117296554Sobrien U8 SerialNumber[I2O_MAX_SERIAL_NUMBER_SZ]; 117365312Smsmith} I2O_UTIL_DEVICE_IDENTITY_SCALAR, *PI2O_UTIL_DEVICE_IDENTITY_SCALAR; 117465312Smsmith 117565312Smsmith/* UTIL Group F101h - DDM Identity Parameter Group */ 117665312Smsmith 117765312Smsmithtypedef struct _I2O_UTIL_DDM_IDENTITY_SCALAR { 117896554Sobrien U16 DdmTID; 117996554Sobrien U8 ModuleName[I2O_MODULE_NAME_SZ]; 118096554Sobrien U8 ModuleRevLevel[I2O_DEVID_REV_LEVEL_SZ]; 118196554Sobrien U8 SNFormat; 118296554Sobrien U8 SerialNumber[I2O_MAX_SERIAL_NUMBER_SZ]; 118365312Smsmith} I2O_UTIL_DDM_IDENTITY_SCALAR, *PI2O_UTIL_DDM_IDENTITY_SCALAR; 118465312Smsmith 118565312Smsmith/* UTIL Group F102h - User Information Parameter Group */ 118665312Smsmith 118796554Sobrien#define I2O_USER_DEVICE_NAME_SZ 64 118896554Sobrien#define I2O_USER_SERVICE_NAME_SZ 64 118996554Sobrien#define I2O_USER_PHYSICAL_LOCATION_SZ 64 119065312Smsmith 119165312Smsmithtypedef struct _I2O_UTIL_USER_INFORMATION_SCALAR { 119296554Sobrien U8 DeviceName[I2O_USER_DEVICE_NAME_SZ]; 119396554Sobrien U8 ServiceName[I2O_USER_SERVICE_NAME_SZ]; 119496554Sobrien U8 PhysicalLocation[I2O_USER_PHYSICAL_LOCATION_SZ]; 119596554Sobrien U32 InstanceNumber; 119665312Smsmith} I2O_UTIL_USER_INFORMATION_SCALAR, *PI2O_UTIL_USER_INFORMATION_SCALAR; 119765312Smsmith 119865312Smsmith/* UTIL Group F103h - SGL Operating Limits Parameter Group */ 119965312Smsmith 120065312Smsmithtypedef struct _I2O_UTIL_SGL_OPERATING_LIMITS_SCALAR { 120196554Sobrien U32 SglChainSize; 120296554Sobrien U32 SglChainSizeMax; 120396554Sobrien U32 SglChainSizeTarget; 120496554Sobrien U16 SglFragCount; 120596554Sobrien U16 SglFragCountMax; 120696554Sobrien U16 SglFragCountTarget; 120765312Smsmith} I2O_UTIL_SGL_OPERATING_LIMITS_SCALAR, *PI2O_UTIL_SGL_OPERATING_LIMITS_SCALAR; 120865312Smsmith 120965312Smsmith/* UTIL Group F200h - Sensors Parameter Group */ 121065312Smsmith 121196554Sobrien#define I2O_SENSOR_COMPONENT_OTHER 0x00 121296551Sobrien#define I2O_SENSOR_COMPONENT_PLANAR_LOGIC_BOARD 0x01 121396554Sobrien#define I2O_SENSOR_COMPONENT_CPU 0x02 121496554Sobrien#define I2O_SENSOR_COMPONENT_CHASSIS 0x03 121596554Sobrien#define I2O_SENSOR_COMPONENT_POWER_SUPPLY 0x04 121696554Sobrien#define I2O_SENSOR_COMPONENT_STORAGE 0x05 121796554Sobrien#define I2O_SENSOR_COMPONENT_EXTERNAL 0x06 121865312Smsmith 121996554Sobrien#define I2O_SENSOR_SENSOR_CLASS_ANALOG 0x00 122096554Sobrien#define I2O_SENSOR_SENSOR_CLASS_DIGITAL 0x01 122165312Smsmith 122296554Sobrien#define I2O_SENSOR_SENSOR_TYPE_OTHER 0x00 122396554Sobrien#define I2O_SENSOR_SENSOR_TYPE_THERMAL 0x01 122496554Sobrien#define I2O_SENSOR_SENSOR_TYPE_DC_VOLTAGE 0x02 122596554Sobrien#define I2O_SENSOR_SENSOR_TYPE_AC_VOLTAGE 0x03 122696554Sobrien#define I2O_SENSOR_SENSOR_TYPE_DC_CURRENT 0x04 122796554Sobrien#define I2O_SENSOR_SENSOR_TYPE_AC_CURRENT 0x05 122896554Sobrien#define I2O_SENSOR_SENSOR_TYPE_DOOR_OPEN 0x06 122996551Sobrien#define I2O_SENSOR_SENSOR_TYPE_FAN_OPERATIONAL 0x07 123065312Smsmith 123196554Sobrien#define I2O_SENSOR_SENSOR_STATE_NORMAL 0x00 123296554Sobrien#define I2O_SENSOR_SENSOR_STATE_ABNORMAL 0x01 123396554Sobrien#define I2O_SENSOR_SENSOR_STATE_UNKNOWN 0x02 123496554Sobrien#define I2O_SENSOR_SENSOR_STATE_LOW_CAT 0x03 123596554Sobrien#define I2O_SENSOR_SENSOR_STATE_LOW 0x04 123696554Sobrien#define I2O_SENSOR_SENSOR_STATE_LOW_WARNING 0x05 123796554Sobrien#define I2O_SENSOR_SENSOR_STATE_HIGH_WARNING 0x06 123896554Sobrien#define I2O_SENSOR_SENSOR_STATE_HIGH 0x07 123996554Sobrien#define I2O_SENSOR_SENSOR_STATE_HIGH_CAT 0x08 124065312Smsmith 124196554Sobrien#define I2O_SENSOR_EVENT_ENABLE_STATE_CHANGE 0x0001 124296551Sobrien#define I2O_SENSOR_EVENT_ENABLE_LOW_CATASTROPHIC 0x0002 124396554Sobrien#define I2O_SENSOR_EVENT_ENABLE_LOW_READING 0x0004 124496554Sobrien#define I2O_SENSOR_EVENT_ENABLE_LOW_WARNING 0x0008 124596551Sobrien#define I2O_SENSOR_EVENT_ENABLE_CHANGE_TO_NORMAL 0x0010 124696554Sobrien#define I2O_SENSOR_EVENT_ENABLE_HIGH_WARNING 0x0020 124796554Sobrien#define I2O_SENSOR_EVENT_ENABLE_HIGH_READING 0x0040 124896551Sobrien#define I2O_SENSOR_EVENT_ENABLE_HIGH_CATASTROPHIC 0x0080 124965312Smsmith 125065312Smsmith 125165312Smsmithtypedef struct _I2O_UTIL_SENSORS_TABLE { 125296554Sobrien U16 SensorInstance; 125396554Sobrien U8 Component; 125496554Sobrien U16 ComponentInstance; 125596554Sobrien U8 SensorClass; 125696554Sobrien U8 SensorType; 125796554Sobrien S8 ScalingExponent; 125896554Sobrien S32 ActualReading; 125996554Sobrien S32 MinimumReading; 126096554Sobrien S32 Low2LowCatThreshold; 126196554Sobrien S32 LowCat2LowThreshold; 126296554Sobrien S32 LowWarn2LowThreshold; 126396554Sobrien S32 Low2LowWarnThreshold; 126496554Sobrien S32 Norm2LowWarnThreshold; 126596554Sobrien S32 LowWarn2NormThreshold; 126696554Sobrien S32 NominalReading; 126796554Sobrien S32 HiWarn2NormThreshold; 126896554Sobrien S32 Norm2HiWarnThreshold; 126996554Sobrien S32 High2HiWarnThreshold; 127096554Sobrien S32 HiWarn2HighThreshold; 127196554Sobrien S32 HiCat2HighThreshold; 127296554Sobrien S32 Hi2HiCatThreshold; 127396554Sobrien S32 MaximumReading; 127496554Sobrien U8 SensorState; 127596554Sobrien U16 EventEnable; 127665312Smsmith} I2O_UTIL_SENSORS_TABLE, *PI2O_UTIL_SENSORS_TABLE; 127765312Smsmith 127865312Smsmith 127965312SmsmithPRAGMA_PACK_POP 128065312Smsmith 128165312SmsmithPRAGMA_ALIGN_POP 128265312Smsmith 128396554Sobrien#endif /* I2O_MESSAGE_HDR */ 1284