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

/* SPDX-License-Identifier: GPL-2.0 */
/***************************************************************************
 *                                                                         *
 *  Copyright (c) 2000-2008 LSI Corporation.  All rights reserved.         *
 *                                                                         *
 * Description                                                             *
 * ------------                                                            *
 * This include file contains SAS firmware interface IOC Log Info codes    *
 *                                                                         *
 *-------------------------------------------------------------------------*
 */

#ifndef IOPI_IOCLOGINFO_H_INCLUDED
#define IOPI_IOCLOGINFO_H_INCLUDED

#define SAS_LOGINFO_NEXUS_LOSS
#define SAS_LOGINFO_MASK

/****************************************************************************/
/*  IOC LOGINFO defines, 0x00000000 - 0x0FFFFFFF                            */
/*  Format:                                                                 */
/*      Bits 31-28: MPI_IOCLOGINFO_TYPE_SAS (3)                             */
/*      Bits 27-24: IOC_LOGINFO_ORIGINATOR: 0=IOP, 1=PL, 2=IR               */
/*      Bits 23-16: LOGINFO_CODE                                            */
/*      Bits 15-0:  LOGINFO_CODE Specific                                   */
/****************************************************************************/

/****************************************************************************/
/* IOC_LOGINFO_ORIGINATOR defines                                           */
/****************************************************************************/
#define IOC_LOGINFO_ORIGINATOR_IOP
#define IOC_LOGINFO_ORIGINATOR_PL
#define IOC_LOGINFO_ORIGINATOR_IR

#define IOC_LOGINFO_ORIGINATOR_MASK

/****************************************************************************/
/* LOGINFO_CODE defines                                                     */
/****************************************************************************/
#define IOC_LOGINFO_CODE_MASK
#define IOC_LOGINFO_CODE_SHIFT

/****************************************************************************/
/* IOP LOGINFO_CODE defines, valid if IOC_LOGINFO_ORIGINATOR = IOP          */
/****************************************************************************/
#define IOP_LOGINFO_CODE_INVALID_SAS_ADDRESS
#define IOP_LOGINFO_CODE_UNUSED2
#define IOP_LOGINFO_CODE_CONFIG_INVALID_PAGE
#define IOP_LOGINFO_CODE_CONFIG_INVALID_PAGE_RT
#define IOP_LOGINFO_CODE_CONFIG_INVALID_PAGE_PN
#define IOP_LOGINFO_CODE_CONFIG_INVALID_PAGE_FORM
#define IOP_LOGINFO_CODE_CONFIG_INVALID_PAGE_PT
#define IOP_LOGINFO_CODE_CONFIG_INVALID_PAGE_DNM
#define IOP_LOGINFO_CODE_CONFIG_INVALID_PAGE_PERSIST
#define IOP_LOGINFO_CODE_CONFIG_INVALID_PAGE_DEFAULT

#define IOP_LOGINFO_CODE_FWUPLOAD_NO_FLASH_AVAILABLE
#define IOP_LOGINFO_CODE_FWUPLOAD_UNKNOWN_IMAGE_TYPE
#define IOP_LOGINFO_CODE_FWUPLOAD_WRONG_IMAGE_SIZE
#define IOP_LOGINFO_CODE_FWUPLOAD_ENTIRE_FLASH_UPLOAD_FAILED
#define IOP_LOGINFO_CODE_FWUPLOAD_REGION_UPLOAD_FAILED
#define IOP_LOGINFO_CODE_FWUPLOAD_DMA_FAILURE

#define IOP_LOGINFO_CODE_DIAG_MSG_ERROR

#define IOP_LOGINFO_CODE_TASK_TERMINATED

#define IOP_LOGINFO_CODE_ENCL_MGMT_READ_ACTION_ERR0R
#define IOP_LOGINFO_CODE_ENCL_MGMT_INVALID_BUS_ID_ERR0R

#define IOP_LOGINFO_CODE_TARGET_ASSIST_TERMINATED
#define IOP_LOGINFO_CODE_TARGET_STATUS_SEND_TERMINATED
#define IOP_LOGINFO_CODE_TARGET_MODE_ABORT_ALL_IO
#define IOP_LOGINFO_CODE_TARGET_MODE_ABORT_EXACT_IO
#define IOP_LOGINFO_CODE_TARGET_MODE_ABORT_EXACT_IO_REQ

#define IOP_LOGINFO_CODE_LOG_TIMESTAMP_EVENT

/****************************************************************************/
/* PL LOGINFO_CODE defines, valid if IOC_LOGINFO_ORIGINATOR = PL            */
/****************************************************************************/
#define PL_LOGINFO_CODE_OPEN_FAILURE

#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_NO_DEST_TIME_OUT
#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_PATHWAY_BLOCKED
#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_RES_CONTINUE0
#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_RES_CONTINUE1
#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_RES_INITIALIZE0
#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_RES_INITIALIZE1
#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_RES_STOP0
#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_RES_STOP1
#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_RETRY
#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_BREAK
#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_UNUSED_0B
#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_OPEN_TIMEOUT_EXP
#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_UNUSED_0D
#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_DVTBLE_ACCSS_FAIL
#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_BAD_DEST
#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_RATE_NOT_SUPP
#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_PROT_NOT_SUPP
#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_RESERVED_ABANDON0
#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_RESERVED_ABANDON1
#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_RESERVED_ABANDON2
#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_RESERVED_ABANDON3
#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_STP_RESOURCES_BSY
#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_WRONG_DESTINATION

#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_PATH_BLOCKED
#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_AWT_MAXED



#define PL_LOGINFO_CODE_INVALID_SGL
#define PL_LOGINFO_CODE_WRONG_REL_OFF_OR_FRAME_LENGTH
#define PL_LOGINFO_CODE_FRAME_XFER_ERROR
#define PL_LOGINFO_CODE_TX_FM_CONNECTED_LOW
#define PL_LOGINFO_CODE_SATA_NON_NCQ_RW_ERR_BIT_SET
#define PL_LOGINFO_CODE_SATA_READ_LOG_RECEIVE_DATA_ERR
#define PL_LOGINFO_CODE_SATA_NCQ_FAIL_ALL_CMDS_AFTR_ERR
#define PL_LOGINFO_CODE_SATA_ERR_IN_RCV_SET_DEV_BIT_FIS
#define PL_LOGINFO_CODE_RX_FM_INVALID_MESSAGE
#define PL_LOGINFO_CODE_RX_CTX_MESSAGE_VALID_ERROR
#define PL_LOGINFO_CODE_RX_FM_CURRENT_FRAME_ERROR
#define PL_LOGINFO_CODE_SATA_LINK_DOWN
#define PL_LOGINFO_CODE_DISCOVERY_SATA_INIT_W_IOS
#define PL_LOGINFO_CODE_CONFIG_INVALID_PAGE
#define PL_LOGINFO_CODE_CONFIG_PL_NOT_INITIALIZED
#define PL_LOGINFO_CODE_CONFIG_INVALID_PAGE_PT
#define PL_LOGINFO_CODE_CONFIG_INVALID_PAGE_NUM_PHYS
#define PL_LOGINFO_CODE_CONFIG_INVALID_PAGE_NOT_IMP
#define PL_LOGINFO_CODE_CONFIG_INVALID_PAGE_NO_DEV
#define PL_LOGINFO_CODE_CONFIG_INVALID_PAGE_FORM
#define PL_LOGINFO_CODE_CONFIG_INVALID_PAGE_PHY
#define PL_LOGINFO_CODE_CONFIG_INVALID_PAGE_NO_OWNER
#define PL_LOGINFO_CODE_DSCVRY_SATA_INIT_TIMEOUT
#define PL_LOGINFO_CODE_RESET
#define PL_LOGINFO_CODE_ABORT
#define PL_LOGINFO_CODE_IO_NOT_YET_EXECUTED
#define PL_LOGINFO_CODE_IO_EXECUTED
#define PL_LOGINFO_CODE_PERS_RESV_OUT_NOT_AFFIL_OWNER
#define PL_LOGINFO_CODE_OPEN_TXDMA_ABORT
#define PL_LOGINFO_CODE_IO_DEVICE_MISSING_DELAY_RETRY
#define PL_LOGINFO_CODE_IO_CANCELLED_DUE_TO_R_ERR
#define PL_LOGINFO_SUB_CODE_OPEN_FAILURE
#define PL_LOGINFO_SUB_CODE_OPEN_FAILURE_NO_DEST_TIMEOUT
#define PL_LOGINFO_SUB_CODE_OPEN_FAILURE_SATA_NEG_RATE_2HI
#define PL_LOGINFO_SUB_CODE_OPEN_FAILURE_RATE_NOT_SUPPORTED
#define PL_LOGINFO_SUB_CODE_OPEN_FAILURE_BREAK
#define PL_LOGINFO_SUB_CODE_OPEN_FAILURE_ZONE_VIOLATION
#define PL_LOGINFO_SUB_CODE_OPEN_FAILURE_ABANDON0
#define PL_LOGINFO_SUB_CODE_OPEN_FAILURE_ABANDON1
#define PL_LOGINFO_SUB_CODE_OPEN_FAILURE_ABANDON2
#define PL_LOGINFO_SUB_CODE_OPEN_FAILURE_ABANDON3
#define PL_LOGINFO_SUB_CODE_OPEN_FAILURE_ORR_TIMEOUT
#define PL_LOGINFO_SUB_CODE_OPEN_FAILURE_PATH_BLOCKED
#define PL_LOGINFO_SUB_CODE_OPEN_FAILURE_AWT_MAXED

#define PL_LOGINFO_SUB_CODE_TARGET_BUS_RESET
#define PL_LOGINFO_SUB_CODE_TRANSPORT_LAYER
#define PL_LOGINFO_SUB_CODE_PORT_LAYER


#define PL_LOGINFO_SUB_CODE_INVALID_SGL
#define PL_LOGINFO_SUB_CODE_WRONG_REL_OFF_OR_FRAME_LENGTH
#define PL_LOGINFO_SUB_CODE_FRAME_XFER_ERROR
/* Bits 0-3 encode Transport Status Register (offset 0x08) */
/* Bit 0 is Status Bit 0: FrameXferErr */
/* Bit 1 & 2 are Status Bits 16 and 17: FrameXmitErrStatus */
/* Bit 3 is Status Bit 18 WriteDataLenghtGTDataLengthErr */

#define PL_LOGINFO_SUB_CODE_TX_FM_CONNECTED_LOW
#define PL_LOGINFO_SUB_CODE_SATA_NON_NCQ_RW_ERR_BIT_SET
#define PL_LOGINFO_SUB_CODE_SATA_READ_LOG_RECEIVE_DATA_ERR
#define PL_LOGINFO_SUB_CODE_SATA_NCQ_FAIL_ALL_CMDS_AFTR_ERR
#define PL_LOGINFO_SUB_CODE_SATA_ERR_IN_RCV_SET_DEV_BIT_FIS
#define PL_LOGINFO_SUB_CODE_RX_FM_INVALID_MESSAGE
#define PL_LOGINFO_SUB_CODE_RX_CTX_MESSAGE_VALID_ERROR
#define PL_LOGINFO_SUB_CODE_RX_FM_CURRENT_FRAME_ERROR
#define PL_LOGINFO_SUB_CODE_SATA_LINK_DOWN
#define PL_LOGINFO_SUB_CODE_DISCOVERY_SATA_INIT_W_IOS
#define PL_LOGINFO_SUB_CODE_DISCOVERY_REMOTE_SEP_RESET
#define PL_LOGINFO_SUB_CODE_SECOND_OPEN
#define PL_LOGINFO_SUB_CODE_DSCVRY_SATA_INIT_TIMEOUT
#define PL_LOGINFO_SUB_CODE_BREAK_ON_SATA_CONNECTION
/* not currently used in mainline */
#define PL_LOGINFO_SUB_CODE_BREAK_ON_STUCK_LINK
#define PL_LOGINFO_SUB_CODE_BREAK_ON_STUCK_LINK_AIP
#define PL_LOGINFO_SUB_CODE_BREAK_ON_INCOMPLETE_BREAK_RCVD

#define PL_LOGINFO_CODE_ENCL_MGMT_SMP_FRAME_FAILURE
#define PL_LOGINFO_CODE_ENCL_MGMT_SMP_READ_ERROR
#define PL_LOGINFO_CODE_ENCL_MGMT_SMP_WRITE_ERROR
#define PL_LOGINFO_CODE_ENCL_MGMT_NOT_SUPPORTED_ON_ENCL
#define PL_LOGINFO_CODE_ENCL_MGMT_ADDR_MODE_NOT_SUPPORTED
#define PL_LOGINFO_CODE_ENCL_MGMT_BAD_SLOT_NUM
#define PL_LOGINFO_CODE_ENCL_MGMT_SGPIO_NOT_PRESENT
#define PL_LOGINFO_CODE_ENCL_MGMT_GPIO_NOT_CONFIGURED
#define PL_LOGINFO_CODE_ENCL_MGMT_GPIO_FRAME_ERROR
#define PL_LOGINFO_CODE_ENCL_MGMT_GPIO_CONFIG_PAGE_ERROR
#define PL_LOGINFO_CODE_ENCL_MGMT_SES_FRAME_ALLOC_ERROR
#define PL_LOGINFO_CODE_ENCL_MGMT_SES_IO_ERROR
#define PL_LOGINFO_CODE_ENCL_MGMT_SES_RETRIES_EXHAUSTED
#define PL_LOGINFO_CODE_ENCL_MGMT_SMP_FRAME_ALLOC_ERROR

#define PL_LOGINFO_DA_SEP_NOT_PRESENT
#define PL_LOGINFO_DA_SEP_SINGLE_THREAD_ERROR
#define PL_LOGINFO_DA_SEP_ISTWI_INTR_IN_IDLE_STATE
#define PL_LOGINFO_DA_SEP_RECEIVED_NACK_FROM_SLAVE
#define PL_LOGINFO_DA_SEP_DID_NOT_RECEIVE_ACK
#define PL_LOGINFO_DA_SEP_BAD_STATUS_HDR_CHKSUM
#define PL_LOGINFO_DA_SEP_STOP_ON_DATA
#define PL_LOGINFO_DA_SEP_STOP_ON_SENSE_DATA
#define PL_LOGINFO_DA_SEP_UNSUPPORTED_SCSI_STATUS_1
#define PL_LOGINFO_DA_SEP_UNSUPPORTED_SCSI_STATUS_2
#define PL_LOGINFO_DA_SEP_CHKSUM_ERROR_AFTER_STOP
#define PL_LOGINFO_DA_SEP_CHKSUM_ERROR_AFTER_STOP_GETDATA
#define PL_LOGINFO_DA_SEP_UNSUPPORTED_COMMAND
#define PL_LOGINFO_DA_SEP_UNSUPPORTED_COMMAND_2
#define PL_LOGINFO_DA_SEP_UNSUPPORTED_COMMAND_3


/****************************************************************************/
/* IR LOGINFO_CODE defines, valid if IOC_LOGINFO_ORIGINATOR = IR            */
/****************************************************************************/
#define IR_LOGINFO_RAID_ACTION_ERROR
#define IR_LOGINFO_CODE_UNUSED2

/* Amount of information passed down for Create Volume is too large */
#define IR_LOGINFO_VOLUME_CREATE_INVALID_LENGTH
/* Creation of duplicate volume attempted (Bus/Target ID checked) */
#define IR_LOGINFO_VOLUME_CREATE_DUPLICATE
/* Creation failed due to maximum number of supported volumes exceeded */
#define IR_LOGINFO_VOLUME_CREATE_NO_SLOTS
/* Creation failed due to DMA error in trying to read from host */
#define IR_LOGINFO_VOLUME_CREATE_DMA_ERROR
/* Creation failed due to invalid volume type passed down */
#define IR_LOGINFO_VOLUME_CREATE_INVALID_VOLUME_TYPE
/* Creation failed due to error reading MFG Page 4 */
#define IR_LOGINFO_VOLUME_MFG_PAGE4_ERROR
/* Creation failed when trying to create internal structures */
#define IR_LOGINFO_VOLUME_INTERNAL_CONFIG_STRUCTURE_ERROR

/* Activation failed due to trying to activate an already active volume */
#define IR_LOGINFO_VOLUME_ACTIVATING_AN_ACTIVE_VOLUME
/* Activation failed due to trying to active unsupported volume type  */
#define IR_LOGINFO_VOLUME_ACTIVATING_INVALID_VOLUME_TYPE
/* Activation failed due to trying to active too many volumes  */
#define IR_LOGINFO_VOLUME_ACTIVATING_TOO_MANY_VOLUMES
/* Activation failed due to Volume ID in use already */
#define IR_LOGINFO_VOLUME_ACTIVATING_VOLUME_ID_IN_USE
/* Activation failed call to activateVolume returned failure */
#define IR_LOGINFO_VOLUME_ACTIVATE_VOLUME_FAILED
/* Activation failed trying to import the volume */
#define IR_LOGINFO_VOLUME_ACTIVATING_IMPORT_VOLUME_FAILED
/* Activation failed trying to import the volume */
#define IR_LOGINFO_VOLUME_ACTIVATING_TOO_MANY_PHYS_DISKS

/* Phys Disk failed, too many phys disks */
#define IR_LOGINFO_PHYSDISK_CREATE_TOO_MANY_DISKS
/* Amount of information passed down for Create Pnysdisk is too large */
#define IR_LOGINFO_PHYSDISK_CREATE_INVALID_LENGTH
/* Creation failed due to DMA error in trying to read from host */
#define IR_LOGINFO_PHYSDISK_CREATE_DMA_ERROR
/* Creation failed due to invalid Bus TargetID passed down */
#define IR_LOGINFO_PHYSDISK_CREATE_BUS_TID_INVALID
/* Creation failed due to error in creating RAID Phys Disk Config Page */
#define IR_LOGINFO_PHYSDISK_CREATE_CONFIG_PAGE_ERROR


/* Compatibility Error : IR Disabled */
#define IR_LOGINFO_COMPAT_ERROR_RAID_DISABLED
/* Compatibility Error : Inquiry Command failed */
#define IR_LOGINFO_COMPAT_ERROR_INQUIRY_FAILED
/* Compatibility Error : Device not direct access device */
#define IR_LOGINFO_COMPAT_ERROR_NOT_DIRECT_ACCESS
/* Compatibility Error : Removable device found */
#define IR_LOGINFO_COMPAT_ERROR_REMOVABLE_FOUND
/* Compatibility Error : Device SCSI Version not 2 or higher */
#define IR_LOGINFO_COMPAT_ERROR_NEED_SCSI_2_OR_HIGHER
/* Compatibility Error : SATA device, 48 BIT LBA not supported */
#define IR_LOGINFO_COMPAT_ERROR_SATA_48BIT_LBA_NOT_SUPPORTED
/* Compatibility Error : Device does not have 512 byte block sizes */
#define IR_LOGINFO_COMPAT_ERROR_DEVICE_NOT_512_BYTE_BLOCK
/* Compatibility Error : Volume Type check failed */
#define IR_LOGINFO_COMPAT_ERROR_VOLUME_TYPE_CHECK_FAILED
/* Compatibility Error : Volume Type is unsupported by FW */
#define IR_LOGINFO_COMPAT_ERROR_UNSUPPORTED_VOLUME_TYPE
/* Compatibility Error : Disk drive too small for use in volume */
#define IR_LOGINFO_COMPAT_ERROR_DISK_TOO_SMALL
/* Compatibility Error : Phys disk for Create Volume not found */
#define IR_LOGINFO_COMPAT_ERROR_PHYS_DISK_NOT_FOUND
/* Compatibility Error : membership count error, too many or too few disks for volume type */
#define IR_LOGINFO_COMPAT_ERROR_MEMBERSHIP_COUNT
/* Compatibility Error : Disk stripe sizes must be 64KB */
#define IR_LOGINFO_COMPAT_ERROR_NON_64K_STRIPE_SIZE
/* Compatibility Error : IME size limited to < 2TB */
#define IR_LOGINFO_COMPAT_ERROR_IME_VOL_NOT_CURRENTLY_SUPPORTED

/* Device Firmware Update: DFU can only be started once */
#define IR_LOGINFO_DEV_FW_UPDATE_ERR_DFU_IN_PROGRESS
/* Device Firmware Update: Volume must be Optimal/Active/non-Quiesced */
#define IR_LOGINFO_DEV_FW_UPDATE_ERR_DEVICE_IN_INVALID_STATE
/* Device Firmware Update: DFU Timeout cannot be zero */
#define IR_LOGINFO_DEV_FW_UPDATE_ERR_INVALID_TIMEOUT
/* Device Firmware Update: CREATE TIMER FAILED */
#define IR_LOGINFO_DEV_FW_UPDATE_ERR_NO_TIMERS
/* Device Firmware Update: Failed to read SAS_IO_UNIT_PG_1 */
#define IR_LOGINFO_DEV_FW_UPDATE_ERR_READING_CFG_PAGE
/* Device Firmware Update: Invalid SAS_IO_UNIT_PG_1 value(s) */
#define IR_LOGINFO_DEV_FW_UPDATE_ERR_PORT_IO_TIMEOUTS_REQUIRED
/* Device Firmware Update: Unable to allocate memory for page */
#define IR_LOGINFO_DEV_FW_UPDATE_ERR_ALLOC_CFG_PAGE


/****************************************************************************/
/* Defines for convenience                                                  */
/****************************************************************************/
#define IOC_LOGINFO_PREFIX_IOP
#define IOC_LOGINFO_PREFIX_PL
#define IOC_LOGINFO_PREFIX_IR

#endif /* end of file */