2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
6 * Copyright (C) 1992 - 1997, 2000-2003 Silicon Graphics, Inc. All rights reserved.
8 #ifndef _ASM_IA64_SN_IOERROR_HANDLING_H
9 #define _ASM_IA64_SN_IOERROR_HANDLING_H
11 #include <linux/types.h>
12 #include <asm/sn/sgi.h>
17 * Basic types required for io error handling interfaces.
21 * Return code from the io error handling interfaces.
24 enum error_return_code_e {
26 ERROR_RETURN_CODE_SUCCESS,
29 ERROR_RETURN_CODE_GENERAL_FAILURE,
31 /* Nth error noticed while handling the first error */
32 ERROR_RETURN_CODE_NESTED_CALL,
34 /* State of the vertex is invalid */
35 ERROR_RETURN_CODE_INVALID_STATE,
38 ERROR_RETURN_CODE_INVALID_ACTION,
40 /* Valid action but not cannot set it */
41 ERROR_RETURN_CODE_CANNOT_SET_ACTION,
43 /* Valid action but not possible for the current state */
44 ERROR_RETURN_CODE_CANNOT_PERFORM_ACTION,
46 /* Valid state but cannot change the state of the vertex to it */
47 ERROR_RETURN_CODE_CANNOT_SET_STATE,
50 ERROR_RETURN_CODE_DUPLICATE,
52 /* Reached the root of the system critical graph */
53 ERROR_RETURN_CODE_SYS_CRITICAL_GRAPH_BEGIN,
55 /* Reached the leaf of the system critical graph */
56 ERROR_RETURN_CODE_SYS_CRITICAL_GRAPH_ADD,
58 /* Cannot shutdown the device in hw/sw */
59 ERROR_RETURN_CODE_SHUTDOWN_FAILED,
61 /* Cannot restart the device in hw/sw */
62 ERROR_RETURN_CODE_RESET_FAILED,
64 /* Cannot failover the io subsystem */
65 ERROR_RETURN_CODE_FAILOVER_FAILED,
67 /* No Jump Buffer exists */
68 ERROR_RETURN_CODE_NO_JUMP_BUFFER
71 typedef uint64_t error_return_code_t;
74 * State of the vertex during error handling.
83 /* Trying to decipher the error bits */
86 /* Trying to carryout the action decided upon after
87 * looking at the error bits
91 /* Donot allow any other operations to this vertex from
92 * other parts of the kernel. This is also used to indicate
93 * that the device has been software shutdown.
97 /* This is a transitory state when no new requests are accepted
98 * on behalf of the device. This is usually used when trying to
99 * quiesce all the outstanding operations and preparing the
100 * device for a failover / shutdown etc.
102 ERROR_STATE_SHUTDOWN_IN_PROGRESS,
104 /* This is the state when there is absolutely no activity going
107 ERROR_STATE_SHUTDOWN_COMPLETE,
109 /* This is the state when the device has issued a retry. */
112 /* This is the normal state. This can also be used to indicate
113 * that the device has been software-enabled after software-
114 * shutting down previously.
120 typedef uint64_t error_state_t;
123 * Generic error classes. This is used to classify errors after looking
124 * at the error bits and helpful in deciding on the action.
127 /* Unclassified error */
130 /* LLP transmit error */
131 ERROR_CLASS_LLP_XMIT,
133 /* LLP receive error */
134 ERROR_CLASS_LLP_RECV,
145 /* System coherency error */
146 ERROR_CLASS_SYS_COHERENCY,
148 /* Bad data error (ecc / parity etc) */
149 ERROR_CLASS_BAD_DATA,
151 /* Illegal request packet */
152 ERROR_CLASS_BAD_REQ_PKT,
154 /* Illegal response packet */
155 ERROR_CLASS_BAD_RESP_PKT
158 #endif /* __KERNEL__ */
159 #endif /* _ASM_IA64_SN_IOERROR_HANDLING_H */