xref: /onnv-gate/usr/src/lib/storage/common/stgcom.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 /*
27*7836SJohn.Forte@Sun.COM  * Common definitions for Storage Utilities libraries
28*7836SJohn.Forte@Sun.COM  */
29*7836SJohn.Forte@Sun.COM 
30*7836SJohn.Forte@Sun.COM #ifndef	_STGCOM_H
31*7836SJohn.Forte@Sun.COM #define	_STGCOM_H
32*7836SJohn.Forte@Sun.COM 
33*7836SJohn.Forte@Sun.COM 
34*7836SJohn.Forte@Sun.COM 
35*7836SJohn.Forte@Sun.COM #ifdef	__cplusplus
36*7836SJohn.Forte@Sun.COM extern "C" {
37*7836SJohn.Forte@Sun.COM #endif
38*7836SJohn.Forte@Sun.COM 
39*7836SJohn.Forte@Sun.COM /*
40*7836SJohn.Forte@Sun.COM  * This header file contains the error definitions
41*7836SJohn.Forte@Sun.COM  * to handle the SCSI, path format, Device, Fibre Channel
42*7836SJohn.Forte@Sun.COM  * ioctl, Enclosure, and IB specific Errors.  It also
43*7836SJohn.Forte@Sun.COM  * contains physical names for device paths.
44*7836SJohn.Forte@Sun.COM  */
45*7836SJohn.Forte@Sun.COM 
46*7836SJohn.Forte@Sun.COM /*
47*7836SJohn.Forte@Sun.COM  * Define for physical name of children of fcp
48*7836SJohn.Forte@Sun.COM  */
49*7836SJohn.Forte@Sun.COM #define	FC_CTLR			":devctl"
50*7836SJohn.Forte@Sun.COM #define	DRV_NAME_SD		"sd@"
51*7836SJohn.Forte@Sun.COM #define	DRV_NAME_SSD		"ssd@"
52*7836SJohn.Forte@Sun.COM #define	DRV_NAME_ST		"st@"
53*7836SJohn.Forte@Sun.COM #define	SLSH_DRV_NAME_SD	"/sd@"
54*7836SJohn.Forte@Sun.COM #define	SLSH_DRV_NAME_SSD	"/ssd@"
55*7836SJohn.Forte@Sun.COM #define	SLSH_DRV_NAME_ST	"/st@"
56*7836SJohn.Forte@Sun.COM #define	DRV_PART_NAME		",0:c,raw"
57*7836SJohn.Forte@Sun.COM #define	SES_NAME		"ses@"
58*7836SJohn.Forte@Sun.COM #define	SLSH_SES_NAME		"/ses@"
59*7836SJohn.Forte@Sun.COM #define	SLASH_SES		"/ses"
60*7836SJohn.Forte@Sun.COM #define	SES_DIR			"/dev/es"
61*7836SJohn.Forte@Sun.COM #define	DEV_DSK_DIR		"/dev/dsk"
62*7836SJohn.Forte@Sun.COM #define	DEV_RDIR		"/dev/rdsk"
63*7836SJohn.Forte@Sun.COM #define	DEV_TAPE_DIR		"/dev/rmt"
64*7836SJohn.Forte@Sun.COM #define	L_ARCH_4M		"sun4m"
65*7836SJohn.Forte@Sun.COM #define	VHCI_NODE		"/devices/scsi_vhci:devctl"
66*7836SJohn.Forte@Sun.COM #define	SCSI_VHCI		"/devices/scsi_vhci/"
67*7836SJohn.Forte@Sun.COM #define	SLSH_VHCI_DISK		"/ssd@g"
68*7836SJohn.Forte@Sun.COM 
69*7836SJohn.Forte@Sun.COM /*
70*7836SJohn.Forte@Sun.COM  * controller/nexus node postfix strings
71*7836SJohn.Forte@Sun.COM  */
72*7836SJohn.Forte@Sun.COM #define	CTLR_POSTFIX	":ctlr"
73*7836SJohn.Forte@Sun.COM #define	DEVCTL_POSTFIX	":devctl"
74*7836SJohn.Forte@Sun.COM 
75*7836SJohn.Forte@Sun.COM /*
76*7836SJohn.Forte@Sun.COM  * I18N message number ranges
77*7836SJohn.Forte@Sun.COM  *  This file: 15500 - 15999
78*7836SJohn.Forte@Sun.COM  *  Shared common messages: 1 - 1999
79*7836SJohn.Forte@Sun.COM  */
80*7836SJohn.Forte@Sun.COM 
81*7836SJohn.Forte@Sun.COM /*
82*7836SJohn.Forte@Sun.COM  * All error numbers below this base value
83*7836SJohn.Forte@Sun.COM  * are assumed to be UNIX error codes.
84*7836SJohn.Forte@Sun.COM  */
85*7836SJohn.Forte@Sun.COM 
86*7836SJohn.Forte@Sun.COM #define	L_BASE				L_SCSI_ERROR
87*7836SJohn.Forte@Sun.COM 
88*7836SJohn.Forte@Sun.COM /*
89*7836SJohn.Forte@Sun.COM  * SCSI Errors
90*7836SJohn.Forte@Sun.COM  *
91*7836SJohn.Forte@Sun.COM  */
92*7836SJohn.Forte@Sun.COM /* SCSI error */
93*7836SJohn.Forte@Sun.COM #define	L_SCSI_ERROR			0x10000
94*7836SJohn.Forte@Sun.COM 
95*7836SJohn.Forte@Sun.COM /* Receive Diagnostics: Transfer length is not word aligned */
96*7836SJohn.Forte@Sun.COM #define	L_RD_INVLD_TRNSFR_LEN		0x11002
97*7836SJohn.Forte@Sun.COM 
98*7836SJohn.Forte@Sun.COM /* No disk element found in Receive diag. page */
99*7836SJohn.Forte@Sun.COM #define	L_RD_NO_DISK_ELEM		0x11003
100*7836SJohn.Forte@Sun.COM 
101*7836SJohn.Forte@Sun.COM /* Illegal mode sense page length */
102*7836SJohn.Forte@Sun.COM #define	L_ILLEGAL_MODE_SENSE_PAGE	0x11004
103*7836SJohn.Forte@Sun.COM 
104*7836SJohn.Forte@Sun.COM /* Invalid number of ENV. SENSE pages */
105*7836SJohn.Forte@Sun.COM #define	L_INVALID_NO_OF_ENVSEN_PAGES	0x11005
106*7836SJohn.Forte@Sun.COM 
107*7836SJohn.Forte@Sun.COM /* Buffer is *too* small to hold more than 8 pages */
108*7836SJohn.Forte@Sun.COM #define	L_INVALID_BUF_LEN		0x11006
109*7836SJohn.Forte@Sun.COM 
110*7836SJohn.Forte@Sun.COM /* Scsi_vhci errors */
111*7836SJohn.Forte@Sun.COM #define	L_SCSI_VHCI_ERROR		0x11007
112*7836SJohn.Forte@Sun.COM #define	L_SCSI_VHCI_ALREADY_ACTIVE	0x11008
113*7836SJohn.Forte@Sun.COM #define	L_SCSI_VHCI_NO_STANDBY		0x11009
114*7836SJohn.Forte@Sun.COM #define	L_SCSI_VHCI_FAILOVER_NOTSUP	0x1100a
115*7836SJohn.Forte@Sun.COM #define	L_SCSI_VHCI_FAILOVER_BUSY	0x1100b
116*7836SJohn.Forte@Sun.COM 
117*7836SJohn.Forte@Sun.COM 
118*7836SJohn.Forte@Sun.COM /*
119*7836SJohn.Forte@Sun.COM  * Error definitions
120*7836SJohn.Forte@Sun.COM  * for Format Errors.
121*7836SJohn.Forte@Sun.COM  */
122*7836SJohn.Forte@Sun.COM #define	L_INVALID_PATH			0x20200
123*7836SJohn.Forte@Sun.COM 
124*7836SJohn.Forte@Sun.COM /* Failed to open a given path */
125*7836SJohn.Forte@Sun.COM #define	L_OPEN_PATH_FAIL		0x20001
126*7836SJohn.Forte@Sun.COM 
127*7836SJohn.Forte@Sun.COM /* Invalid password length. */
128*7836SJohn.Forte@Sun.COM #define	L_INVALID_PASSWORD_LEN		0x20002
129*7836SJohn.Forte@Sun.COM 
130*7836SJohn.Forte@Sun.COM /* Given disk physical path is not valid. */
131*7836SJohn.Forte@Sun.COM #define	L_INVLD_PHYS_PATH_TO_DISK	0x20004
132*7836SJohn.Forte@Sun.COM 
133*7836SJohn.Forte@Sun.COM /* Invalid name id found in the physical path */
134*7836SJohn.Forte@Sun.COM #define	L_INVLD_ID_FOUND		0x20005
135*7836SJohn.Forte@Sun.COM 
136*7836SJohn.Forte@Sun.COM /* Invalid WWN format found */
137*7836SJohn.Forte@Sun.COM #define	L_INVLD_WWN_FORMAT		0x20006
138*7836SJohn.Forte@Sun.COM 
139*7836SJohn.Forte@Sun.COM /* No WWN found in the disk's physical path */
140*7836SJohn.Forte@Sun.COM #define	L_NO_WWN_FOUND_IN_PATH		0x20007
141*7836SJohn.Forte@Sun.COM 
142*7836SJohn.Forte@Sun.COM /* No Loop address found in the phys path */
143*7836SJohn.Forte@Sun.COM #define	L_NO_LOOP_ADDRS_FOUND		0x20008
144*7836SJohn.Forte@Sun.COM 
145*7836SJohn.Forte@Sun.COM /* Invalid port number found in the phys path */
146*7836SJohn.Forte@Sun.COM #define	L_INVLD_PORT_IN_PATH		0x20009
147*7836SJohn.Forte@Sun.COM 
148*7836SJohn.Forte@Sun.COM /* Invalid LED request */
149*7836SJohn.Forte@Sun.COM #define	L_INVALID_LED_RQST		0x20010
150*7836SJohn.Forte@Sun.COM 
151*7836SJohn.Forte@Sun.COM /* Invalid path format */
152*7836SJohn.Forte@Sun.COM #define	L_INVALID_PATH_FORMAT		0x20011
153*7836SJohn.Forte@Sun.COM 
154*7836SJohn.Forte@Sun.COM /* failed to get the physical path */
155*7836SJohn.Forte@Sun.COM #define	L_NO_PHYS_PATH			0x20012
156*7836SJohn.Forte@Sun.COM 
157*7836SJohn.Forte@Sun.COM /* failed to get the ses path */
158*7836SJohn.Forte@Sun.COM #define	L_NO_SES_PATH			0x20015
159*7836SJohn.Forte@Sun.COM 
160*7836SJohn.Forte@Sun.COM /* No "/" found in the physical path */
161*7836SJohn.Forte@Sun.COM #define	L_INVLD_PATH_NO_SLASH_FND	0x20100
162*7836SJohn.Forte@Sun.COM 
163*7836SJohn.Forte@Sun.COM /* No "@" found in the physical path */
164*7836SJohn.Forte@Sun.COM #define	L_INVLD_PATH_NO_ATSIGN_FND	0x20101
165*7836SJohn.Forte@Sun.COM 
166*7836SJohn.Forte@Sun.COM /* Invalid slot (slot < 0 or slot > 10). */
167*7836SJohn.Forte@Sun.COM #define	L_INVALID_SLOT			0x20102
168*7836SJohn.Forte@Sun.COM 
169*7836SJohn.Forte@Sun.COM /* No valid path to a device */
170*7836SJohn.Forte@Sun.COM #define	L_NO_VALID_PATH			0x20103
171*7836SJohn.Forte@Sun.COM 
172*7836SJohn.Forte@Sun.COM /* No disk devices found in /dev/rdsk directory */
173*7836SJohn.Forte@Sun.COM #define	L_NO_DISK_DEV_FOUND		0x20104
174*7836SJohn.Forte@Sun.COM 
175*7836SJohn.Forte@Sun.COM /* No tape devices found in /dev/rmt directory */
176*7836SJohn.Forte@Sun.COM #define	L_NO_TAPE_DEV_FOUND		0x20105
177*7836SJohn.Forte@Sun.COM 
178*7836SJohn.Forte@Sun.COM /* Device's Node WWN not found in the WWN list. */
179*7836SJohn.Forte@Sun.COM #define	L_NO_NODE_WWN_IN_WWNLIST	0x20106
180*7836SJohn.Forte@Sun.COM 
181*7836SJohn.Forte@Sun.COM /* Device's Node WWN not found in the Box list. */
182*7836SJohn.Forte@Sun.COM #define	L_NO_NODE_WWN_IN_BOXLIST	0x20107
183*7836SJohn.Forte@Sun.COM 
184*7836SJohn.Forte@Sun.COM /* Null WWN list found. */
185*7836SJohn.Forte@Sun.COM #define	L_NULL_WWN_LIST			0x20108
186*7836SJohn.Forte@Sun.COM 
187*7836SJohn.Forte@Sun.COM /* No devices found. */
188*7836SJohn.Forte@Sun.COM #define	L_NO_DEVICES_FOUND		0x20109
189*7836SJohn.Forte@Sun.COM 
190*7836SJohn.Forte@Sun.COM /* function arg error in wwn_list process */
191*7836SJohn.Forte@Sun.COM #define	L_PROC_WWN_ARG_ERROR		0x20110
192*7836SJohn.Forte@Sun.COM 
193*7836SJohn.Forte@Sun.COM /* WWN property not found */
194*7836SJohn.Forte@Sun.COM #define	L_NO_WWN_PROP_FOUND		0x20111
195*7836SJohn.Forte@Sun.COM 
196*7836SJohn.Forte@Sun.COM /* No driver nodes found for requested driver */
197*7836SJohn.Forte@Sun.COM #define	L_NO_DRIVER_NODES_FOUND		0x20112
198*7836SJohn.Forte@Sun.COM 
199*7836SJohn.Forte@Sun.COM /* ULP error on device(s) */
200*7836SJohn.Forte@Sun.COM #define	L_GET_DEV_LIST_ULP_FAILURE	0x20150
201*7836SJohn.Forte@Sun.COM 
202*7836SJohn.Forte@Sun.COM /*
203*7836SJohn.Forte@Sun.COM  * Error definitions
204*7836SJohn.Forte@Sun.COM  * for FC Loop (FC4 devices).
205*7836SJohn.Forte@Sun.COM  */
206*7836SJohn.Forte@Sun.COM /* Invalid loop map found */
207*7836SJohn.Forte@Sun.COM #define	L_INVALID_LOOP_MAP		0x20202
208*7836SJohn.Forte@Sun.COM 
209*7836SJohn.Forte@Sun.COM /* SFIOCGMAP ioctl failed */
210*7836SJohn.Forte@Sun.COM #define	L_SFIOCGMAP_IOCTL_FAIL		0x20203
211*7836SJohn.Forte@Sun.COM 
212*7836SJohn.Forte@Sun.COM /* FCIO_GETMAP ioctl failed */
213*7836SJohn.Forte@Sun.COM #define	L_FCIO_GETMAP_IOCTL_FAIL	0x20204
214*7836SJohn.Forte@Sun.COM 
215*7836SJohn.Forte@Sun.COM /* FCIO_LINKSTATUS ioctl failed */
216*7836SJohn.Forte@Sun.COM #define	L_FCIO_LINKSTATUS_FAILED	0x20205
217*7836SJohn.Forte@Sun.COM 
218*7836SJohn.Forte@Sun.COM /* FCIO_GETMAP: Invalid # of entries */
219*7836SJohn.Forte@Sun.COM #define	L_FCIOGETMAP_INVLD_LEN		0x20206
220*7836SJohn.Forte@Sun.COM 
221*7836SJohn.Forte@Sun.COM /* FCIO_FORCE_LIP ioctl failed. */
222*7836SJohn.Forte@Sun.COM #define	L_FCIO_FORCE_LIP_FAIL		0x20207
223*7836SJohn.Forte@Sun.COM 
224*7836SJohn.Forte@Sun.COM /* Error definitions for FC devices */
225*7836SJohn.Forte@Sun.COM /* FCIO_RESET_LINK ioctl failed */
226*7836SJohn.Forte@Sun.COM #define	L_FCIO_RESET_LINK_FAIL		0x20208
227*7836SJohn.Forte@Sun.COM 
228*7836SJohn.Forte@Sun.COM /* FCIO_GET_FCODE_REV_FAIL ioctl failed */
229*7836SJohn.Forte@Sun.COM #define	L_FCIO_GET_FCODE_REV_FAIL	0x20209
230*7836SJohn.Forte@Sun.COM 
231*7836SJohn.Forte@Sun.COM /* FCIO_GET_FW_REV_FAIL ioctl failed */
232*7836SJohn.Forte@Sun.COM #define	L_FCIO_GET_FW_REV_FAIL		0x20210
233*7836SJohn.Forte@Sun.COM 
234*7836SJohn.Forte@Sun.COM /* FCIO_GET_DEV_LIST returns invalid dev. counts */
235*7836SJohn.Forte@Sun.COM #define	L_INVALID_DEVICE_COUNT		0x20211
236*7836SJohn.Forte@Sun.COM 
237*7836SJohn.Forte@Sun.COM /* L_FCIO_GET_NUM_DEVS_FAIL ioctl failed */
238*7836SJohn.Forte@Sun.COM #define	L_FCIO_GET_NUM_DEVS_FAIL	0x20212
239*7836SJohn.Forte@Sun.COM 
240*7836SJohn.Forte@Sun.COM /* L_FCIO_GET_DEV_LIST_FAIL ioctl failed */
241*7836SJohn.Forte@Sun.COM #define	L_FCIO_GET_DEV_LIST_FAIL	0x20213
242*7836SJohn.Forte@Sun.COM 
243*7836SJohn.Forte@Sun.COM /* L_FCIO_GET_LINK_STATUS ioctl failed */
244*7836SJohn.Forte@Sun.COM #define	L_FCIO_GET_LINK_STATUS_FAIL	0x20214
245*7836SJohn.Forte@Sun.COM 
246*7836SJohn.Forte@Sun.COM /* L_FCIO_LOOPBACK_INTERNAL or FCIO_CMD/FCIO_LASER_OFF ioctl failed */
247*7836SJohn.Forte@Sun.COM #define	L_PORT_OFFLINE_FAIL		0x20215
248*7836SJohn.Forte@Sun.COM 
249*7836SJohn.Forte@Sun.COM /* Internal Loopback or laser off ioctls not supported */
250*7836SJohn.Forte@Sun.COM #define	L_PORT_OFFLINE_UNSUPPORTED	0x20216
251*7836SJohn.Forte@Sun.COM 
252*7836SJohn.Forte@Sun.COM /* L_FCIO_NO_LOOPBACK or FCIO_CMD/FCIO_LASER_ON ioctl failed */
253*7836SJohn.Forte@Sun.COM #define	L_PORT_ONLINE_FAIL		0x20217
254*7836SJohn.Forte@Sun.COM 
255*7836SJohn.Forte@Sun.COM /* No-Loopback or laser on ioctls not supported */
256*7836SJohn.Forte@Sun.COM #define	L_PORT_ONLINE_UNSUPPORTED	0x20218
257*7836SJohn.Forte@Sun.COM 
258*7836SJohn.Forte@Sun.COM /* L_FCIO_GET_HOST_PARAMS ioctl failed */
259*7836SJohn.Forte@Sun.COM #define	L_FCIO_GET_HOST_PARAMS_FAIL	0x20219
260*7836SJohn.Forte@Sun.COM 
261*7836SJohn.Forte@Sun.COM /* Loopback mode failure */
262*7836SJohn.Forte@Sun.COM #define	L_LOOPBACK_FAILED		0x20220
263*7836SJohn.Forte@Sun.COM 
264*7836SJohn.Forte@Sun.COM /* Loopback unsupported */
265*7836SJohn.Forte@Sun.COM #define	L_LOOPBACK_UNSUPPORTED		0x20221
266*7836SJohn.Forte@Sun.COM 
267*7836SJohn.Forte@Sun.COM /* FCIO_FORCE_LIP ioctl failed on one of the paths, say, of an MPXIO device */
268*7836SJohn.Forte@Sun.COM #define	L_FCIO_FORCE_LIP_PARTIAL_FAIL	0x20222
269*7836SJohn.Forte@Sun.COM 
270*7836SJohn.Forte@Sun.COM /*
271*7836SJohn.Forte@Sun.COM  * Error definitions
272*7836SJohn.Forte@Sun.COM  * for Fabric FC driver ioctls
273*7836SJohn.Forte@Sun.COM  */
274*7836SJohn.Forte@Sun.COM /* FCP_TGT_INQUIRY ioctl failed */
275*7836SJohn.Forte@Sun.COM #define	L_FCP_TGT_INQUIRY_FAIL		0x20250
276*7836SJohn.Forte@Sun.COM 
277*7836SJohn.Forte@Sun.COM /*
278*7836SJohn.Forte@Sun.COM  * Error definitions
279*7836SJohn.Forte@Sun.COM  * for 24-bit address handling
280*7836SJohn.Forte@Sun.COM  */
281*7836SJohn.Forte@Sun.COM /* Private loop address > 0xFF found */
282*7836SJohn.Forte@Sun.COM #define	L_INVALID_PRIVATE_LOOP_ADDRESS	0x20401
283*7836SJohn.Forte@Sun.COM 
284*7836SJohn.Forte@Sun.COM /* Encountered an unexpected fibre channel topology value */
285*7836SJohn.Forte@Sun.COM #define	L_UNEXPECTED_FC_TOPOLOGY	0x20402
286*7836SJohn.Forte@Sun.COM 
287*7836SJohn.Forte@Sun.COM /* Fabric address was not found */
288*7836SJohn.Forte@Sun.COM #define	L_NO_FABRIC_ADDR_FOUND		0x20403
289*7836SJohn.Forte@Sun.COM 
290*7836SJohn.Forte@Sun.COM /* The FCIO_GET_TOPOLOGY ioctl failed */
291*7836SJohn.Forte@Sun.COM #define	L_FCIO_GET_TOPOLOGY_FAIL	0x20404
292*7836SJohn.Forte@Sun.COM 
293*7836SJohn.Forte@Sun.COM /* Invalid fabric or public loop address */
294*7836SJohn.Forte@Sun.COM #define	L_INVALID_FABRIC_ADDRESS	0x20405
295*7836SJohn.Forte@Sun.COM 
296*7836SJohn.Forte@Sun.COM /* Point to Point fibre channel topology not supported */
297*7836SJohn.Forte@Sun.COM #define	L_PT_PT_FC_TOP_NOT_SUPPORTED	0x20406
298*7836SJohn.Forte@Sun.COM 
299*7836SJohn.Forte@Sun.COM /*
300*7836SJohn.Forte@Sun.COM  * Error definitions for Tapestry SAN support.
301*7836SJohn.Forte@Sun.COM  */
302*7836SJohn.Forte@Sun.COM /* The FCIO_DEV_LOGIN ioctl failed */
303*7836SJohn.Forte@Sun.COM #define	L_FCIO_DEV_LOGIN_FAIL		0x20407
304*7836SJohn.Forte@Sun.COM 
305*7836SJohn.Forte@Sun.COM /* The FCIO_DEV_LOGOUT ioctl failed */
306*7836SJohn.Forte@Sun.COM #define	L_FCIO_DEV_LOGOUT_FAIL		0x20408
307*7836SJohn.Forte@Sun.COM 
308*7836SJohn.Forte@Sun.COM /* Operation not supported on connected topology */
309*7836SJohn.Forte@Sun.COM #define	L_OPNOSUPP_ON_TOPOLOGY		0x20409
310*7836SJohn.Forte@Sun.COM 
311*7836SJohn.Forte@Sun.COM /* Operation not supported on the path */
312*7836SJohn.Forte@Sun.COM #define	L_INVALID_PATH_TYPE		0x20410
313*7836SJohn.Forte@Sun.COM 
314*7836SJohn.Forte@Sun.COM /* FCIO_GET_STATE ioctl failed */
315*7836SJohn.Forte@Sun.COM #define	L_FCIO_GET_STATE_FAIL		0x20411
316*7836SJohn.Forte@Sun.COM 
317*7836SJohn.Forte@Sun.COM /* input WWN not found in dev list */
318*7836SJohn.Forte@Sun.COM #define	L_WWN_NOT_FOUND_IN_DEV_LIST	0x20412
319*7836SJohn.Forte@Sun.COM 
320*7836SJohn.Forte@Sun.COM /*
321*7836SJohn.Forte@Sun.COM  * Error definitions for
322*7836SJohn.Forte@Sun.COM  * g_dev_map_init related routines.
323*7836SJohn.Forte@Sun.COM  */
324*7836SJohn.Forte@Sun.COM /* input addr invalid */
325*7836SJohn.Forte@Sun.COM #define	L_INVALID_MAP_DEV_ADDR		0x20430
326*7836SJohn.Forte@Sun.COM 
327*7836SJohn.Forte@Sun.COM /* input property invalid */
328*7836SJohn.Forte@Sun.COM #define	L_INVALID_MAP_DEV_PROP_NAME	0x20431
329*7836SJohn.Forte@Sun.COM 
330*7836SJohn.Forte@Sun.COM /* input property invalid */
331*7836SJohn.Forte@Sun.COM #define	L_INVALID_MAP_DEV_PROP_TYPE	0x20432
332*7836SJohn.Forte@Sun.COM 
333*7836SJohn.Forte@Sun.COM /* input property name invalid */
334*7836SJohn.Forte@Sun.COM #define	L_INVALID_MAP_DEV_PROP		0x20433
335*7836SJohn.Forte@Sun.COM 
336*7836SJohn.Forte@Sun.COM /* device not found */
337*7836SJohn.Forte@Sun.COM #define	L_NO_SUCH_DEV_FOUND		0x20434
338*7836SJohn.Forte@Sun.COM 
339*7836SJohn.Forte@Sun.COM /* prop not found */
340*7836SJohn.Forte@Sun.COM #define	L_NO_SUCH_PROP_FOUND		0x20435
341*7836SJohn.Forte@Sun.COM 
342*7836SJohn.Forte@Sun.COM /* invalid arg found */
343*7836SJohn.Forte@Sun.COM #define	L_INVALID_ARG			0x20436
344*7836SJohn.Forte@Sun.COM 
345*7836SJohn.Forte@Sun.COM /*
346*7836SJohn.Forte@Sun.COM  * Error definitions
347*7836SJohn.Forte@Sun.COM  * for Downloading IB FW.
348*7836SJohn.Forte@Sun.COM  */
349*7836SJohn.Forte@Sun.COM /* Invalid download file checksum */
350*7836SJohn.Forte@Sun.COM #define	L_DWNLD_CHKSUM_FAILED		0x20301
351*7836SJohn.Forte@Sun.COM 
352*7836SJohn.Forte@Sun.COM /* Unable to read download exec header */
353*7836SJohn.Forte@Sun.COM #define	L_DWNLD_READ_HEADER_FAIL	0x20302
354*7836SJohn.Forte@Sun.COM 
355*7836SJohn.Forte@Sun.COM /* Number of bytes read from download file is not correct */
356*7836SJohn.Forte@Sun.COM #define	L_DWNLD_READ_INCORRECT_BYTES	0x20303
357*7836SJohn.Forte@Sun.COM 
358*7836SJohn.Forte@Sun.COM /* Wrong text segment size */
359*7836SJohn.Forte@Sun.COM #define	L_DWNLD_INVALID_TEXT_SIZE	0x20304
360*7836SJohn.Forte@Sun.COM 
361*7836SJohn.Forte@Sun.COM /* Error reading the download file */
362*7836SJohn.Forte@Sun.COM #define	L_DWNLD_READ_ERROR		0x20305
363*7836SJohn.Forte@Sun.COM 
364*7836SJohn.Forte@Sun.COM /* Bad firmware magic found in the download file */
365*7836SJohn.Forte@Sun.COM #define	L_DWNLD_BAD_FRMWARE		0x20306
366*7836SJohn.Forte@Sun.COM 
367*7836SJohn.Forte@Sun.COM /* Timeout message for the IB to be available */
368*7836SJohn.Forte@Sun.COM #define	L_DWNLD_TIMED_OUT		0x20307
369*7836SJohn.Forte@Sun.COM 
370*7836SJohn.Forte@Sun.COM /* Error with Rec Diag page 1 */
371*7836SJohn.Forte@Sun.COM #define	L_REC_DIAG_PG1			0x20600
372*7836SJohn.Forte@Sun.COM 
373*7836SJohn.Forte@Sun.COM /* Invalid transfer Length */
374*7836SJohn.Forte@Sun.COM #define	L_TRANSFER_LEN			0x20601
375*7836SJohn.Forte@Sun.COM 
376*7836SJohn.Forte@Sun.COM /* A firmware file must be specified on the command line */
377*7836SJohn.Forte@Sun.COM #define	L_REQUIRE_FILE			0x20602
378*7836SJohn.Forte@Sun.COM 
379*7836SJohn.Forte@Sun.COM 
380*7836SJohn.Forte@Sun.COM /*
381*7836SJohn.Forte@Sun.COM  * Error definitions
382*7836SJohn.Forte@Sun.COM  * for System Errors
383*7836SJohn.Forte@Sun.COM  */
384*7836SJohn.Forte@Sun.COM #define	L_MALLOC_FAILED			0x30000
385*7836SJohn.Forte@Sun.COM 
386*7836SJohn.Forte@Sun.COM #define	L_MEMCPY_FAILED			0x30001
387*7836SJohn.Forte@Sun.COM 
388*7836SJohn.Forte@Sun.COM /* Cannot get status for the given path */
389*7836SJohn.Forte@Sun.COM #define	L_LSTAT_ERROR			0x30020
390*7836SJohn.Forte@Sun.COM 
391*7836SJohn.Forte@Sun.COM /* Error reading the symbolic link */
392*7836SJohn.Forte@Sun.COM #define	L_SYMLINK_ERROR			0x30021
393*7836SJohn.Forte@Sun.COM 
394*7836SJohn.Forte@Sun.COM /* Could not convert std. time to hrs/min/sec */
395*7836SJohn.Forte@Sun.COM #define	L_LOCALTIME_ERROR		0x30022
396*7836SJohn.Forte@Sun.COM 
397*7836SJohn.Forte@Sun.COM /* select() system call failed to wait for specified time */
398*7836SJohn.Forte@Sun.COM #define	L_SELECT_ERROR			0x30023
399*7836SJohn.Forte@Sun.COM 
400*7836SJohn.Forte@Sun.COM /* uname() system call failed to get the system info. */
401*7836SJohn.Forte@Sun.COM #define	L_UNAME_FAILED			0x30024
402*7836SJohn.Forte@Sun.COM 
403*7836SJohn.Forte@Sun.COM /* Cannot get status for the given path */
404*7836SJohn.Forte@Sun.COM #define	L_FSTAT_ERROR			0x30025
405*7836SJohn.Forte@Sun.COM 
406*7836SJohn.Forte@Sun.COM /* Cannot get status for the given path */
407*7836SJohn.Forte@Sun.COM #define	L_STAT_ERROR			0x30026
408*7836SJohn.Forte@Sun.COM 
409*7836SJohn.Forte@Sun.COM /* di_init() failed to return snapshot of device tree */
410*7836SJohn.Forte@Sun.COM #define	L_DEV_SNAPSHOT_FAILED		0x30027
411*7836SJohn.Forte@Sun.COM 
412*7836SJohn.Forte@Sun.COM /* di_drv_first_node() failed to find a valid driver */
413*7836SJohn.Forte@Sun.COM #define	L_PORT_DRIVER_NOT_FOUND		0x30029
414*7836SJohn.Forte@Sun.COM 
415*7836SJohn.Forte@Sun.COM /* failed to find any device paths */
416*7836SJohn.Forte@Sun.COM #define	L_PHYS_PATH_NOT_FOUND		0x30030
417*7836SJohn.Forte@Sun.COM 
418*7836SJohn.Forte@Sun.COM /* No device identifier found  */
419*7836SJohn.Forte@Sun.COM #define	L_NO_DEVID			0x30031
420*7836SJohn.Forte@Sun.COM 
421*7836SJohn.Forte@Sun.COM /* Driver not supported */
422*7836SJohn.Forte@Sun.COM #define	L_DRIVER_NOTSUPP		0x30032
423*7836SJohn.Forte@Sun.COM 
424*7836SJohn.Forte@Sun.COM /* di_prom_init failure */
425*7836SJohn.Forte@Sun.COM #define	L_PROM_INIT_FAILED		0x30033
426*7836SJohn.Forte@Sun.COM 
427*7836SJohn.Forte@Sun.COM /*
428*7836SJohn.Forte@Sun.COM  * Error definitions
429*7836SJohn.Forte@Sun.COM  * for individual
430*7836SJohn.Forte@Sun.COM  * devices.
431*7836SJohn.Forte@Sun.COM  */
432*7836SJohn.Forte@Sun.COM /* Device busy */
433*7836SJohn.Forte@Sun.COM #define	L_DEV_BUSY			0x40000
434*7836SJohn.Forte@Sun.COM 
435*7836SJohn.Forte@Sun.COM /* Disk reserved */
436*7836SJohn.Forte@Sun.COM #define	L_DEVICE_RESERVED		0x40001
437*7836SJohn.Forte@Sun.COM 
438*7836SJohn.Forte@Sun.COM /* One or more disks in enclosure are reserved */
439*7836SJohn.Forte@Sun.COM #define	L_DISKS_RESERVED		0x40002
440*7836SJohn.Forte@Sun.COM 
441*7836SJohn.Forte@Sun.COM /* Exclusive open to a device failed. May be busy */
442*7836SJohn.Forte@Sun.COM #define	L_EXCL_OPEN_FAILED		0x40003
443*7836SJohn.Forte@Sun.COM 
444*7836SJohn.Forte@Sun.COM /* Empty slot: Device not installed */
445*7836SJohn.Forte@Sun.COM #define	L_SLOT_EMPTY			0x40100
446*7836SJohn.Forte@Sun.COM 
447*7836SJohn.Forte@Sun.COM 
448*7836SJohn.Forte@Sun.COM /*
449*7836SJohn.Forte@Sun.COM  * Error definitions
450*7836SJohn.Forte@Sun.COM  * for Devctl functions.
451*7836SJohn.Forte@Sun.COM  */
452*7836SJohn.Forte@Sun.COM /* Devctl acquire fails */
453*7836SJohn.Forte@Sun.COM #define	L_ACQUIRE_FAIL			0x40200
454*7836SJohn.Forte@Sun.COM 
455*7836SJohn.Forte@Sun.COM 
456*7836SJohn.Forte@Sun.COM /* Power off fails. Device may be busy */
457*7836SJohn.Forte@Sun.COM #define	L_POWER_OFF_FAIL_BUSY		0x40300
458*7836SJohn.Forte@Sun.COM 
459*7836SJohn.Forte@Sun.COM 
460*7836SJohn.Forte@Sun.COM /*
461*7836SJohn.Forte@Sun.COM  * Error definitions
462*7836SJohn.Forte@Sun.COM  * specific to Enclosure.
463*7836SJohn.Forte@Sun.COM  */
464*7836SJohn.Forte@Sun.COM /* Failed to change the enclosure name */
465*7836SJohn.Forte@Sun.COM #define	L_ENCL_NAME_CHANGE_FAIL		0x40400
466*7836SJohn.Forte@Sun.COM 
467*7836SJohn.Forte@Sun.COM /* Duplicate enclosure names found */
468*7836SJohn.Forte@Sun.COM #define	L_DUPLICATE_ENCLOSURES		0x40401
469*7836SJohn.Forte@Sun.COM 
470*7836SJohn.Forte@Sun.COM /* Invalid no. of dsks in SENA enclosure */
471*7836SJohn.Forte@Sun.COM #define	L_INVALID_NUM_DISKS_ENCL	0x40402
472*7836SJohn.Forte@Sun.COM 
473*7836SJohn.Forte@Sun.COM /* Path is not to a SENA ecnlosure. */
474*7836SJohn.Forte@Sun.COM #define	L_ENCL_INVALID_PATH		0x40403
475*7836SJohn.Forte@Sun.COM 
476*7836SJohn.Forte@Sun.COM /* Cannot get the box list */
477*7836SJohn.Forte@Sun.COM #define	L_NO_ENCL_LIST_FOUND		0x40404
478*7836SJohn.Forte@Sun.COM 
479*7836SJohn.Forte@Sun.COM 
480*7836SJohn.Forte@Sun.COM /*
481*7836SJohn.Forte@Sun.COM  * Error definitions
482*7836SJohn.Forte@Sun.COM  * specific to IB.
483*7836SJohn.Forte@Sun.COM  */
484*7836SJohn.Forte@Sun.COM /* No element returned from the enclosure */
485*7836SJohn.Forte@Sun.COM #define	L_IB_NO_ELEM_FOUND		0x40500
486*7836SJohn.Forte@Sun.COM 
487*7836SJohn.Forte@Sun.COM /* Invalid page code found in Receive Diag. page.   */
488*7836SJohn.Forte@Sun.COM #define	L_RD_PG_INVLD_CODE		0x40501
489*7836SJohn.Forte@Sun.COM 
490*7836SJohn.Forte@Sun.COM /* Reading Receive Diag. page failed: small buffer. */
491*7836SJohn.Forte@Sun.COM #define	L_RD_PG_MIN_BUFF		0x40502
492*7836SJohn.Forte@Sun.COM 
493*7836SJohn.Forte@Sun.COM /* Get status failed    */
494*7836SJohn.Forte@Sun.COM #define	L_GET_STATUS_FAILED		0x40600
495*7836SJohn.Forte@Sun.COM 
496*7836SJohn.Forte@Sun.COM /* Warning define. */
497*7836SJohn.Forte@Sun.COM #define	L_WARNING			0x90000
498*7836SJohn.Forte@Sun.COM 
499*7836SJohn.Forte@Sun.COM /*
500*7836SJohn.Forte@Sun.COM  * For i18n
501*7836SJohn.Forte@Sun.COM  */
502*7836SJohn.Forte@Sun.COM #include <nl_types.h>
503*7836SJohn.Forte@Sun.COM extern nl_catd l_catd;
504*7836SJohn.Forte@Sun.COM #define	L_SET1				1	/* catalog set number */
505*7836SJohn.Forte@Sun.COM #define	MSGSTR(Num, Str)	catgets(l_catd, L_SET1, Num, Str)
506*7836SJohn.Forte@Sun.COM 
507*7836SJohn.Forte@Sun.COM 
508*7836SJohn.Forte@Sun.COM #ifdef	__cplusplus
509*7836SJohn.Forte@Sun.COM }
510*7836SJohn.Forte@Sun.COM #endif
511*7836SJohn.Forte@Sun.COM 
512*7836SJohn.Forte@Sun.COM #endif	/* _STGCOM_H */
513