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