xref: /freebsd/sys/dev/mpt/mpilib/mpi_log_sas.h (revision 71625ec9ad2a9bc8c09784fbd23b759830e0ee5f)
112af29abSMarius Strobl /*-
2*7282444bSPedro F. Giffuni  * SPDX-License-Identifier: BSD-3-Clause
3*7282444bSPedro F. Giffuni  *
412af29abSMarius Strobl  * Copyright (c) 2000-2010, LSI Logic Corporation and its contributors.
512af29abSMarius Strobl  * All rights reserved.
612af29abSMarius Strobl  *
712af29abSMarius Strobl  * Redistribution and use in source and binary forms, with or without
812af29abSMarius Strobl  * modification, are permitted provided that the following conditions are
912af29abSMarius Strobl  * met:
1012af29abSMarius Strobl  * 1. Redistributions of source code must retain the above copyright
1112af29abSMarius Strobl  *    notice, this list of conditions and the following disclaimer.
1212af29abSMarius Strobl  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
1312af29abSMarius Strobl  *    substantially similar to the "NO WARRANTY" disclaimer below
1412af29abSMarius Strobl  *    ("Disclaimer") and any redistribution must be conditioned upon including
1512af29abSMarius Strobl  *    a substantially similar Disclaimer requirement for further binary
1612af29abSMarius Strobl  *    redistribution.
1712af29abSMarius Strobl  * 3. Neither the name of the LSI Logic Corporation nor the names of its
1812af29abSMarius Strobl  *    contributors may be used to endorse or promote products derived from
1912af29abSMarius Strobl  *    this software without specific prior written permission.
2012af29abSMarius Strobl  *
2112af29abSMarius Strobl  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
2212af29abSMarius Strobl  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2312af29abSMarius Strobl  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2412af29abSMarius Strobl  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
2512af29abSMarius Strobl  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2612af29abSMarius Strobl  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
2712af29abSMarius Strobl  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
2812af29abSMarius Strobl  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
2912af29abSMarius Strobl  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
3012af29abSMarius Strobl  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF THE COPYRIGHT
3112af29abSMarius Strobl  * OWNER OR CONTRIBUTOR IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3212af29abSMarius Strobl  */
3312af29abSMarius Strobl 
3412af29abSMarius Strobl /***************************************************************************
3512af29abSMarius Strobl  *                                                                         *
3612af29abSMarius Strobl  * Description                                                             *
3712af29abSMarius Strobl  * ------------                                                            *
3812af29abSMarius Strobl  * This include file contains SAS firmware interface IOC Log Info codes    *
3912af29abSMarius Strobl  *                                                                         *
4012af29abSMarius Strobl  *-------------------------------------------------------------------------*
4112af29abSMarius Strobl  */
4212af29abSMarius Strobl 
4312af29abSMarius Strobl #ifndef IOPI_IOCLOGINFO_H_INCLUDED
4412af29abSMarius Strobl #define IOPI_IOCLOGINFO_H_INCLUDED
4512af29abSMarius Strobl 
4612af29abSMarius Strobl #define SAS_LOGINFO_NEXUS_LOSS		0x31170000
4712af29abSMarius Strobl #define SAS_LOGINFO_MASK		0xFFFF0000
4812af29abSMarius Strobl 
4912af29abSMarius Strobl /****************************************************************************/
5012af29abSMarius Strobl /*  IOC LOGINFO defines, 0x00000000 - 0x0FFFFFFF                            */
5112af29abSMarius Strobl /*  Format:                                                                 */
5212af29abSMarius Strobl /*      Bits 31-28: MPI_IOCLOGINFO_TYPE_SAS (3)                             */
5312af29abSMarius Strobl /*      Bits 27-24: IOC_LOGINFO_ORIGINATOR: 0=IOP, 1=PL, 2=IR               */
5412af29abSMarius Strobl /*      Bits 23-16: LOGINFO_CODE                                            */
5512af29abSMarius Strobl /*      Bits 15-0:  LOGINFO_CODE Specific                                   */
5612af29abSMarius Strobl /****************************************************************************/
5712af29abSMarius Strobl 
5812af29abSMarius Strobl /****************************************************************************/
5912af29abSMarius Strobl /* IOC_LOGINFO_ORIGINATOR defines                                           */
6012af29abSMarius Strobl /****************************************************************************/
6112af29abSMarius Strobl #define IOC_LOGINFO_ORIGINATOR_IOP                      (0x00000000)
6212af29abSMarius Strobl #define IOC_LOGINFO_ORIGINATOR_PL                       (0x01000000)
6312af29abSMarius Strobl #define IOC_LOGINFO_ORIGINATOR_IR                       (0x02000000)
6412af29abSMarius Strobl 
6512af29abSMarius Strobl #define IOC_LOGINFO_ORIGINATOR_MASK                     (0x0F000000)
6612af29abSMarius Strobl 
6712af29abSMarius Strobl /****************************************************************************/
6812af29abSMarius Strobl /* LOGINFO_CODE defines                                                     */
6912af29abSMarius Strobl /****************************************************************************/
7012af29abSMarius Strobl #define IOC_LOGINFO_CODE_MASK                           (0x00FF0000)
7112af29abSMarius Strobl #define IOC_LOGINFO_CODE_SHIFT                          (16)
7212af29abSMarius Strobl 
7312af29abSMarius Strobl /****************************************************************************/
7412af29abSMarius Strobl /* IOP LOGINFO_CODE defines, valid if IOC_LOGINFO_ORIGINATOR = IOP          */
7512af29abSMarius Strobl /****************************************************************************/
7612af29abSMarius Strobl #define IOP_LOGINFO_CODE_INVALID_SAS_ADDRESS                 (0x00010000)
7712af29abSMarius Strobl #define IOP_LOGINFO_CODE_UNUSED2                             (0x00020000)
7812af29abSMarius Strobl #define IOP_LOGINFO_CODE_CONFIG_INVALID_PAGE                 (0x00030000)
7912af29abSMarius Strobl #define IOP_LOGINFO_CODE_CONFIG_INVALID_PAGE_RT              (0x00030100) /* Route Table Entry not found */
8012af29abSMarius Strobl #define IOP_LOGINFO_CODE_CONFIG_INVALID_PAGE_PN              (0x00030200) /* Invalid Page Number */
8112af29abSMarius Strobl #define IOP_LOGINFO_CODE_CONFIG_INVALID_PAGE_FORM            (0x00030300) /* Invalid FORM */
8212af29abSMarius Strobl #define IOP_LOGINFO_CODE_CONFIG_INVALID_PAGE_PT              (0x00030400) /* Invalid Page Type */
8312af29abSMarius Strobl #define IOP_LOGINFO_CODE_CONFIG_INVALID_PAGE_DNM             (0x00030500) /* Device Not Mapped */
8412af29abSMarius Strobl #define IOP_LOGINFO_CODE_CONFIG_INVALID_PAGE_PERSIST         (0x00030600) /* Persistent Page not found */
8512af29abSMarius Strobl #define IOP_LOGINFO_CODE_CONFIG_INVALID_PAGE_DEFAULT         (0x00030700) /* Default Page not found */
8612af29abSMarius Strobl 
8712af29abSMarius Strobl #define IOP_LOGINFO_CODE_FWUPLOAD_NO_FLASH_AVAILABLE         (0x0003E000) /* Tried to upload from flash, but there is none */
8812af29abSMarius Strobl #define IOP_LOGINFO_CODE_FWUPLOAD_UNKNOWN_IMAGE_TYPE         (0x0003E001) /* ImageType field contents were invalid */
8912af29abSMarius Strobl #define IOP_LOGINFO_CODE_FWUPLOAD_WRONG_IMAGE_SIZE           (0x0003E002) /* ImageSize field in TCSGE was bad/offset in MfgPg 4 was wrong */
90453130d9SPedro F. Giffuni #define	IOP_LOGINFO_CODE_FWUPLOAD_ENTIRE_FLASH_UPLOAD_FAILED (0x0003E003) /* Error occurred while attempting to upload the entire flash */
91453130d9SPedro F. Giffuni #define	IOP_LOGINFO_CODE_FWUPLOAD_REGION_UPLOAD_FAILED       (0x0003E004) /* Error occurred while attempting to upload single flash region */
92453130d9SPedro F. Giffuni #define	IOP_LOGINFO_CODE_FWUPLOAD_DMA_FAILURE                (0x0003E005) /* Problem occurred while DMAing FW to host memory */
9312af29abSMarius Strobl 
9412af29abSMarius Strobl #define IOP_LOGINFO_CODE_DIAG_MSG_ERROR                      (0x00040000) /* Error handling diag msg - or'd with diag status */
9512af29abSMarius Strobl 
9612af29abSMarius Strobl #define IOP_LOGINFO_CODE_TASK_TERMINATED                     (0x00050000)
9712af29abSMarius Strobl 
9812af29abSMarius Strobl #define IOP_LOGINFO_CODE_ENCL_MGMT_READ_ACTION_ERR0R         (0x00060001) /* Read Action not supported for SEP msg */
9912af29abSMarius Strobl #define IOP_LOGINFO_CODE_ENCL_MGMT_INVALID_BUS_ID_ERR0R      (0x00060002) /* Invalid Bus/ID in SEP msg */
10012af29abSMarius Strobl 
10112af29abSMarius Strobl #define IOP_LOGINFO_CODE_TARGET_ASSIST_TERMINATED            (0x00070001)
10212af29abSMarius Strobl #define IOP_LOGINFO_CODE_TARGET_STATUS_SEND_TERMINATED       (0x00070002)
10312af29abSMarius Strobl #define IOP_LOGINFO_CODE_TARGET_MODE_ABORT_ALL_IO            (0x00070003)
10412af29abSMarius Strobl #define IOP_LOGINFO_CODE_TARGET_MODE_ABORT_EXACT_IO          (0x00070004)
10512af29abSMarius Strobl #define IOP_LOGINFO_CODE_TARGET_MODE_ABORT_EXACT_IO_REQ      (0x00070005)
10612af29abSMarius Strobl 
10712af29abSMarius Strobl #define IOP_LOGINFO_CODE_LOG_TIMESTAMP_EVENT                 (0x00080000)
10812af29abSMarius Strobl 
10912af29abSMarius Strobl /****************************************************************************/
11012af29abSMarius Strobl /* PL LOGINFO_CODE defines, valid if IOC_LOGINFO_ORIGINATOR = PL            */
11112af29abSMarius Strobl /****************************************************************************/
11212af29abSMarius Strobl #define PL_LOGINFO_CODE_OPEN_FAILURE                         (0x00010000) /* see SUB_CODE_OPEN_FAIL_ below */
11312af29abSMarius Strobl 
11412af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_OPEN_FAIL_NO_DEST_TIME_OUT       (0x00000001)
11512af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_OPEN_FAIL_PATHWAY_BLOCKED        (0x00000002)
11612af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_OPEN_FAIL_RES_CONTINUE0          (0x00000003)
11712af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_OPEN_FAIL_RES_CONTINUE1          (0x00000004)
11812af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_OPEN_FAIL_RES_INITIALIZE0        (0x00000005)
11912af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_OPEN_FAIL_RES_INITIALIZE1        (0x00000006)
12012af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_OPEN_FAIL_RES_STOP0              (0x00000007)
12112af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_OPEN_FAIL_RES_STOP1              (0x00000008)
12212af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_OPEN_FAIL_RETRY                  (0x00000009)
12312af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_OPEN_FAIL_BREAK                  (0x0000000A)
12412af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_OPEN_FAIL_UNUSED_0B              (0x0000000B)
12512af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_OPEN_FAIL_OPEN_TIMEOUT_EXP       (0x0000000C)
12612af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_OPEN_FAIL_UNUSED_0D              (0x0000000D)
12712af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_OPEN_FAIL_DVTBLE_ACCSS_FAIL      (0x0000000E)
12812af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_OPEN_FAIL_BAD_DEST               (0x00000011)
12912af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_OPEN_FAIL_RATE_NOT_SUPP          (0x00000012)
13012af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_OPEN_FAIL_PROT_NOT_SUPP          (0x00000013)
13112af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_OPEN_FAIL_RESERVED_ABANDON0      (0x00000014)
13212af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_OPEN_FAIL_RESERVED_ABANDON1      (0x00000015)
13312af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_OPEN_FAIL_RESERVED_ABANDON2      (0x00000016)
13412af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_OPEN_FAIL_RESERVED_ABANDON3      (0x00000017)
13512af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_OPEN_FAIL_STP_RESOURCES_BSY      (0x00000018)
13612af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_OPEN_FAIL_WRONG_DESTINATION      (0x00000019)
13712af29abSMarius Strobl 
13812af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_OPEN_FAIL_PATH_BLOCKED           (0x0000001B) /* Retry Timeout */
13912af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_OPEN_FAIL_AWT_MAXED              (0x0000001C) /* Retry Timeout */
14012af29abSMarius Strobl 
14112af29abSMarius Strobl #define PL_LOGINFO_CODE_INVALID_SGL                          (0x00020000)
14212af29abSMarius Strobl #define PL_LOGINFO_CODE_WRONG_REL_OFF_OR_FRAME_LENGTH        (0x00030000)
14312af29abSMarius Strobl #define PL_LOGINFO_CODE_FRAME_XFER_ERROR                     (0x00040000)
14412af29abSMarius Strobl #define PL_LOGINFO_CODE_TX_FM_CONNECTED_LOW                  (0x00050000)
14512af29abSMarius Strobl #define PL_LOGINFO_CODE_SATA_NON_NCQ_RW_ERR_BIT_SET          (0x00060000)
14612af29abSMarius Strobl #define PL_LOGINFO_CODE_SATA_READ_LOG_RECEIVE_DATA_ERR       (0x00070000)
14712af29abSMarius Strobl #define PL_LOGINFO_CODE_SATA_NCQ_FAIL_ALL_CMDS_AFTR_ERR      (0x00080000)
14812af29abSMarius Strobl #define PL_LOGINFO_CODE_SATA_ERR_IN_RCV_SET_DEV_BIT_FIS      (0x00090000)
14912af29abSMarius Strobl #define PL_LOGINFO_CODE_RX_FM_INVALID_MESSAGE                (0x000A0000)
15012af29abSMarius Strobl #define PL_LOGINFO_CODE_RX_CTX_MESSAGE_VALID_ERROR           (0x000B0000)
15112af29abSMarius Strobl #define PL_LOGINFO_CODE_RX_FM_CURRENT_FRAME_ERROR            (0x000C0000)
15212af29abSMarius Strobl #define PL_LOGINFO_CODE_SATA_LINK_DOWN                       (0x000D0000)
15312af29abSMarius Strobl #define PL_LOGINFO_CODE_DISCOVERY_SATA_INIT_W_IOS            (0x000E0000)
15412af29abSMarius Strobl #define PL_LOGINFO_CODE_CONFIG_INVALID_PAGE                  (0x000F0000)
15512af29abSMarius Strobl #define PL_LOGINFO_CODE_CONFIG_PL_NOT_INITIALIZED            (0x000F0001) /* PL not yet initialized, can't do config page req. */
15612af29abSMarius Strobl #define PL_LOGINFO_CODE_CONFIG_INVALID_PAGE_PT               (0x000F0100) /* Invalid Page Type */
15712af29abSMarius Strobl #define PL_LOGINFO_CODE_CONFIG_INVALID_PAGE_NUM_PHYS         (0x000F0200) /* Invalid Number of Phys */
15812af29abSMarius Strobl #define PL_LOGINFO_CODE_CONFIG_INVALID_PAGE_NOT_IMP          (0x000F0300) /* Case Not Handled */
15912af29abSMarius Strobl #define PL_LOGINFO_CODE_CONFIG_INVALID_PAGE_NO_DEV           (0x000F0400) /* No Device Found */
16012af29abSMarius Strobl #define PL_LOGINFO_CODE_CONFIG_INVALID_PAGE_FORM             (0x000F0500) /* Invalid FORM */
16112af29abSMarius Strobl #define PL_LOGINFO_CODE_CONFIG_INVALID_PAGE_PHY              (0x000F0600) /* Invalid Phy */
16212af29abSMarius Strobl #define PL_LOGINFO_CODE_CONFIG_INVALID_PAGE_NO_OWNER         (0x000F0700) /* No Owner Found */
16312af29abSMarius Strobl #define PL_LOGINFO_CODE_DSCVRY_SATA_INIT_TIMEOUT             (0x00100000)
16412af29abSMarius Strobl #define PL_LOGINFO_CODE_RESET                                (0x00110000) /* See Sub-Codes below (PL_LOGINFO_SUB_CODE) */
16512af29abSMarius Strobl #define PL_LOGINFO_CODE_ABORT                                (0x00120000) /* See Sub-Codes below  (PL_LOGINFO_SUB_CODE)*/
16612af29abSMarius Strobl #define PL_LOGINFO_CODE_IO_NOT_YET_EXECUTED                  (0x00130000)
16712af29abSMarius Strobl #define PL_LOGINFO_CODE_IO_EXECUTED                          (0x00140000)
16812af29abSMarius Strobl #define PL_LOGINFO_CODE_PERS_RESV_OUT_NOT_AFFIL_OWNER        (0x00150000)
16912af29abSMarius Strobl #define PL_LOGINFO_CODE_OPEN_TXDMA_ABORT                     (0x00160000)
17012af29abSMarius Strobl #define PL_LOGINFO_CODE_IO_DEVICE_MISSING_DELAY_RETRY        (0x00170000)
17112af29abSMarius Strobl #define PL_LOGINFO_CODE_IO_CANCELLED_DUE_TO_R_ERR            (0x00180000)
17212af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_OPEN_FAILURE                     (0x00000100)
17312af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_OPEN_FAILURE_NO_DEST_TIMEOUT     (0x00000101)
17412af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_OPEN_FAILURE_SATA_NEG_RATE_2HI   (0x00000102)
17512af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_OPEN_FAILURE_RATE_NOT_SUPPORTED  (0x00000103)
17612af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_OPEN_FAILURE_BREAK               (0x00000104)
17712af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_OPEN_FAILURE_ZONE_VIOLATION      (0x00000114)
17812af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_OPEN_FAILURE_ABANDON0            (0x00000114) /* Open Reject (Zone Violation) - available on SAS-2 devices */
17912af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_OPEN_FAILURE_ABANDON1            (0x00000115)
18012af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_OPEN_FAILURE_ABANDON2            (0x00000116)
18112af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_OPEN_FAILURE_ABANDON3            (0x00000117)
18212af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_OPEN_FAILURE_ORR_TIMEOUT         (0x0000011A) /* Open Reject (Retry) Timeout */
18312af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_OPEN_FAILURE_PATH_BLOCKED        (0x0000011B)
18412af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_OPEN_FAILURE_AWT_MAXED           (0x0000011C) /* Arbitration Wait Timer Maxed */
18512af29abSMarius Strobl 
18612af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_TARGET_BUS_RESET                 (0x00000120)
18712af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_TRANSPORT_LAYER                  (0x00000130)  /* Leave lower nibble (1-f) reserved. */
18812af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_PORT_LAYER                       (0x00000140)  /* Leave lower nibble (1-f) reserved. */
18912af29abSMarius Strobl 
19012af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_INVALID_SGL                      (0x00000200)
19112af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_WRONG_REL_OFF_OR_FRAME_LENGTH    (0x00000300)
19212af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_FRAME_XFER_ERROR                 (0x00000400) /* Bits 0-3 encode Transport Status Register (offset 0x08) */
19312af29abSMarius Strobl                                                                           /* Bit 0 is Status Bit 0: FrameXferErr */
19412af29abSMarius Strobl                                                                           /* Bit 1 & 2 are Status Bits 16 and 17: FrameXmitErrStatus */
19512af29abSMarius Strobl                                                                           /* Bit 3 is Status Bit 18 WriteDataLenghtGTDataLengthErr */
19612af29abSMarius Strobl 
19712af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_TX_FM_CONNECTED_LOW              (0x00000500)
19812af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_SATA_NON_NCQ_RW_ERR_BIT_SET      (0x00000600)
19912af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_SATA_READ_LOG_RECEIVE_DATA_ERR   (0x00000700)
20012af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_SATA_NCQ_FAIL_ALL_CMDS_AFTR_ERR  (0x00000800)
20112af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_SATA_ERR_IN_RCV_SET_DEV_BIT_FIS  (0x00000900)
20212af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_RX_FM_INVALID_MESSAGE            (0x00000A00)
20312af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_RX_CTX_MESSAGE_VALID_ERROR       (0x00000B00)
20412af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_RX_FM_CURRENT_FRAME_ERROR        (0x00000C00)
20512af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_SATA_LINK_DOWN                   (0x00000D00)
20612af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_DISCOVERY_SATA_INIT_W_IOS        (0x00000E00)
20712af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_DISCOVERY_REMOTE_SEP_RESET       (0x00000E01)
20812af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_SECOND_OPEN                      (0x00000F00)
20912af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_DSCVRY_SATA_INIT_TIMEOUT         (0x00001000)
21012af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_BREAK_ON_SATA_CONNECTION  		 (0x00002000) /* not currently used in mainline */
21112af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_BREAK_ON_STUCK_LINK              (0x00003000)
21212af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_BREAK_ON_STUCK_LINK_AIP          (0x00004000)
21312af29abSMarius Strobl #define PL_LOGINFO_SUB_CODE_BREAK_ON_INCOMPLETE_BREAK_RCVD   (0x00005000)
21412af29abSMarius Strobl 
21512af29abSMarius Strobl #define PL_LOGINFO_CODE_ENCL_MGMT_SMP_FRAME_FAILURE          (0x00200000) /* Can't get SMP Frame */
216453130d9SPedro F. Giffuni #define	PL_LOGINFO_CODE_ENCL_MGMT_SMP_READ_ERROR             (0x00200010) /* Error occurred on SMP Read */
217453130d9SPedro F. Giffuni #define	PL_LOGINFO_CODE_ENCL_MGMT_SMP_WRITE_ERROR            (0x00200020) /* Error occurred on SMP Write */
21812af29abSMarius Strobl #define PL_LOGINFO_CODE_ENCL_MGMT_NOT_SUPPORTED_ON_ENCL      (0x00200040) /* Encl Mgmt services not available for this WWID */
21912af29abSMarius Strobl #define PL_LOGINFO_CODE_ENCL_MGMT_ADDR_MODE_NOT_SUPPORTED    (0x00200050) /* Address Mode not suppored */
22012af29abSMarius Strobl #define PL_LOGINFO_CODE_ENCL_MGMT_BAD_SLOT_NUM               (0x00200060) /* Invalid Slot Number in SEP Msg */
22112af29abSMarius Strobl #define PL_LOGINFO_CODE_ENCL_MGMT_SGPIO_NOT_PRESENT          (0x00200070) /* SGPIO not present/enabled */
22212af29abSMarius Strobl #define PL_LOGINFO_CODE_ENCL_MGMT_GPIO_NOT_CONFIGURED        (0x00200080) /* GPIO not configured */
22312af29abSMarius Strobl #define PL_LOGINFO_CODE_ENCL_MGMT_GPIO_FRAME_ERROR           (0x00200090) /* GPIO can't allocate a frame */
22412af29abSMarius Strobl #define PL_LOGINFO_CODE_ENCL_MGMT_GPIO_CONFIG_PAGE_ERROR     (0x002000A0) /* GPIO failed config page request */
22512af29abSMarius Strobl #define PL_LOGINFO_CODE_ENCL_MGMT_SES_FRAME_ALLOC_ERROR      (0x002000B0) /* Can't get frame for SES command */
22612af29abSMarius Strobl #define PL_LOGINFO_CODE_ENCL_MGMT_SES_IO_ERROR               (0x002000C0) /* I/O execution error */
22712af29abSMarius Strobl #define PL_LOGINFO_CODE_ENCL_MGMT_SES_RETRIES_EXHAUSTED      (0x002000D0) /* SEP I/O retries exhausted */
22812af29abSMarius Strobl #define PL_LOGINFO_CODE_ENCL_MGMT_SMP_FRAME_ALLOC_ERROR      (0x002000E0) /* Can't get frame for SMP command */
22912af29abSMarius Strobl 
23012af29abSMarius Strobl #define PL_LOGINFO_DA_SEP_NOT_PRESENT                        (0x00200100) /* SEP not present when msg received */
23112af29abSMarius Strobl #define PL_LOGINFO_DA_SEP_SINGLE_THREAD_ERROR                (0x00200101) /* Can only accept 1 msg at a time */
23212af29abSMarius Strobl #define PL_LOGINFO_DA_SEP_ISTWI_INTR_IN_IDLE_STATE           (0x00200102) /* ISTWI interrupt recvd. while IDLE */
23312af29abSMarius Strobl #define PL_LOGINFO_DA_SEP_RECEIVED_NACK_FROM_SLAVE           (0x00200103) /* SEP NACK'd, it is busy */
23412af29abSMarius Strobl #define PL_LOGINFO_DA_SEP_DID_NOT_RECEIVE_ACK                (0x00200104) /* SEP didn't rcv. ACK (Last Rcvd Bit = 1) */
23512af29abSMarius Strobl #define PL_LOGINFO_DA_SEP_BAD_STATUS_HDR_CHKSUM              (0x00200105) /* SEP stopped or sent bad chksum in Hdr */
236453130d9SPedro F. Giffuni #define	PL_LOGINFO_DA_SEP_STOP_ON_DATA                       (0x00200106) /* SEP stopped while transferring data */
237453130d9SPedro F. Giffuni #define	PL_LOGINFO_DA_SEP_STOP_ON_SENSE_DATA                 (0x00200107) /* SEP stopped while transferring sense data */
23812af29abSMarius Strobl #define PL_LOGINFO_DA_SEP_UNSUPPORTED_SCSI_STATUS_1          (0x00200108) /* SEP returned unknown scsi status */
23912af29abSMarius Strobl #define PL_LOGINFO_DA_SEP_UNSUPPORTED_SCSI_STATUS_2          (0x00200109) /* SEP returned unknown scsi status */
24012af29abSMarius Strobl #define PL_LOGINFO_DA_SEP_CHKSUM_ERROR_AFTER_STOP            (0x0020010A) /* SEP returned bad chksum after STOP */
24112af29abSMarius Strobl #define PL_LOGINFO_DA_SEP_CHKSUM_ERROR_AFTER_STOP_GETDATA    (0x0020010B) /* SEP returned bad chksum after STOP while gettin data*/
24212af29abSMarius Strobl #define PL_LOGINFO_DA_SEP_UNSUPPORTED_COMMAND                (0x0020010C) /* SEP doesn't support CDB opcode f/w location 1 */
24312af29abSMarius Strobl #define PL_LOGINFO_DA_SEP_UNSUPPORTED_COMMAND_2              (0x0020010D) /* SEP doesn't support CDB opcode f/w location 2 */
24412af29abSMarius Strobl #define PL_LOGINFO_DA_SEP_UNSUPPORTED_COMMAND_3              (0x0020010E) /* SEP doesn't support CDB opcode f/w location 3 */
24512af29abSMarius Strobl 
24612af29abSMarius Strobl /****************************************************************************/
24712af29abSMarius Strobl /* IR LOGINFO_CODE defines, valid if IOC_LOGINFO_ORIGINATOR = IR            */
24812af29abSMarius Strobl /****************************************************************************/
24912af29abSMarius Strobl #define IR_LOGINFO_RAID_ACTION_ERROR                           (0x00010000)
25012af29abSMarius Strobl #define IR_LOGINFO_CODE_UNUSED2                                (0x00020000)
25112af29abSMarius Strobl 
25212af29abSMarius Strobl /* Amount of information passed down for Create Volume is too large */
25312af29abSMarius Strobl #define IR_LOGINFO_VOLUME_CREATE_INVALID_LENGTH                (0x00010001)
25412af29abSMarius Strobl /* Creation of duplicate volume attempted (Bus/Target ID checked) */
25512af29abSMarius Strobl #define IR_LOGINFO_VOLUME_CREATE_DUPLICATE                     (0x00010002)
25612af29abSMarius Strobl /* Creation failed due to maximum number of supported volumes exceeded */
25712af29abSMarius Strobl #define IR_LOGINFO_VOLUME_CREATE_NO_SLOTS                      (0x00010003)
25812af29abSMarius Strobl /* Creation failed due to DMA error in trying to read from host */
25912af29abSMarius Strobl #define IR_LOGINFO_VOLUME_CREATE_DMA_ERROR                     (0x00010004)
26012af29abSMarius Strobl /* Creation failed due to invalid volume type passed down */
26112af29abSMarius Strobl #define IR_LOGINFO_VOLUME_CREATE_INVALID_VOLUME_TYPE           (0x00010005)
26212af29abSMarius Strobl /* Creation failed due to error reading MFG Page 4 */
26312af29abSMarius Strobl #define IR_LOGINFO_VOLUME_MFG_PAGE4_ERROR                      (0x00010006)
26412af29abSMarius Strobl /* Creation failed when trying to create internal structures */
26512af29abSMarius Strobl #define IR_LOGINFO_VOLUME_INTERNAL_CONFIG_STRUCTURE_ERROR      (0x00010007)
26612af29abSMarius Strobl 
26712af29abSMarius Strobl /* Activation failed due to trying to activate an already active volume */
26812af29abSMarius Strobl #define IR_LOGINFO_VOLUME_ACTIVATING_AN_ACTIVE_VOLUME          (0x00010010)
26912af29abSMarius Strobl /* Activation failed due to trying to active unsupported volume type  */
27012af29abSMarius Strobl #define IR_LOGINFO_VOLUME_ACTIVATING_INVALID_VOLUME_TYPE       (0x00010011)
27112af29abSMarius Strobl /* Activation failed due to trying to active too many volumes  */
27212af29abSMarius Strobl #define IR_LOGINFO_VOLUME_ACTIVATING_TOO_MANY_VOLUMES          (0x00010012)
27312af29abSMarius Strobl /* Activation failed due to Volume ID in use already */
27412af29abSMarius Strobl #define IR_LOGINFO_VOLUME_ACTIVATING_VOLUME_ID_IN_USE          (0x00010013)
27512af29abSMarius Strobl /* Activation failed call to activateVolume returned failure */
27612af29abSMarius Strobl #define IR_LOGINFO_VOLUME_ACTIVATE_VOLUME_FAILED               (0x00010014)
27712af29abSMarius Strobl /* Activation failed trying to import the volume */
27812af29abSMarius Strobl #define IR_LOGINFO_VOLUME_ACTIVATING_IMPORT_VOLUME_FAILED      (0x00010015)
27912af29abSMarius Strobl /* Activation failed trying to import the volume */
28012af29abSMarius Strobl #define IR_LOGINFO_VOLUME_ACTIVATING_TOO_MANY_PHYS_DISKS       (0x00010016)
28112af29abSMarius Strobl 
28212af29abSMarius Strobl /* Phys Disk failed, too many phys disks */
28312af29abSMarius Strobl #define IR_LOGINFO_PHYSDISK_CREATE_TOO_MANY_DISKS              (0x00010020)
28412af29abSMarius Strobl /* Amount of information passed down for Create Pnysdisk is too large */
28512af29abSMarius Strobl #define IR_LOGINFO_PHYSDISK_CREATE_INVALID_LENGTH              (0x00010021)
28612af29abSMarius Strobl /* Creation failed due to DMA error in trying to read from host */
28712af29abSMarius Strobl #define IR_LOGINFO_PHYSDISK_CREATE_DMA_ERROR                   (0x00010022)
28812af29abSMarius Strobl /* Creation failed due to invalid Bus TargetID passed down */
28912af29abSMarius Strobl #define IR_LOGINFO_PHYSDISK_CREATE_BUS_TID_INVALID             (0x00010023)
29012af29abSMarius Strobl /* Creation failed due to error in creating RAID Phys Disk Config Page */
29112af29abSMarius Strobl #define IR_LOGINFO_PHYSDISK_CREATE_CONFIG_PAGE_ERROR           (0x00010024)
29212af29abSMarius Strobl 
29312af29abSMarius Strobl /* Compatibility Error : IR Disabled */
29412af29abSMarius Strobl #define IR_LOGINFO_COMPAT_ERROR_RAID_DISABLED                  (0x00010030)
29512af29abSMarius Strobl /* Compatibility Error : Inquiry Comand failed */
29612af29abSMarius Strobl #define IR_LOGINFO_COMPAT_ERROR_INQUIRY_FAILED                 (0x00010031)
29712af29abSMarius Strobl /* Compatibility Error : Device not direct access device */
29812af29abSMarius Strobl #define IR_LOGINFO_COMPAT_ERROR_NOT_DIRECT_ACCESS              (0x00010032)
29912af29abSMarius Strobl /* Compatibility Error : Removable device found */
30012af29abSMarius Strobl #define IR_LOGINFO_COMPAT_ERROR_REMOVABLE_FOUND                (0x00010033)
30112af29abSMarius Strobl /* Compatibility Error : Device SCSI Version not 2 or higher */
30212af29abSMarius Strobl #define IR_LOGINFO_COMPAT_ERROR_NEED_SCSI_2_OR_HIGHER          (0x00010034)
30312af29abSMarius Strobl /* Compatibility Error : SATA device, 48 BIT LBA not supported */
30412af29abSMarius Strobl #define IR_LOGINFO_COMPAT_ERROR_SATA_48BIT_LBA_NOT_SUPPORTED   (0x00010035)
30512af29abSMarius Strobl /* Compatibility Error : Device does not have 512 byte block sizes */
30612af29abSMarius Strobl #define IR_LOGINFO_COMPAT_ERROR_DEVICE_NOT_512_BYTE_BLOCK      (0x00010036)
30712af29abSMarius Strobl /* Compatibility Error : Volume Type check failed */
30812af29abSMarius Strobl #define IR_LOGINFO_COMPAT_ERROR_VOLUME_TYPE_CHECK_FAILED       (0x00010037)
30912af29abSMarius Strobl /* Compatibility Error : Volume Type is unsupported by FW */
31012af29abSMarius Strobl #define IR_LOGINFO_COMPAT_ERROR_UNSUPPORTED_VOLUME_TYPE        (0x00010038)
31112af29abSMarius Strobl /* Compatibility Error : Disk drive too small for use in volume */
31212af29abSMarius Strobl #define IR_LOGINFO_COMPAT_ERROR_DISK_TOO_SMALL                 (0x00010039)
31312af29abSMarius Strobl /* Compatibility Error : Phys disk for Create Volume not found */
31412af29abSMarius Strobl #define IR_LOGINFO_COMPAT_ERROR_PHYS_DISK_NOT_FOUND            (0x0001003A)
31512af29abSMarius Strobl /* Compatibility Error : membership count error, too many or too few disks for volume type */
31612af29abSMarius Strobl #define IR_LOGINFO_COMPAT_ERROR_MEMBERSHIP_COUNT               (0x0001003B)
31712af29abSMarius Strobl /* Compatibility Error : Disk stripe sizes must be 64KB */
31812af29abSMarius Strobl #define IR_LOGINFO_COMPAT_ERROR_NON_64K_STRIPE_SIZE            (0x0001003C)
31912af29abSMarius Strobl /* Compatibility Error : IME size limited to < 2TB */
32012af29abSMarius Strobl #define IR_LOGINFO_COMPAT_ERROR_IME_VOL_NOT_CURRENTLY_SUPPORTED (0x0001003D)
32112af29abSMarius Strobl 
32212af29abSMarius Strobl /* Device Firmware Update: DFU can only be started once */
32312af29abSMarius Strobl #define IR_LOGINFO_DEV_FW_UPDATE_ERR_DFU_IN_PROGRESS            (0x00010050)
32412af29abSMarius Strobl /* Device Firmware Update: Volume must be Optimal/Active/non-Quiesced */
32512af29abSMarius Strobl #define IR_LOGINFO_DEV_FW_UPDATE_ERR_DEVICE_IN_INVALID_STATE    (0x00010051)
32612af29abSMarius Strobl /* Device Firmware Update: DFU Timeout cannot be zero */
32712af29abSMarius Strobl #define IR_LOGINFO_DEV_FW_UPDATE_ERR_INVALID_TIMEOUT            (0x00010052)
32812af29abSMarius Strobl /* Device Firmware Update: CREATE TIMER FAILED */
32912af29abSMarius Strobl #define IR_LOGINFO_DEV_FW_UPDATE_ERR_NO_TIMERS                  (0x00010053)
33012af29abSMarius Strobl /* Device Firmware Update: Failed to read SAS_IO_UNIT_PG_1 */
33112af29abSMarius Strobl #define IR_LOGINFO_DEV_FW_UPDATE_ERR_READING_CFG_PAGE           (0x00010054)
33212af29abSMarius Strobl /* Device Firmware Update: Invalid SAS_IO_UNIT_PG_1 value(s) */
33312af29abSMarius Strobl #define IR_LOGINFO_DEV_FW_UPDATE_ERR_PORT_IO_TIMEOUTS_REQUIRED  (0x00010055)
33412af29abSMarius Strobl /* Device Firmware Update: Unable to allocate memory for page */
33512af29abSMarius Strobl #define IR_LOGINFO_DEV_FW_UPDATE_ERR_ALLOC_CFG_PAGE             (0x00010056)
33612af29abSMarius Strobl /* Device Firmware Update:  */
33712af29abSMarius Strobl //#define IR_LOGINFO_DEV_FW_UPDATE_ERR_                         (0x00010054)
33812af29abSMarius Strobl 
33912af29abSMarius Strobl /****************************************************************************/
34012af29abSMarius Strobl /* Defines for convenience                                                  */
34112af29abSMarius Strobl /****************************************************************************/
34212af29abSMarius Strobl #define IOC_LOGINFO_PREFIX_IOP                          ((MPI_IOCLOGINFO_TYPE_SAS << MPI_IOCLOGINFO_TYPE_SHIFT) | IOC_LOGINFO_ORIGINATOR_IOP)
34312af29abSMarius Strobl #define IOC_LOGINFO_PREFIX_PL                           ((MPI_IOCLOGINFO_TYPE_SAS << MPI_IOCLOGINFO_TYPE_SHIFT) | IOC_LOGINFO_ORIGINATOR_PL)
34412af29abSMarius Strobl #define IOC_LOGINFO_PREFIX_IR                           ((MPI_IOCLOGINFO_TYPE_SAS << MPI_IOCLOGINFO_TYPE_SHIFT) | IOC_LOGINFO_ORIGINATOR_IR)
34512af29abSMarius Strobl 
34612af29abSMarius Strobl #endif /* end of file */
347