linux/drivers/message/fusion/lsi/mpi_sas.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 *  Copyright (c) 2004-2008 LSI Corporation.
 *
 *
 *           Name:  mpi_sas.h
 *          Title:  MPI Serial Attached SCSI structures and definitions
 *  Creation Date:  August 19, 2004
 *
 *    mpi_sas.h Version:  01.05.05
 *
 *  Version History
 *  ---------------
 *
 *  Date      Version   Description
 *  --------  --------  ------------------------------------------------------
 *  08-19-04  01.05.01  Original release.
 *  08-30-05  01.05.02  Added DeviceInfo bit for SEP.
 *                      Added PrimFlags and Primitive field to SAS IO Unit
 *                      Control request, and added a new operation code.
 *  03-27-06  01.05.03  Added Force Full Discovery, Transmit Port Select Signal,
 *                      and Remove Device operations to SAS IO Unit Control.
 *                      Added DevHandle field to SAS IO Unit Control request and
 *                      reply.
 *  10-11-06  01.05.04  Fixed the name of a define for Operation field of SAS IO
 *                      Unit Control request.
 *  01-15-08  01.05.05  Added support for MPI_SAS_OP_SET_IOC_PARAMETER,
 *                      including adding IOCParameter and IOCParameter value
 *                      fields to SAS IO Unit Control Request.
 *                      Added MPI_SAS_DEVICE_INFO_PRODUCT_SPECIFIC define.
 *  --------------------------------------------------------------------------
 */

#ifndef MPI_SAS_H
#define MPI_SAS_H


/*
 * Values for SASStatus.
 */
#define MPI_SASSTATUS_SUCCESS
#define MPI_SASSTATUS_UNKNOWN_ERROR
#define MPI_SASSTATUS_INVALID_FRAME
#define MPI_SASSTATUS_UTC_BAD_DEST
#define MPI_SASSTATUS_UTC_BREAK_RECEIVED
#define MPI_SASSTATUS_UTC_CONNECT_RATE_NOT_SUPPORTED
#define MPI_SASSTATUS_UTC_PORT_LAYER_REQUEST
#define MPI_SASSTATUS_UTC_PROTOCOL_NOT_SUPPORTED
#define MPI_SASSTATUS_UTC_STP_RESOURCES_BUSY
#define MPI_SASSTATUS_UTC_WRONG_DESTINATION
#define MPI_SASSTATUS_SHORT_INFORMATION_UNIT
#define MPI_SASSTATUS_LONG_INFORMATION_UNIT
#define MPI_SASSTATUS_XFER_RDY_INCORRECT_WRITE_DATA
#define MPI_SASSTATUS_XFER_RDY_REQUEST_OFFSET_ERROR
#define MPI_SASSTATUS_XFER_RDY_NOT_EXPECTED
#define MPI_SASSTATUS_DATA_INCORRECT_DATA_LENGTH
#define MPI_SASSTATUS_DATA_TOO_MUCH_READ_DATA
#define MPI_SASSTATUS_DATA_OFFSET_ERROR
#define MPI_SASSTATUS_SDSF_NAK_RECEIVED
#define MPI_SASSTATUS_SDSF_CONNECTION_FAILED
#define MPI_SASSTATUS_INITIATOR_RESPONSE_TIMEOUT


/*
 * Values for the SAS DeviceInfo field used in SAS Device Status Change Event
 * data and SAS IO Unit Configuration pages.
 */
#define MPI_SAS_DEVICE_INFO_PRODUCT_SPECIFIC

#define MPI_SAS_DEVICE_INFO_SEP
#define MPI_SAS_DEVICE_INFO_ATAPI_DEVICE
#define MPI_SAS_DEVICE_INFO_LSI_DEVICE
#define MPI_SAS_DEVICE_INFO_DIRECT_ATTACH
#define MPI_SAS_DEVICE_INFO_SSP_TARGET
#define MPI_SAS_DEVICE_INFO_STP_TARGET
#define MPI_SAS_DEVICE_INFO_SMP_TARGET
#define MPI_SAS_DEVICE_INFO_SATA_DEVICE
#define MPI_SAS_DEVICE_INFO_SSP_INITIATOR
#define MPI_SAS_DEVICE_INFO_STP_INITIATOR
#define MPI_SAS_DEVICE_INFO_SMP_INITIATOR
#define MPI_SAS_DEVICE_INFO_SATA_HOST

#define MPI_SAS_DEVICE_INFO_MASK_DEVICE_TYPE
#define MPI_SAS_DEVICE_INFO_NO_DEVICE
#define MPI_SAS_DEVICE_INFO_END_DEVICE
#define MPI_SAS_DEVICE_INFO_EDGE_EXPANDER
#define MPI_SAS_DEVICE_INFO_FANOUT_EXPANDER



/*****************************************************************************
*
*        S e r i a l    A t t a c h e d    S C S I     M e s s a g e s
*
*****************************************************************************/

/****************************************************************************/
/* Serial Management Protocol Passthrough Request                           */
/****************************************************************************/

pSmpPassthroughRequest_t;

/* values for PassthroughFlags field */
#define MPI_SMP_PT_REQ_PT_FLAGS_IMMEDIATE

/* values for ConnectionRate field */
#define MPI_SMP_PT_REQ_CONNECT_RATE_NEGOTIATED
#define MPI_SMP_PT_REQ_CONNECT_RATE_1_5
#define MPI_SMP_PT_REQ_CONNECT_RATE_3_0


/* Serial Management Protocol Passthrough Reply */
pSmpPassthroughReply_t;

#define MPI_SMP_PT_REPLY_PT_FLAGS_IMMEDIATE


/****************************************************************************/
/* SATA Passthrough Request                                                 */
/****************************************************************************/

pSataPassthroughRequest_t;

/* values for PassthroughFlags field */
#define MPI_SATA_PT_REQ_PT_FLAGS_RESET_DEVICE
#define MPI_SATA_PT_REQ_PT_FLAGS_EXECUTE_DIAG
#define MPI_SATA_PT_REQ_PT_FLAGS_DMA_QUEUED
#define MPI_SATA_PT_REQ_PT_FLAGS_PACKET_COMMAND
#define MPI_SATA_PT_REQ_PT_FLAGS_DMA
#define MPI_SATA_PT_REQ_PT_FLAGS_PIO
#define MPI_SATA_PT_REQ_PT_FLAGS_UNSPECIFIED_VU
#define MPI_SATA_PT_REQ_PT_FLAGS_WRITE
#define MPI_SATA_PT_REQ_PT_FLAGS_READ

/* values for ConnectionRate field */
#define MPI_SATA_PT_REQ_CONNECT_RATE_NEGOTIATED
#define MPI_SATA_PT_REQ_CONNECT_RATE_1_5
#define MPI_SATA_PT_REQ_CONNECT_RATE_3_0


/* SATA Passthrough Reply */
pSataPassthroughReply_t;




/****************************************************************************/
/* SAS IO Unit Control Request                                              */
/****************************************************************************/

pSasIoUnitControlRequest_t;

/* values for the Operation field */
#define MPI_SAS_OP_CLEAR_NOT_PRESENT
#define MPI_SAS_OP_CLEAR_ALL_PERSISTENT
#define MPI_SAS_OP_PHY_LINK_RESET
#define MPI_SAS_OP_PHY_HARD_RESET
#define MPI_SAS_OP_PHY_CLEAR_ERROR_LOG
#define MPI_SAS_OP_MAP_CURRENT
#define MPI_SAS_OP_SEND_PRIMITIVE
#define MPI_SAS_OP_FORCE_FULL_DISCOVERY
#define MPI_SAS_OP_TRANSMIT_PORT_SELECT_SIGNAL
#define MPI_SAS_OP_TRANSMIT_REMOVE_DEVICE
#define MPI_SAS_OP_REMOVE_DEVICE
#define MPI_SAS_OP_SET_IOC_PARAMETER
#define MPI_SAS_OP_PRODUCT_SPECIFIC_MIN

/* values for the PrimFlags field */
#define MPI_SAS_PRIMFLAGS_SINGLE
#define MPI_SAS_PRIMFLAGS_TRIPLE
#define MPI_SAS_PRIMFLAGS_REDUNDANT


/* SAS IO Unit Control Reply */
pSasIoUnitControlReply_t;

#endif