1*fcf3ce44SJohn Forte /*
2*fcf3ce44SJohn Forte  * CDDL HEADER START
3*fcf3ce44SJohn Forte  *
4*fcf3ce44SJohn Forte  * The contents of this file are subject to the terms of the
5*fcf3ce44SJohn Forte  * Common Development and Distribution License (the "License").
6*fcf3ce44SJohn Forte  * You may not use this file except in compliance with the License.
7*fcf3ce44SJohn Forte  *
8*fcf3ce44SJohn Forte  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*fcf3ce44SJohn Forte  * or http://www.opensolaris.org/os/licensing.
10*fcf3ce44SJohn Forte  * See the License for the specific language governing permissions
11*fcf3ce44SJohn Forte  * and limitations under the License.
12*fcf3ce44SJohn Forte  *
13*fcf3ce44SJohn Forte  * When distributing Covered Code, include this CDDL HEADER in each
14*fcf3ce44SJohn Forte  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*fcf3ce44SJohn Forte  * If applicable, add the following below this CDDL HEADER, with the
16*fcf3ce44SJohn Forte  * fields enclosed by brackets "[]" replaced with your own identifying
17*fcf3ce44SJohn Forte  * information: Portions Copyright [yyyy] [name of copyright owner]
18*fcf3ce44SJohn Forte  *
19*fcf3ce44SJohn Forte  * CDDL HEADER END
20*fcf3ce44SJohn Forte  */
21*fcf3ce44SJohn Forte /*
22*fcf3ce44SJohn Forte  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23*fcf3ce44SJohn Forte  * Use is subject to license terms.
24*fcf3ce44SJohn Forte  */
25*fcf3ce44SJohn Forte 
26*fcf3ce44SJohn Forte #ifndef	_FC_ERROR_H
27*fcf3ce44SJohn Forte #define	_FC_ERROR_H
28*fcf3ce44SJohn Forte 
29*fcf3ce44SJohn Forte #include <sys/note.h>
30*fcf3ce44SJohn Forte 
31*fcf3ce44SJohn Forte #ifdef	__cplusplus
32*fcf3ce44SJohn Forte extern "C" {
33*fcf3ce44SJohn Forte #endif
34*fcf3ce44SJohn Forte 
35*fcf3ce44SJohn Forte /*
36*fcf3ce44SJohn Forte  * If there are a good set of status, reason (may be action, expln)
37*fcf3ce44SJohn Forte  * values, an FC_FAILURE function return code should be enough.
38*fcf3ce44SJohn Forte  * Otherwise pick and choose your favorite from here. Try consulting
39*fcf3ce44SJohn Forte  * the transport programming guide for any help. If that doesn't help,
40*fcf3ce44SJohn Forte  * watch the blue sky.
41*fcf3ce44SJohn Forte  *
42*fcf3ce44SJohn Forte  * Geez, FC_ is already in use in vm/faultcode.h. Hope it won't grow
43*fcf3ce44SJohn Forte  * much. The FC_NOMAP is already a defined Value there. So defining
44*fcf3ce44SJohn Forte  * FC_NOMAP as FC_NO_MAP here. Remember to keep a tab on faultcode.h
45*fcf3ce44SJohn Forte  *
46*fcf3ce44SJohn Forte  */
47*fcf3ce44SJohn Forte #define	FC_FAILURE		-1	/* general failure */
48*fcf3ce44SJohn Forte #define	FC_FAILURE_SILENT	-2	/* general failure but fail silently */
49*fcf3ce44SJohn Forte #define	FC_SUCCESS		0x00	/* successful completion */
50*fcf3ce44SJohn Forte #define	FC_CAP_ERROR		0x01	/* FCA capability error */
51*fcf3ce44SJohn Forte #define	FC_CAP_FOUND		0x02	/* FCA capability unsettable */
52*fcf3ce44SJohn Forte #define	FC_CAP_SETTABLE		0x03	/* FCA capability settable */
53*fcf3ce44SJohn Forte #define	FC_UNBOUND		0x04	/* unbound stuff */
54*fcf3ce44SJohn Forte #define	FC_NOMEM		0x05	/* allocation error */
55*fcf3ce44SJohn Forte #define	FC_BADPACKET		0x06	/* invalid packet specified/supplied */
56*fcf3ce44SJohn Forte #define	FC_OFFLINE		0x07	/* I/O resource unavailable */
57*fcf3ce44SJohn Forte #define	FC_OLDPORT		0x08	/* operation on non-loop port */
58*fcf3ce44SJohn Forte #define	FC_NO_MAP		0x09	/* requested map unavailable */
59*fcf3ce44SJohn Forte #define	FC_TRANSPORT_ERROR	0x0A	/* unable to transport I/O */
60*fcf3ce44SJohn Forte #define	FC_ELS_FREJECT		0x0B	/* ELS rejected by a Fabric */
61*fcf3ce44SJohn Forte #define	FC_ELS_PREJECT		0x0C	/* ELS rejected by an N_port */
62*fcf3ce44SJohn Forte #define	FC_ELS_BAD		0x0D	/* ELS rejected by FCA/fctl */
63*fcf3ce44SJohn Forte #define	FC_ELS_MALFORMED	0x0E	/* poorly formed ELS request */
64*fcf3ce44SJohn Forte #define	FC_TOOMANY		0x0F	/* resource request too large */
65*fcf3ce44SJohn Forte #define	FC_UB_BADTOKEN		0x10	/* invalid unsolicited buffer token */
66*fcf3ce44SJohn Forte #define	FC_UB_ERROR		0x11	/* invalid unsol buf request */
67*fcf3ce44SJohn Forte #define	FC_UB_BUSY		0x12	/* buffer already in use */
68*fcf3ce44SJohn Forte #define	FC_BADULP		0x15	/* Unknown ulp */
69*fcf3ce44SJohn Forte #define	FC_BADTYPE		0x16	/* ULP not registered to */
70*fcf3ce44SJohn Forte 					/* handle this FC4 type */
71*fcf3ce44SJohn Forte #define	FC_UNCLAIMED		0x17	/* request or data not claimed */
72*fcf3ce44SJohn Forte #define	FC_ULP_SAMEMODULE	0x18	/* module already in use */
73*fcf3ce44SJohn Forte #define	FC_ULP_SAMETYPE		0x19	/* FC4 module already in use */
74*fcf3ce44SJohn Forte #define	FC_ABORTED		0x20	/* request aborted */
75*fcf3ce44SJohn Forte #define	FC_ABORT_FAILED		0x21	/* abort request failed */
76*fcf3ce44SJohn Forte #define	FC_BADEXCHANGE		0x22	/* exchange doesn�t exist */
77*fcf3ce44SJohn Forte #define	FC_BADWWN		0x23	/* WWN not recognized */
78*fcf3ce44SJohn Forte #define	FC_BADDEV		0x24	/* device unrecognized */
79*fcf3ce44SJohn Forte #define	FC_BADCMD		0x25	/* invalid command issued */
80*fcf3ce44SJohn Forte #define	FC_BADOBJECT		0x26	/* invalid object requested */
81*fcf3ce44SJohn Forte #define	FC_BADPORT		0x27	/* invalid port specified */
82*fcf3ce44SJohn Forte #define	FC_NOTTHISPORT		0x30	/* resource not at this port */
83*fcf3ce44SJohn Forte #define	FC_PREJECT		0x31	/* reject at remote N_Port */
84*fcf3ce44SJohn Forte #define	FC_FREJECT		0x32	/* reject at remote Fabric */
85*fcf3ce44SJohn Forte #define	FC_PBUSY		0x33	/* remote N_Port busy */
86*fcf3ce44SJohn Forte #define	FC_FBUSY		0x34	/* remote Fabric busy */
87*fcf3ce44SJohn Forte #define	FC_ALREADY		0x35	/* already logged in */
88*fcf3ce44SJohn Forte #define	FC_LOGINREQ		0x36	/* login required */
89*fcf3ce44SJohn Forte #define	FC_RESETFAIL		0x37	/* reset failed */
90*fcf3ce44SJohn Forte #define	FC_INVALID_REQUEST	0x38	/* request is invalid */
91*fcf3ce44SJohn Forte #define	FC_OUTOFBOUNDS		0x39	/* port number is out of bounds */
92*fcf3ce44SJohn Forte #define	FC_TRAN_BUSY		0x40	/* command transport busy */
93*fcf3ce44SJohn Forte #define	FC_STATEC_BUSY		0x41	/* port driver currently busy */
94*fcf3ce44SJohn Forte #define	FC_DEVICE_BUSY		0x42	/* transport working on this device */
95*fcf3ce44SJohn Forte #define	FC_DEVICE_NOT_TGT	0x43    /* try to send command to non target */
96*fcf3ce44SJohn Forte #define	FC_DEVICE_BUSY_NEW_RSCN	0x44	/* transport has a new(er) RSCN */
97*fcf3ce44SJohn Forte #define	FC_INVALID_LUN		0x45	/* invalid logical unit number */
98*fcf3ce44SJohn Forte #define	FC_NPIV_FDISC_FAILED	0x46	/* FDISC command for the port failed */
99*fcf3ce44SJohn Forte #define	FC_NPIV_FDISC_WWN_INUSE	0x47	/* NPIV WWN is already in used */
100*fcf3ce44SJohn Forte #define	FC_NPIV_NOT_SUPPORTED	0x48	/* HBA does not support NPIV */
101*fcf3ce44SJohn Forte #define	FC_NPIV_WRONG_TOPOLOGY	0x49	/* Topology does not support NPIV */
102*fcf3ce44SJohn Forte 
103*fcf3ce44SJohn Forte 
104*fcf3ce44SJohn Forte 
105*fcf3ce44SJohn Forte /*
106*fcf3ce44SJohn Forte  * pkt state definitions
107*fcf3ce44SJohn Forte  */
108*fcf3ce44SJohn Forte #define	FC_PKT_SUCCESS		0x01
109*fcf3ce44SJohn Forte #define	FC_PKT_REMOTE_STOP	0x02
110*fcf3ce44SJohn Forte #define	FC_PKT_LOCAL_RJT	0x03
111*fcf3ce44SJohn Forte #define	FC_PKT_NPORT_RJT	0x04
112*fcf3ce44SJohn Forte #define	FC_PKT_FABRIC_RJT	0x05
113*fcf3ce44SJohn Forte #define	FC_PKT_LOCAL_BSY	0x06
114*fcf3ce44SJohn Forte #define	FC_PKT_TRAN_BSY		0x07
115*fcf3ce44SJohn Forte #define	FC_PKT_NPORT_BSY	0x08
116*fcf3ce44SJohn Forte #define	FC_PKT_FABRIC_BSY	0x09
117*fcf3ce44SJohn Forte #define	FC_PKT_LS_RJT		0x0A
118*fcf3ce44SJohn Forte #define	FC_PKT_BA_RJT		0x0B
119*fcf3ce44SJohn Forte #define	FC_PKT_TIMEOUT		0x0C
120*fcf3ce44SJohn Forte #define	FC_PKT_FS_RJT		0x0D
121*fcf3ce44SJohn Forte #define	FC_PKT_TRAN_ERROR	0x0E
122*fcf3ce44SJohn Forte #define	FC_PKT_FAILURE		0x0F
123*fcf3ce44SJohn Forte #define	FC_PKT_PORT_OFFLINE	0x10
124*fcf3ce44SJohn Forte #define	FC_PKT_ELS_IN_PROGRESS	0x11	/* ELS in progress */
125*fcf3ce44SJohn Forte 
126*fcf3ce44SJohn Forte /*
127*fcf3ce44SJohn Forte  * pkt_reason for REMOTE_STOP
128*fcf3ce44SJohn Forte  */
129*fcf3ce44SJohn Forte #define	FC_REASON_ABTS		0x00
130*fcf3ce44SJohn Forte #define	FC_REASON_ABTX		0x01
131*fcf3ce44SJohn Forte 
132*fcf3ce44SJohn Forte /*
133*fcf3ce44SJohn Forte  * pkt_reason (except for state = NPORT_RJT, FABRIC_RJT, NPORT_BSY,
134*fcf3ce44SJohn Forte  *     FABRIC_BSY, LS_RJT, BA_RJT, FS_RJT)
135*fcf3ce44SJohn Forte  *
136*fcf3ce44SJohn Forte  * FCA unique error codes can begin after
137*fcf3ce44SJohn Forte  * FC_REASON_FCA_UNIQUE. Each FCA defines its
138*fcf3ce44SJohn Forte  * own set with values greater >= 0x7F
139*fcf3ce44SJohn Forte  */
140*fcf3ce44SJohn Forte #define	FC_REASON_HW_ERROR		0x01
141*fcf3ce44SJohn Forte #define	FC_REASON_SEQ_TIMEOUT		0x02
142*fcf3ce44SJohn Forte #define	FC_REASON_ABORTED		0x03
143*fcf3ce44SJohn Forte #define	FC_REASON_ABORT_FAILED		0x04
144*fcf3ce44SJohn Forte #define	FC_REASON_NO_CONNECTION		0x05
145*fcf3ce44SJohn Forte #define	FC_REASON_XCHG_DROPPED		0x06
146*fcf3ce44SJohn Forte #define	FC_REASON_ILLEGAL_FRAME		0x07
147*fcf3ce44SJohn Forte #define	FC_REASON_ILLEGAL_LENGTH	0x08
148*fcf3ce44SJohn Forte #define	FC_REASON_UNSUPPORTED		0x09
149*fcf3ce44SJohn Forte #define	FC_REASON_RX_BUF_TIMEOUT	0x0A
150*fcf3ce44SJohn Forte #define	FC_REASON_FCAL_OPN_FAIL		0x0B
151*fcf3ce44SJohn Forte #define	FC_REASON_OVERRUN		0x0C
152*fcf3ce44SJohn Forte #define	FC_REASON_QFULL			0x0D
153*fcf3ce44SJohn Forte #define	FC_REASON_ILLEGAL_REQ		0x0E
154*fcf3ce44SJohn Forte #define	FC_REASON_PKT_BUSY		0x0F
155*fcf3ce44SJohn Forte #define	FC_REASON_OFFLINE		0x11
156*fcf3ce44SJohn Forte #define	FC_REASON_BAD_XID		0x12
157*fcf3ce44SJohn Forte #define	FC_REASON_XCHG_BSY		0x13
158*fcf3ce44SJohn Forte #define	FC_REASON_NOMEM			0x14
159*fcf3ce44SJohn Forte #define	FC_REASON_BAD_SID		0x15
160*fcf3ce44SJohn Forte #define	FC_REASON_NO_SEQ_INIT		0x16
161*fcf3ce44SJohn Forte #define	FC_REASON_DIAG_BUSY		0x17
162*fcf3ce44SJohn Forte #define	FC_REASON_DMA_ERROR		0x18
163*fcf3ce44SJohn Forte #define	FC_REASON_CRC_ERROR		0x19
164*fcf3ce44SJohn Forte #define	FC_REASON_ABORT_TIMEOUT		0x1A
165*fcf3ce44SJohn Forte #define	FC_REASON_UNDERRUN		0x1B
166*fcf3ce44SJohn Forte #define	FC_REASON_FCA_UNIQUE		0x7E
167*fcf3ce44SJohn Forte 
168*fcf3ce44SJohn Forte /*
169*fcf3ce44SJohn Forte  * pkt_reason for FABRIC_RJT and NPORT_RJT
170*fcf3ce44SJohn Forte  *
171*fcf3ce44SJohn Forte  * +--------------------------------------------+
172*fcf3ce44SJohn Forte  * | F_RJT Specific        P_RJT Specific       |
173*fcf3ce44SJohn Forte  * +--------------------------------------------+
174*fcf3ce44SJohn Forte  * | INVALID_D_ID          INVALID_D_ID         |
175*fcf3ce44SJohn Forte  * | INVALID_S_ID          INVALID_S_ID         |
176*fcf3ce44SJohn Forte  * | NPORT_NOT_AVAIL_TEMP                       |
177*fcf3ce44SJohn Forte  * | NPORT_NOT_AVAIL_PERM                       |
178*fcf3ce44SJohn Forte  * | CLASS_NOT_SUPPORTED   CLASS_NOT_SUPPORTED  |
179*fcf3ce44SJohn Forte  * | DELIMITER_ERROR       DELIMITER_ERROR      |
180*fcf3ce44SJohn Forte  * | TYPE_NOT_SUPPORTED    TYPE_NOT_SUPPORTED   |
181*fcf3ce44SJohn Forte  * |                       INVALID_LINK_CONTROL |
182*fcf3ce44SJohn Forte  * |                       INVALID_R_CTL        |
183*fcf3ce44SJohn Forte  * |                       INVALID_F_CTL        |
184*fcf3ce44SJohn Forte  * |                       INVALID_OX_ID        |
185*fcf3ce44SJohn Forte  * |                       INVALID_RX_ID        |
186*fcf3ce44SJohn Forte  * |                       INVALID_SEQ_ID       |
187*fcf3ce44SJohn Forte  * |                       INVALID_DF_CTL       |
188*fcf3ce44SJohn Forte  * |                       INVALID_SEQ_CNT      |
189*fcf3ce44SJohn Forte  * |                       INVALID_PARAMETER    |
190*fcf3ce44SJohn Forte  * |                       EXCHANGE_ERROR       |
191*fcf3ce44SJohn Forte  * | PROTOCOL_ERROR        PROTOCOL_ERROR       |
192*fcf3ce44SJohn Forte  * | INCORRECT_LENGTH      INCORRECT_LENGTH     |
193*fcf3ce44SJohn Forte  * |                       UNEXPECTED_ACK       |
194*fcf3ce44SJohn Forte  * | LOGIN_REQUIRED        LOGIN_REQUIRED       |
195*fcf3ce44SJohn Forte  * |                       EXCESSIVE_SEQUENCES  |
196*fcf3ce44SJohn Forte  * |                       CANT_ESTABLISH_EXCH  |
197*fcf3ce44SJohn Forte  * |                       SECURITY_NOT_SUPP    |
198*fcf3ce44SJohn Forte  * | NO_FABRIC_PATH                             |
199*fcf3ce44SJohn Forte  * | VENDOR_UNIQUE         VENDOR_UNIQUE        |
200*fcf3ce44SJohn Forte  * +--------------------------------------------+
201*fcf3ce44SJohn Forte  *
202*fcf3ce44SJohn Forte  */
203*fcf3ce44SJohn Forte #define	FC_REASON_INVALID_D_ID			0x01
204*fcf3ce44SJohn Forte #define	FC_REASON_INVALID_S_ID			0x02
205*fcf3ce44SJohn Forte #define	FC_REASON_TEMP_UNAVAILABLE		0x03
206*fcf3ce44SJohn Forte #define	FC_REASON_PERM_UNAVAILABLE		0x04
207*fcf3ce44SJohn Forte #define	FC_REASON_CLASS_NOT_SUPP		0x05
208*fcf3ce44SJohn Forte #define	FC_REASON_DELIMTER_USAGE_ERROR		0x06
209*fcf3ce44SJohn Forte #define	FC_REASON_TYPE_NOT_SUPP			0x07
210*fcf3ce44SJohn Forte #define	FC_REASON_INVALID_LINK_CTRL		0x08
211*fcf3ce44SJohn Forte #define	FC_REASON_INVALID_R_CTL			0x09
212*fcf3ce44SJohn Forte #define	FC_REASON_INVALID_F_CTL			0x0A
213*fcf3ce44SJohn Forte #define	FC_REASON_INVALID_OX_ID			0x0B
214*fcf3ce44SJohn Forte #define	FC_REASON_INVALID_RX_ID			0x0C
215*fcf3ce44SJohn Forte #define	FC_REASON_INVALID_SEQ_ID		0x0D
216*fcf3ce44SJohn Forte #define	FC_REASON_INVALID_DF_CTL		0x0E
217*fcf3ce44SJohn Forte #define	FC_REASON_INVALID_SEQ_CNT		0x0F
218*fcf3ce44SJohn Forte #define	FC_REASON_INVALID_PARAM			0x10
219*fcf3ce44SJohn Forte #define	FC_REASON_EXCH_ERROR			0x11
220*fcf3ce44SJohn Forte #define	FC_REASON_PROTOCOL_ERROR		0x12
221*fcf3ce44SJohn Forte #define	FC_REASON_INCORRECT_LENGTH		0x13
222*fcf3ce44SJohn Forte #define	FC_REASON_UNEXPECTED_ACK		0x14
223*fcf3ce44SJohn Forte #define	FC_REASON_UNEXPECTED_LR			0x15
224*fcf3ce44SJohn Forte #define	FC_REASON_LOGIN_REQUIRED		0x16
225*fcf3ce44SJohn Forte #define	FC_REASON_EXCESSIVE_SEQS		0x17
226*fcf3ce44SJohn Forte #define	FC_REASON_EXCH_UNABLE			0x18
227*fcf3ce44SJohn Forte #define	FC_REASON_ESH_NOT_SUPP			0x19
228*fcf3ce44SJohn Forte #define	FC_REASON_NO_FABRIC_PATH		0x1A
229*fcf3ce44SJohn Forte #define	FC_REASON_VENDOR_UNIQUE			0xFF
230*fcf3ce44SJohn Forte 
231*fcf3ce44SJohn Forte /*
232*fcf3ce44SJohn Forte  * pkt_reason for NPORT_BSY
233*fcf3ce44SJohn Forte  */
234*fcf3ce44SJohn Forte #define	FC_REASON_PHYSICAL_BUSY			0x01
235*fcf3ce44SJohn Forte #define	FC_REASON_N_PORT_RESOURCE_BSY	0x03
236*fcf3ce44SJohn Forte #define	FC_REASON_N_PORT_VENDOR_UNIQUE	0xFF
237*fcf3ce44SJohn Forte 
238*fcf3ce44SJohn Forte /*
239*fcf3ce44SJohn Forte  * pkt_reason for FABRIC_BSY
240*fcf3ce44SJohn Forte  */
241*fcf3ce44SJohn Forte #define	FC_REASON_FABRIC_BSY			0x01
242*fcf3ce44SJohn Forte #define	FC_REASON_N_PORT_BSY			0x03
243*fcf3ce44SJohn Forte 
244*fcf3ce44SJohn Forte /*
245*fcf3ce44SJohn Forte  * pkt_reason for LS_RJT
246*fcf3ce44SJohn Forte  * pkt_reason for BA_RJT
247*fcf3ce44SJohn Forte  */
248*fcf3ce44SJohn Forte #define	FC_REASON_INVALID_LA_CODE		0x01
249*fcf3ce44SJohn Forte #define	FC_REASON_LOGICAL_ERROR			0x03
250*fcf3ce44SJohn Forte #define	FC_REASON_LOGICAL_BSY			0x05
251*fcf3ce44SJohn Forte #define	FC_REASON_PROTOCOL_ERROR_RJT		0x07
252*fcf3ce44SJohn Forte #define	FC_REASON_CMD_UNABLE			0x09
253*fcf3ce44SJohn Forte #define	FC_REASON_CMD_UNSUPPORTED		0x0B
254*fcf3ce44SJohn Forte #define	FC_REASON_VU_RJT			0xFF
255*fcf3ce44SJohn Forte 
256*fcf3ce44SJohn Forte /*
257*fcf3ce44SJohn Forte  * pkt_reason for FS_RJT
258*fcf3ce44SJohn Forte  */
259*fcf3ce44SJohn Forte #define	FC_REASON_FS_INVALID_CMD		0x01
260*fcf3ce44SJohn Forte #define	FC_REASON_FS_INVALID_VER		0x02
261*fcf3ce44SJohn Forte #define	FC_REASON_FS_LOGICAL_ERR		0x03
262*fcf3ce44SJohn Forte #define	FC_REASON_FS_INVALID_IUSIZE		0x04
263*fcf3ce44SJohn Forte #define	FC_REASON_FS_LOGICAL_BUSY		0x05
264*fcf3ce44SJohn Forte #define	FC_REASON_FS_PROTOCOL_ERR		0x07
265*fcf3ce44SJohn Forte #define	FC_REASON_FS_CMD_UNABLE			0x09
266*fcf3ce44SJohn Forte #define	FC_REASON_FS_CMD_UNSUPPORTED		0x0B
267*fcf3ce44SJohn Forte #define	FC_REASON_FS_VENDOR_UNIQUE		0xFF
268*fcf3ce44SJohn Forte 
269*fcf3ce44SJohn Forte /*
270*fcf3ce44SJohn Forte  * pkt_action for NPORT_BUSY
271*fcf3ce44SJohn Forte  */
272*fcf3ce44SJohn Forte #define	FC_ACTION_SEQ_TERM_RETRY		0x01
273*fcf3ce44SJohn Forte #define	FC_ACTION_SEQ_ACTIVE_RETRY		0x02
274*fcf3ce44SJohn Forte 
275*fcf3ce44SJohn Forte /*
276*fcf3ce44SJohn Forte  * pkt_action codes for NPORT_RJT, FABRIC_RJT
277*fcf3ce44SJohn Forte  * and TIMEOUT
278*fcf3ce44SJohn Forte  */
279*fcf3ce44SJohn Forte #define	FC_ACTION_RETRYABLE			0x01
280*fcf3ce44SJohn Forte #define	FC_ACTION_NON_RETRYABLE			0x02
281*fcf3ce44SJohn Forte 
282*fcf3ce44SJohn Forte /*
283*fcf3ce44SJohn Forte  * pkt_action codes for reason FC_REASON_ABORT_TIMEOUT
284*fcf3ce44SJohn Forte  */
285*fcf3ce44SJohn Forte #define	FC_ACTION_FREE_PACKET			0x01
286*fcf3ce44SJohn Forte #define	FC_ACTION_DONT_FREE_PACKET		0x02
287*fcf3ce44SJohn Forte 
288*fcf3ce44SJohn Forte /*
289*fcf3ce44SJohn Forte  * pkt_expln codes for BA_RJT
290*fcf3ce44SJohn Forte  */
291*fcf3ce44SJohn Forte #define	FC_EXPLN_NONE				0x00
292*fcf3ce44SJohn Forte #define	FC_EXPLN_INVALID_OX_RX_ID		0x03
293*fcf3ce44SJohn Forte #define	FC_EXPLN_SEQ_ABORTED			0x05
294*fcf3ce44SJohn Forte 
295*fcf3ce44SJohn Forte #ifdef	__cplusplus
296*fcf3ce44SJohn Forte }
297*fcf3ce44SJohn Forte #endif
298*fcf3ce44SJohn Forte 
299*fcf3ce44SJohn Forte #endif	/* _FC_ERROR_H */
300