1265236Sken/*- 2283990Sslm * Copyright (c) 2012-2015 LSI Corp. 3283990Sslm * Copyright (c) 2013-2015 Avago Technologies 4265236Sken * All rights reserved. 5265236Sken * 6265236Sken * Redistribution and use in source and binary forms, with or without 7265236Sken * modification, are permitted provided that the following conditions 8265236Sken * are met: 9265236Sken * 1. Redistributions of source code must retain the above copyright 10265236Sken * notice, this list of conditions and the following disclaimer. 11265236Sken * 2. Redistributions in binary form must reproduce the above copyright 12265236Sken * notice, this list of conditions and the following disclaimer in the 13265236Sken * documentation and/or other materials provided with the distribution. 14265236Sken * 3. Neither the name of the author nor the names of any co-contributors 15265236Sken * may be used to endorse or promote products derived from this software 16265236Sken * without specific prior written permission. 17265236Sken * 18265236Sken * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 19265236Sken * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20265236Sken * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21265236Sken * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 22265236Sken * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23265236Sken * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24265236Sken * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25265236Sken * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26265236Sken * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27265236Sken * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28265236Sken * SUCH DAMAGE. 29265236Sken * 30283990Sslm * Avago Technologies (LSI) MPT-Fusion Host Adapter FreeBSD 31265236Sken * 32265236Sken * $FreeBSD: releng/10.2/sys/dev/mpr/mpi/mpi2_hbd.h 283990 2015-06-04 16:27:18Z slm $ 33265236Sken */ 34265236Sken 35265236Sken/* 36283990Sslm * Copyright (c) 2009-2015 LSI Corporation. 37283990Sslm * Copyright (c) 2013-2015 Avago Technologies 38265236Sken * 39265236Sken * 40265236Sken * Name: mpi2_hbd.h 41265236Sken * Title: MPI Host Based Discovery messages and structures 42265236Sken * Creation Date: October 21, 2009 43265236Sken * 44265236Sken * mpi2_hbd.h Version: 02.00.02 45265236Sken * 46265236Sken * NOTE: Names (typedefs, defines, etc.) beginning with an MPI25 or Mpi25 47265236Sken * prefix are for use only on MPI v2.5 products, and must not be used 48265236Sken * with MPI v2.0 products. Unless otherwise noted, names beginning with 49265236Sken * MPI2 or Mpi2 are for use with both MPI v2.0 and MPI v2.5 products. 50265236Sken * 51265236Sken * Version History 52265236Sken * --------------- 53265236Sken * 54265236Sken * Date Version Description 55265236Sken * -------- -------- ------------------------------------------------------ 56265236Sken * 10-28-09 02.00.00 Initial version. 57265236Sken * 08-11-10 02.00.01 Removed PortGroups, DmaGroup, and ControlGroup from 58265236Sken * HBD Action request, replaced by AdditionalInfo field. 59265236Sken * 11-18-11 02.00.02 Incorporating additions for MPI v2.5. 60265236Sken * -------------------------------------------------------------------------- 61265236Sken */ 62265236Sken 63265236Sken#ifndef MPI2_HBD_H 64265236Sken#define MPI2_HBD_H 65265236Sken 66265236Sken/**************************************************************************** 67265236Sken* Host Based Discovery Action messages 68265236Sken****************************************************************************/ 69265236Sken 70265236Sken/* Host Based Discovery Action Request Message */ 71265236Skentypedef struct _MPI2_HBD_ACTION_REQUEST 72265236Sken{ 73265236Sken U8 Operation; /* 0x00 */ 74265236Sken U8 Reserved1; /* 0x01 */ 75265236Sken U8 ChainOffset; /* 0x02 */ 76265236Sken U8 Function; /* 0x03 */ 77265236Sken U16 DevHandle; /* 0x04 */ 78265236Sken U8 Reserved2; /* 0x06 */ 79265236Sken U8 MsgFlags; /* 0x07 */ 80265236Sken U8 VP_ID; /* 0x08 */ 81265236Sken U8 VF_ID; /* 0x09 */ 82265236Sken U16 Reserved3; /* 0x0A */ 83265236Sken U32 Reserved4; /* 0x0C */ 84265236Sken U64 SASAddress; /* 0x10 */ 85265236Sken U32 Reserved5; /* 0x18 */ 86265236Sken U32 HbdDeviceInfo; /* 0x1C */ 87265236Sken U16 ParentDevHandle; /* 0x20 */ 88265236Sken U16 MaxQDepth; /* 0x22 */ 89265236Sken U8 FirstPhyIdentifier; /* 0x24 */ 90265236Sken U8 Port; /* 0x25 */ 91265236Sken U8 MaxConnections; /* 0x26 */ 92265236Sken U8 MaxRate; /* 0x27 */ 93265236Sken U32 AdditionalInfo; /* 0x28 */ 94265236Sken U16 InitialAWT; /* 0x2C */ 95265236Sken U16 Reserved7; /* 0x2E */ 96265236Sken U32 Reserved8; /* 0x30 */ 97265236Sken} MPI2_HBD_ACTION_REQUEST, MPI2_POINTER PTR_MPI2_HBD_ACTION_REQUEST, 98265236Sken Mpi2HbdActionRequest_t, MPI2_POINTER pMpi2HbdActionRequest_t; 99265236Sken 100265236Sken/* values for the Operation field */ 101265236Sken#define MPI2_HBD_OP_ADD_DEVICE (0x01) 102265236Sken#define MPI2_HBD_OP_REMOVE_DEVICE (0x02) 103265236Sken#define MPI2_HBD_OP_UPDATE_DEVICE (0x03) 104265236Sken 105265236Sken/* values for the HbdDeviceInfo field */ 106265236Sken#define MPI2_HBD_DEVICE_INFO_VIRTUAL_DEVICE (0x00004000) 107265236Sken#define MPI2_HBD_DEVICE_INFO_ATAPI_DEVICE (0x00002000) 108265236Sken#define MPI2_HBD_DEVICE_INFO_DIRECT_ATTACH (0x00000800) 109265236Sken#define MPI2_HBD_DEVICE_INFO_SSP_TARGET (0x00000400) 110265236Sken#define MPI2_HBD_DEVICE_INFO_STP_TARGET (0x00000200) 111265236Sken#define MPI2_HBD_DEVICE_INFO_SMP_TARGET (0x00000100) 112265236Sken#define MPI2_HBD_DEVICE_INFO_SATA_DEVICE (0x00000080) 113265236Sken#define MPI2_HBD_DEVICE_INFO_SSP_INITIATOR (0x00000040) 114265236Sken#define MPI2_HBD_DEVICE_INFO_STP_INITIATOR (0x00000020) 115265236Sken#define MPI2_HBD_DEVICE_INFO_SMP_INITIATOR (0x00000010) 116265236Sken#define MPI2_HBD_DEVICE_INFO_SATA_HOST (0x00000008) 117265236Sken 118265236Sken#define MPI2_HBD_DEVICE_INFO_MASK_DEVICE_TYPE (0x00000007) 119265236Sken#define MPI2_HBD_DEVICE_INFO_NO_DEVICE (0x00000000) 120265236Sken#define MPI2_HBD_DEVICE_INFO_END_DEVICE (0x00000001) 121265236Sken#define MPI2_HBD_DEVICE_INFO_EDGE_EXPANDER (0x00000002) 122265236Sken#define MPI2_HBD_DEVICE_INFO_FANOUT_EXPANDER (0x00000003) 123265236Sken 124265236Sken/* values for the MaxRate field */ 125265236Sken#define MPI2_HBD_MAX_RATE_MASK (0x0F) 126265236Sken#define MPI2_HBD_MAX_RATE_1_5 (0x08) 127265236Sken#define MPI2_HBD_MAX_RATE_3_0 (0x09) 128265236Sken#define MPI2_HBD_MAX_RATE_6_0 (0x0A) 129265236Sken#define MPI25_HBD_MAX_RATE_12_0 (0x0B) 130265236Sken 131265236Sken 132265236Sken/* Host Based Discovery Action Reply Message */ 133265236Skentypedef struct _MPI2_HBD_ACTION_REPLY 134265236Sken{ 135265236Sken U8 Operation; /* 0x00 */ 136265236Sken U8 Reserved1; /* 0x01 */ 137265236Sken U8 MsgLength; /* 0x02 */ 138265236Sken U8 Function; /* 0x03 */ 139265236Sken U16 DevHandle; /* 0x04 */ 140265236Sken U8 Reserved2; /* 0x06 */ 141265236Sken U8 MsgFlags; /* 0x07 */ 142265236Sken U8 VP_ID; /* 0x08 */ 143265236Sken U8 VF_ID; /* 0x09 */ 144265236Sken U16 Reserved3; /* 0x0A */ 145265236Sken U16 Reserved4; /* 0x0C */ 146265236Sken U16 IOCStatus; /* 0x0E */ 147265236Sken U32 IOCLogInfo; /* 0x10 */ 148265236Sken} MPI2_HBD_ACTION_REPLY, MPI2_POINTER PTR_MPI2_HBD_ACTION_REPLY, 149265236Sken Mpi2HbdActionReply_t, MPI2_POINTER pMpi2HbdActionReply_t; 150265236Sken 151265236Sken 152265236Sken#endif 153265236Sken 154265236Sken 155