[SUNLANCE]: Mark sparc_lance_probe_one as __devinit.
[linux-2.6/verdex.git] / drivers / message / fusion / lsi / mpi_log_sas.h
blob871ebc08b706133de56ea0ef96f5b248dda12aff
2 /***************************************************************************
3 * *
4 * Copyright 2003 LSI Logic Corporation. All rights reserved. *
5 * *
6 * Description *
7 * ------------ *
8 * This include file contains SAS firmware interface IOC Log Info codes *
9 * *
10 *-------------------------------------------------------------------------*
13 #ifndef IOPI_IOCLOGINFO_H_INCLUDED
14 #define IOPI_IOCLOGINFO_H_INCLUDED
16 #define SAS_LOGINFO_NEXUS_LOSS 0x31170000
17 #define SAS_LOGINFO_MASK 0xFFFF0000
19 /****************************************************************************/
20 /* IOC LOGINFO defines, 0x00000000 - 0x0FFFFFFF */
21 /* Format: */
22 /* Bits 31-28: MPI_IOCLOGINFO_TYPE_SAS (3) */
23 /* Bits 27-24: IOC_LOGINFO_ORIGINATOR: 0=IOP, 1=PL, 2=IR */
24 /* Bits 23-16: LOGINFO_CODE */
25 /* Bits 15-0: LOGINFO_CODE Specific */
26 /****************************************************************************/
28 /****************************************************************************/
29 /* IOC_LOGINFO_ORIGINATOR defines */
30 /****************************************************************************/
31 #define IOC_LOGINFO_ORIGINATOR_IOP (0x00000000)
32 #define IOC_LOGINFO_ORIGINATOR_PL (0x01000000)
33 #define IOC_LOGINFO_ORIGINATOR_IR (0x02000000)
35 #define IOC_LOGINFO_ORIGINATOR_MASK (0x0F000000)
37 /****************************************************************************/
38 /* LOGINFO_CODE defines */
39 /****************************************************************************/
40 #define IOC_LOGINFO_CODE_MASK (0x00FF0000)
41 #define IOC_LOGINFO_CODE_SHIFT (16)
43 /****************************************************************************/
44 /* IOP LOGINFO_CODE defines, valid if IOC_LOGINFO_ORIGINATOR = IOP */
45 /****************************************************************************/
46 #define IOP_LOGINFO_CODE_INVALID_SAS_ADDRESS (0x00010000)
47 #define IOP_LOGINFO_CODE_UNUSED2 (0x00020000)
48 #define IOP_LOGINFO_CODE_CONFIG_INVALID_PAGE (0x00030000)
49 #define IOP_LOGINFO_CODE_CONFIG_INVALID_PAGE_RT (0x00030100) /* Route Table Entry not found */
50 #define IOP_LOGINFO_CODE_CONFIG_INVALID_PAGE_PN (0x00030200) /* Invalid Page Number */
51 #define IOP_LOGINFO_CODE_CONFIG_INVALID_PAGE_FORM (0x00030300) /* Invalid FORM */
52 #define IOP_LOGINFO_CODE_CONFIG_INVALID_PAGE_PT (0x00030400) /* Invalid Page Type */
53 #define IOP_LOGINFO_CODE_CONFIG_INVALID_PAGE_DNM (0x00030500) /* Device Not Mapped */
54 #define IOP_LOGINFO_CODE_CONFIG_INVALID_PAGE_PERSIST (0x00030600) /* Persistent Page not found */
55 #define IOP_LOGINFO_CODE_CONFIG_INVALID_PAGE_DEFAULT (0x00030700) /* Default Page not found */
57 #define IOP_LOGINFO_CODE_DIAG_MSG_ERROR (0x00040000) /* Error handling diag msg - or'd with diag status */
59 #define IOP_LOGINFO_CODE_TASK_TERMINATED (0x00050000)
61 #define IOP_LOGINFO_CODE_ENCL_MGMT_READ_ACTION_ERR0R (0x00060001) /* Read Action not supported for SEP msg */
62 #define IOP_LOGINFO_CODE_ENCL_MGMT_INVALID_BUS_ID_ERR0R (0x00060002) /* Invalid Bus/ID in SEP msg */
64 #define IOP_LOGINFO_CODE_TARGET_ASSIST_TERMINATED (0x00070001)
65 #define IOP_LOGINFO_CODE_TARGET_STATUS_SEND_TERMINATED (0x00070002)
66 #define IOP_LOGINFO_CODE_TARGET_MODE_ABORT_ALL_IO (0x00070003)
67 #define IOP_LOGINFO_CODE_TARGET_MODE_ABORT_EXACT_IO (0x00070004)
68 #define IOP_LOGINFO_CODE_TARGET_MODE_ABORT_EXACT_IO_REQ (0x00070005)
70 /****************************************************************************/
71 /* PL LOGINFO_CODE defines, valid if IOC_LOGINFO_ORIGINATOR = PL */
72 /****************************************************************************/
73 #define PL_LOGINFO_CODE_OPEN_FAILURE (0x00010000)
74 #define PL_LOG_INFO_CODE_OPEN_FAILURE_NO_DEST_TIME_OUT (0x00010001)
75 #define PL_LOGINFO_CODE_OPEN_FAILURE_BAD_DESTINATION (0x00010011)
76 #define PL_LOGINFO_CODE_OPEN_FAILURE_PROTOCOL_NOT_SUPPORTED (0x00010013)
77 #define PL_LOGINFO_CODE_OPEN_FAILURE_STP_RESOURCES_BSY (0x00010018)
78 #define PL_LOGINFO_CODE_OPEN_FAILURE_WRONG_DESTINATION (0x00010019)
79 #define PL_LOGINFO_CODE_OPEN_FAILURE_ORR_TIMEOUT (0X0001001A)
80 #define PL_LOGINFO_CODE_OPEN_FAILURE_PATHWAY_BLOCKED (0x0001001B)
81 #define PL_LOGINFO_CODE_OPEN_FAILURE_AWT_MAXED (0x0001001C)
82 #define PL_LOGINFO_CODE_INVALID_SGL (0x00020000)
83 #define PL_LOGINFO_CODE_WRONG_REL_OFF_OR_FRAME_LENGTH (0x00030000)
84 #define PL_LOGINFO_CODE_FRAME_XFER_ERROR (0x00040000)
85 #define PL_LOGINFO_CODE_TX_FM_CONNECTED_LOW (0x00050000)
86 #define PL_LOGINFO_CODE_SATA_NON_NCQ_RW_ERR_BIT_SET (0x00060000)
87 #define PL_LOGINFO_CODE_SATA_READ_LOG_RECEIVE_DATA_ERR (0x00070000)
88 #define PL_LOGINFO_CODE_SATA_NCQ_FAIL_ALL_CMDS_AFTR_ERR (0x00080000)
89 #define PL_LOGINFO_CODE_SATA_ERR_IN_RCV_SET_DEV_BIT_FIS (0x00090000)
90 #define PL_LOGINFO_CODE_RX_FM_INVALID_MESSAGE (0x000A0000)
91 #define PL_LOGINFO_CODE_RX_CTX_MESSAGE_VALID_ERROR (0x000B0000)
92 #define PL_LOGINFO_CODE_RX_FM_CURRENT_FRAME_ERROR (0x000C0000)
93 #define PL_LOGINFO_CODE_SATA_LINK_DOWN (0x000D0000)
94 #define PL_LOGINFO_CODE_DISCOVERY_SATA_INIT_W_IOS (0x000E0000)
95 #define PL_LOGINFO_CODE_CONFIG_INVALID_PAGE (0x000F0000)
96 #define PL_LOGINFO_CODE_CONFIG_PL_NOT_INITIALIZED (0x000F0001) /* PL not yet initialized, can't do config page req. */
97 #define PL_LOGINFO_CODE_CONFIG_INVALID_PAGE_PT (0x000F0100) /* Invalid Page Type */
98 #define PL_LOGINFO_CODE_CONFIG_INVALID_PAGE_NUM_PHYS (0x000F0200) /* Invalid Number of Phys */
99 #define PL_LOGINFO_CODE_CONFIG_INVALID_PAGE_NOT_IMP (0x000F0300) /* Case Not Handled */
100 #define PL_LOGINFO_CODE_CONFIG_INVALID_PAGE_NO_DEV (0x000F0400) /* No Device Found */
101 #define PL_LOGINFO_CODE_CONFIG_INVALID_PAGE_FORM (0x000F0500) /* Invalid FORM */
102 #define PL_LOGINFO_CODE_CONFIG_INVALID_PAGE_PHY (0x000F0600) /* Invalid Phy */
103 #define PL_LOGINFO_CODE_CONFIG_INVALID_PAGE_NO_OWNER (0x000F0700) /* No Owner Found */
104 #define PL_LOGINFO_CODE_DSCVRY_SATA_INIT_TIMEOUT (0x00100000)
105 #define PL_LOGINFO_CODE_RESET (0x00110000) /* See Sub-Codes below */
106 #define PL_LOGINFO_CODE_ABORT (0x00120000) /* See Sub-Codes below */
107 #define PL_LOGINFO_CODE_IO_NOT_YET_EXECUTED (0x00130000)
108 #define PL_LOGINFO_CODE_IO_EXECUTED (0x00140000)
109 #define PL_LOGINFO_CODE_PERS_RESV_OUT_NOT_AFFIL_OWNER (0x00150000)
110 #define PL_LOGINFO_CODE_OPEN_TXDMA_ABORT (0x00160000)
111 #define PL_LOGINFO_CODE_IO_DEVICE_MISSING_DELAY_RETRY (0x00170000)
112 #define PL_LOGINFO_SUB_CODE_OPEN_FAILURE (0x00000100)
113 #define PL_LOGINFO_SUB_CODE_OPEN_FAILURE_NO_DEST_TIMEOUT (0x00000101)
114 #define PL_LOGINFO_SUB_CODE_OPEN_FAILURE_ORR_TIMEOUT (0x0000011A) /* Open Reject (Retry) Timeout */
115 #define PL_LOGINFO_SUB_CODE_OPEN_FAILURE_PATHWAY_BLOCKED (0x0000011B)
116 #define PL_LOGINFO_SUB_CODE_OPEN_FAILURE_AWT_MAXED (0x0000011C) /* Arbitration Wait Timer Maxed */
118 #define PL_LOGINFO_SUB_CODE_TARGET_BUS_RESET (0x00000120)
119 #define PL_LOGINFO_SUB_CODE_TRANSPORT_LAYER (0x00000130) /* Leave lower nibble (1-f) reserved. */
120 #define PL_LOGINFO_SUB_CODE_PORT_LAYER (0x00000140) /* Leave lower nibble (1-f) reserved. */
123 #define PL_LOGINFO_SUB_CODE_INVALID_SGL (0x00000200)
124 #define PL_LOGINFO_SUB_CODE_WRONG_REL_OFF_OR_FRAME_LENGTH (0x00000300)
125 #define PL_LOGINFO_SUB_CODE_FRAME_XFER_ERROR (0x00000400)
126 #define PL_LOGINFO_SUB_CODE_TX_FM_CONNECTED_LOW (0x00000500)
127 #define PL_LOGINFO_SUB_CODE_SATA_NON_NCQ_RW_ERR_BIT_SET (0x00000600)
128 #define PL_LOGINFO_SUB_CODE_SATA_READ_LOG_RECEIVE_DATA_ERR (0x00000700)
129 #define PL_LOGINFO_SUB_CODE_SATA_NCQ_FAIL_ALL_CMDS_AFTR_ERR (0x00000800)
130 #define PL_LOGINFO_SUB_CODE_SATA_ERR_IN_RCV_SET_DEV_BIT_FIS (0x00000900)
131 #define PL_LOGINFO_SUB_CODE_RX_FM_INVALID_MESSAGE (0x00000A00)
132 #define PL_LOGINFO_SUB_CODE_RX_CTX_MESSAGE_VALID_ERROR (0x00000B00)
133 #define PL_LOGINFO_SUB_CODE_RX_FM_CURRENT_FRAME_ERROR (0x00000C00)
134 #define PL_LOGINFO_SUB_CODE_SATA_LINK_DOWN (0x00000D00)
135 #define PL_LOGINFO_SUB_CODE_DISCOVERY_SATA_INIT_W_IOS (0x00000E00)
136 #define PL_LOGINFO_SUB_CODE_DISCOVERY_REMOTE_SEP_RESET (0x00000E01)
137 #define PL_LOGINFO_SUB_CODE_SECOND_OPEN (0x00000F00)
138 #define PL_LOGINFO_SUB_CODE_DSCVRY_SATA_INIT_TIMEOUT (0x00001000)
141 #define PL_LOGINFO_CODE_ENCL_MGMT_SMP_FRAME_FAILURE (0x00200000) /* Can't get SMP Frame */
142 #define PL_LOGINFO_CODE_ENCL_MGMT_SMP_READ_ERROR (0x00200010) /* Error occured on SMP Read */
143 #define PL_LOGINFO_CODE_ENCL_MGMT_SMP_WRITE_ERROR (0x00200020) /* Error occured on SMP Write */
144 #define PL_LOGINFO_CODE_ENCL_MGMT_NOT_SUPPORTED_ON_ENCL (0x00200040) /* Encl Mgmt services not available for this WWID */
145 #define PL_LOGINFO_CODE_ENCL_MGMT_ADDR_MODE_NOT_SUPPORTED (0x00200050) /* Address Mode not suppored */
146 #define PL_LOGINFO_CODE_ENCL_MGMT_BAD_SLOT_NUM (0x00200060) /* Invalid Slot Number in SEP Msg */
147 #define PL_LOGINFO_CODE_ENCL_MGMT_SGPIO_NOT_PRESENT (0x00200070) /* SGPIO not present/enabled */
148 #define PL_LOGINFO_CODE_ENCL_MGMT_GPIO_NOT_CONFIGURED (0x00200080) /* GPIO not configured */
149 #define PL_LOGINFO_CODE_ENCL_MGMT_GPIO_FRAME_ERROR (0x00200090) /* GPIO can't allocate a frame */
150 #define PL_LOGINFO_CODE_ENCL_MGMT_GPIO_CONFIG_PAGE_ERROR (0x002000A0) /* GPIO failed config page request */
151 #define PL_LOGINFO_CODE_ENCL_MGMT_SES_FRAME_ALLOC_ERROR (0x002000B0) /* Can't get frame for SES command */
152 #define PL_LOGINFO_CODE_ENCL_MGMT_SES_IO_ERROR (0x002000C0) /* I/O execution error */
153 #define PL_LOGINFO_CODE_ENCL_MGMT_SES_RETRIES_EXHAUSTED (0x002000D0) /* SEP I/O retries exhausted */
154 #define PL_LOGINFO_CODE_ENCL_MGMT_SMP_FRAME_ALLOC_ERROR (0x002000E0) /* Can't get frame for SMP command */
156 #define PL_LOGINFO_DA_SEP_NOT_PRESENT (0x00200100) /* SEP not present when msg received */
157 #define PL_LOGINFO_DA_SEP_SINGLE_THREAD_ERROR (0x00200101) /* Can only accept 1 msg at a time */
158 #define PL_LOGINFO_DA_SEP_ISTWI_INTR_IN_IDLE_STATE (0x00200102) /* ISTWI interrupt recvd. while IDLE */
159 #define PL_LOGINFO_DA_SEP_RECEIVED_NACK_FROM_SLAVE (0x00200103) /* SEP NACK'd, it is busy */
160 #define PL_LOGINFO_DA_SEP_DID_NOT_RECEIVE_ACK (0x00200104) /* SEP didn't rcv. ACK (Last Rcvd Bit = 1) */
161 #define PL_LOGINFO_DA_SEP_BAD_STATUS_HDR_CHKSUM (0x00200105) /* SEP stopped or sent bad chksum in Hdr */
162 #define PL_LOGINFO_DA_SEP_STOP_ON_DATA (0x00200106) /* SEP stopped while transfering data */
163 #define PL_LOGINFO_DA_SEP_STOP_ON_SENSE_DATA (0x00200107) /* SEP stopped while transfering sense data */
164 #define PL_LOGINFO_DA_SEP_UNSUPPORTED_SCSI_STATUS_1 (0x00200108) /* SEP returned unknown scsi status */
165 #define PL_LOGINFO_DA_SEP_UNSUPPORTED_SCSI_STATUS_2 (0x00200109) /* SEP returned unknown scsi status */
166 #define PL_LOGINFO_DA_SEP_CHKSUM_ERROR_AFTER_STOP (0x0020010A) /* SEP returned bad chksum after STOP */
167 #define PL_LOGINFO_DA_SEP_CHKSUM_ERROR_AFTER_STOP_GETDATA (0x0020010B) /* SEP returned bad chksum after STOP while gettin data*/
168 #define PL_LOGINFO_DA_SEP_UNSUPPORTED_COMMAND (0x0020010C) /* SEP doesn't support CDB opcode */
171 /****************************************************************************/
172 /* IR LOGINFO_CODE defines, valid if IOC_LOGINFO_ORIGINATOR = IR */
173 /****************************************************************************/
174 #define IR_LOGINFO_RAID_ACTION_ERROR (0x00010000)
175 #define IR_LOGINFO_CODE_UNUSED2 (0x00020000)
177 /* Amount of information passed down for Create Volume is too large */
178 #define IR_LOGINFO_VOLUME_CREATE_INVALID_LENGTH (0x00010001)
179 /* Creation of duplicate volume attempted (Bus/Target ID checked) */
180 #define IR_LOGINFO_VOLUME_CREATE_DUPLICATE (0x00010002)
181 /* Creation failed due to maximum number of supported volumes exceeded */
182 #define IR_LOGINFO_VOLUME_CREATE_NO_SLOTS (0x00010003)
183 /* Creation failed due to DMA error in trying to read from host */
184 #define IR_LOGINFO_VOLUME_CREATE_DMA_ERROR (0x00010004)
185 /* Creation failed due to invalid volume type passed down */
186 #define IR_LOGINFO_VOLUME_CREATE_INVALID_VOLUME_TYPE (0x00010005)
187 /* Creation failed due to error reading MFG Page 4 */
188 #define IR_LOGINFO_VOLUME_MFG_PAGE4_ERROR (0x00010006)
189 /* Creation failed when trying to create internal structures */
190 #define IR_LOGINFO_VOLUME_INTERNAL_CONFIG_STRUCTURE_ERROR (0x00010007)
192 /* Activation failed due to trying to activate an already active volume */
193 #define IR_LOGINFO_VOLUME_ACTIVATING_AN_ACTIVE_VOLUME (0x00010010)
194 /* Activation failed due to trying to active unsupported volume type */
195 #define IR_LOGINFO_VOLUME_ACTIVATING_INVALID_VOLUME_TYPE (0x00010011)
196 /* Activation failed due to trying to active too many volumes */
197 #define IR_LOGINFO_VOLUME_ACTIVATING_TOO_MANY_VOLUMES (0x00010012)
198 /* Activation failed due to Volume ID in use already */
199 #define IR_LOGINFO_VOLUME_ACTIVATING_VOLUME_ID_IN_USE (0x00010013)
200 /* Activation failed call to activateVolume returned failure */
201 #define IR_LOGINFO_VOLUME_ACTIVATE_VOLUME_FAILED (0x00010014)
202 /* Activation failed trying to import the volume */
203 #define IR_LOGINFO_VOLUME_ACTIVATING_IMPORT_VOLUME_FAILED (0x00010015)
205 /* Phys Disk failed, too many phys disks */
206 #define IR_LOGINFO_PHYSDISK_CREATE_TOO_MANY_DISKS (0x00010020)
207 /* Amount of information passed down for Create Pnysdisk is too large */
208 #define IR_LOGINFO_PHYSDISK_CREATE_INVALID_LENGTH (0x00010021)
209 /* Creation failed due to DMA error in trying to read from host */
210 #define IR_LOGINFO_PHYSDISK_CREATE_DMA_ERROR (0x00010022)
211 /* Creation failed due to invalid Bus TargetID passed down */
212 #define IR_LOGINFO_PHYSDISK_CREATE_BUS_TID_INVALID (0x00010023)
213 /* Creation failed due to error in creating RAID Phys Disk Config Page */
214 #define IR_LOGINFO_PHYSDISK_CREATE_CONFIG_PAGE_ERROR (0x00010024)
217 /* Compatibility Error : IR Disabled */
218 #define IR_LOGINFO_COMPAT_ERROR_RAID_DISABLED (0x00010030)
219 /* Compatibility Error : Inquiry Comand failed */
220 #define IR_LOGINFO_COMPAT_ERROR_INQUIRY_FAILED (0x00010031)
221 /* Compatibility Error : Device not direct access device */
222 #define IR_LOGINFO_COMPAT_ERROR_NOT_DIRECT_ACCESS (0x00010032)
223 /* Compatibility Error : Removable device found */
224 #define IR_LOGINFO_COMPAT_ERROR_REMOVABLE_FOUND (0x00010033)
225 /* Compatibility Error : Device SCSI Version not 2 or higher */
226 #define IR_LOGINFO_COMPAT_ERROR_NEED_SCSI_2_OR_HIGHER (0x00010034)
227 /* Compatibility Error : SATA device, 48 BIT LBA not supported */
228 #define IR_LOGINFO_COMPAT_ERROR_SATA_48BIT_LBA_NOT_SUPPORTED (0x00010035)
229 /* Compatibility Error : Device does not have 512 byte block sizes */
230 #define IR_LOGINFO_COMPAT_ERROR_DEVICE_NOT_512_BYTE_BLOCK (0x00010036)
231 /* Compatibility Error : Volume Type check failed */
232 #define IR_LOGINFO_COMPAT_ERROR_VOLUME_TYPE_CHECK_FAILED (0x00010037)
233 /* Compatibility Error : Volume Type is unsupported by FW */
234 #define IR_LOGINFO_COMPAT_ERROR_UNSUPPORTED_VOLUME_TYPE (0x00010038)
235 /* Compatibility Error : Disk drive too small for use in volume */
236 #define IR_LOGINFO_COMPAT_ERROR_DISK_TOO_SMALL (0x00010039)
237 /* Compatibility Error : Phys disk for Create Volume not found */
238 #define IR_LOGINFO_COMPAT_ERROR_PHYS_DISK_NOT_FOUND (0x0001003A)
239 /* Compatibility Error : membership count error, too many or too few disks for volume type */
240 #define IR_LOGINFO_COMPAT_ERROR_MEMBERSHIP_COUNT (0x0001003B)
241 /* Compatibility Error : Disk stripe sizes must be 64KB */
242 #define IR_LOGINFO_COMPAT_ERROR_NON_64K_STRIPE_SIZE (0x0001003C)
243 /* Compatibility Error : IME size limited to < 2TB */
244 #define IR_LOGINFO_COMPAT_ERROR_IME_VOL_NOT_CURRENTLY_SUPPORTED (0x0001003D)
247 /****************************************************************************/
248 /* Defines for convenience */
249 /****************************************************************************/
250 #define IOC_LOGINFO_PREFIX_IOP ((MPI_IOCLOGINFO_TYPE_SAS << MPI_IOCLOGINFO_TYPE_SHIFT) | IOC_LOGINFO_ORIGINATOR_IOP)
251 #define IOC_LOGINFO_PREFIX_PL ((MPI_IOCLOGINFO_TYPE_SAS << MPI_IOCLOGINFO_TYPE_SHIFT) | IOC_LOGINFO_ORIGINATOR_PL)
252 #define IOC_LOGINFO_PREFIX_IR ((MPI_IOCLOGINFO_TYPE_SAS << MPI_IOCLOGINFO_TYPE_SHIFT) | IOC_LOGINFO_ORIGINATOR_IR)
254 #endif /* end of file */