xref: /onnv-gate/usr/src/uts/common/pcmcia/sys/cs_strings.h (revision 0:68f95e015346)
1*0Sstevel@tonic-gate /*
2*0Sstevel@tonic-gate  * CDDL HEADER START
3*0Sstevel@tonic-gate  *
4*0Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*0Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
6*0Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
7*0Sstevel@tonic-gate  * with the License.
8*0Sstevel@tonic-gate  *
9*0Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*0Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
11*0Sstevel@tonic-gate  * See the License for the specific language governing permissions
12*0Sstevel@tonic-gate  * and limitations under the License.
13*0Sstevel@tonic-gate  *
14*0Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
15*0Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*0Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
17*0Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
18*0Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
19*0Sstevel@tonic-gate  *
20*0Sstevel@tonic-gate  * CDDL HEADER END
21*0Sstevel@tonic-gate  */
22*0Sstevel@tonic-gate /*
23*0Sstevel@tonic-gate  * Copyright (c) 1995-1996 by Sun Microsystems, Inc.
24*0Sstevel@tonic-gate  * All rights reserved.
25*0Sstevel@tonic-gate  */
26*0Sstevel@tonic-gate 
27*0Sstevel@tonic-gate #ifndef _CS_STRINGS_H
28*0Sstevel@tonic-gate #define	_CS_STRINGS_H
29*0Sstevel@tonic-gate 
30*0Sstevel@tonic-gate #pragma ident	"%W%	%E% SMI"
31*0Sstevel@tonic-gate 
32*0Sstevel@tonic-gate #ifdef	__cplusplus
33*0Sstevel@tonic-gate extern "C" {
34*0Sstevel@tonic-gate #endif
35*0Sstevel@tonic-gate 
36*0Sstevel@tonic-gate /*
37*0Sstevel@tonic-gate  * These values depend on the size of the cs_ss_event_text_t array
38*0Sstevel@tonic-gate  *	and on the number of CS events that we want the client to
39*0Sstevel@tonic-gate  *	be able to display.
40*0Sstevel@tonic-gate  * XXX - this should be determined automatically
41*0Sstevel@tonic-gate  */
42*0Sstevel@tonic-gate #define	MAX_SS_EVENTS	9	/* maximum SS events */
43*0Sstevel@tonic-gate #define	MAX_CS_EVENTS	28	/* maximum CS events */
44*0Sstevel@tonic-gate 
45*0Sstevel@tonic-gate /*
46*0Sstevel@tonic-gate  * The cs_ss_event_text_t structure is used to support the Event2Text
47*0Sstevel@tonic-gate  *	and cs_event2text function.  MAX_SS_EVENTS and MAX_CS_EVENTS
48*0Sstevel@tonic-gate  *	are defined in the cs_priv.h header file.  If the size of this
49*0Sstevel@tonic-gate  *	array or strctures changes, the MAX_CS_EVENT_BUFSIZE define
50*0Sstevel@tonic-gate  *	which is in cs.h might need to be changed as well.
51*0Sstevel@tonic-gate  */
52*0Sstevel@tonic-gate cs_ss_event_text_t cs_ss_event_text[MAX_CS_EVENTS+1] = {
53*0Sstevel@tonic-gate 	{ PCE_CARD_REMOVAL, CS_EVENT_CARD_REMOVAL, "CARD_REMOVAL" },
54*0Sstevel@tonic-gate 	{ PCE_CARD_INSERT, CS_EVENT_CARD_INSERTION, "CARD_INSERTION" },
55*0Sstevel@tonic-gate 	{ PCE_CARD_READY, CS_EVENT_CARD_READY, "CARD_READY" },
56*0Sstevel@tonic-gate 	{ PCE_CARD_BATTERY_WARN, CS_EVENT_BATTERY_LOW, "BATTERY_WARN" },
57*0Sstevel@tonic-gate 	{ PCE_CARD_BATTERY_DEAD, CS_EVENT_BATTERY_DEAD, "BATTERY_DEAD" },
58*0Sstevel@tonic-gate 	{ PCE_CARD_STATUS_CHANGE, 0, "STATUS_CHANGE" },
59*0Sstevel@tonic-gate 	{ PCE_CARD_WRITE_PROTECT, CS_EVENT_WRITE_PROTECT, "WRITE_PROTECT" },
60*0Sstevel@tonic-gate 	{ PCE_PM_RESUME, CS_EVENT_PM_RESUME, "PM_RESUME" },
61*0Sstevel@tonic-gate 	{ PCE_PM_SUSPEND, CS_EVENT_PM_SUSPEND, "PM_SUSPEND" },
62*0Sstevel@tonic-gate 	{ 0, CS_EVENT_REGISTRATION_COMPLETE, "REGISTRATION_COMPLETE" },
63*0Sstevel@tonic-gate 	{ 0, CS_EVENT_CARD_LOCK, "CARD_LOCK" },
64*0Sstevel@tonic-gate 	{ 0, CS_EVENT_CARD_RESET, "CARD_RESET" },
65*0Sstevel@tonic-gate 	{ 0, CS_EVENT_CARD_UNLOCK, "CARD_UNLOCK" },
66*0Sstevel@tonic-gate 	{ 0, CS_EVENT_EJECTION_COMPLETE, "EJECTION_COMPLETE" },
67*0Sstevel@tonic-gate 	{ 0, CS_EVENT_EJECTION_REQUEST, "EJECTION_REQUEST" },
68*0Sstevel@tonic-gate 	{ 0, CS_EVENT_ERASE_COMPLETE, "ERASE_COMPLETE" },
69*0Sstevel@tonic-gate 	{ 0, CS_EVENT_EXCLUSIVE_COMPLETE, "EXCLUSIVE_COMPLETE" },
70*0Sstevel@tonic-gate 	{ 0, CS_EVENT_EXCLUSIVE_REQUEST, "EXCLUSIVE_REQUEST" },
71*0Sstevel@tonic-gate 	{ 0, CS_EVENT_INSERTION_COMPLETE, "INSERTION_COMPLETE" },
72*0Sstevel@tonic-gate 	{ 0, CS_EVENT_INSERTION_REQUEST, "INSERTION_REQUEST" },
73*0Sstevel@tonic-gate 	{ 0, CS_EVENT_RESET_COMPLETE, "RESET_COMPLETE" },
74*0Sstevel@tonic-gate 	{ 0, CS_EVENT_RESET_PHYSICAL, "RESET_PHYSICAL" },
75*0Sstevel@tonic-gate 	{ 0, CS_EVENT_RESET_REQUEST, "RESET_REQUEST" },
76*0Sstevel@tonic-gate 	{ 0, CS_EVENT_MTD_REQUEST, "MTD_REQUEST" },
77*0Sstevel@tonic-gate 	{ 0, CS_EVENT_CLIENT_INFO, "CLIENT_INFO" },
78*0Sstevel@tonic-gate 	{ 0, CS_EVENT_TIMER_EXPIRED, "TIMER_EXPIRED" },
79*0Sstevel@tonic-gate 	{ 0, CS_EVENT_SS_UPDATED, "SS_UPDATED" },
80*0Sstevel@tonic-gate 	{ 0, CS_EVENT_CARD_REMOVAL_LOWP, "CARD_REMOVAL_LOWP" },
81*0Sstevel@tonic-gate 	{ MAX_SS_EVENTS, 0, "{undefined}" },
82*0Sstevel@tonic-gate };
83*0Sstevel@tonic-gate 
84*0Sstevel@tonic-gate cs_csfunc2text_strings_t cs_csfunc2text_funcstrings[] = {
85*0Sstevel@tonic-gate 	{ CISRegister, "CISRegister" },
86*0Sstevel@tonic-gate 	{ CISUnregister, "CISUnregister" },
87*0Sstevel@tonic-gate 	{ InitCISWindow, "InitCISWindow" },
88*0Sstevel@tonic-gate 	{ GetCardServicesInfo, "GetCardServicesInfo" },
89*0Sstevel@tonic-gate 	{ RegisterClient, "RegisterClient" },
90*0Sstevel@tonic-gate 	{ DeregisterClient, "DeregisterClient" },
91*0Sstevel@tonic-gate 	{ GetStatus, "GetStatus" },
92*0Sstevel@tonic-gate 	{ ResetFunction, "ResetFunction" },
93*0Sstevel@tonic-gate 	{ SetEventMask, "SetEventMask" },
94*0Sstevel@tonic-gate 	{ GetEventMask, "GetEventMask" },
95*0Sstevel@tonic-gate 	{ RequestIO, "RequestIO" },
96*0Sstevel@tonic-gate 	{ ReleaseIO, "ReleaseIO" },
97*0Sstevel@tonic-gate 	{ RequestIRQ, "RequestIRQ" },
98*0Sstevel@tonic-gate 	{ ReleaseIRQ, "ReleaseIRQ" },
99*0Sstevel@tonic-gate 	{ RequestWindow, "RequestWindow" },
100*0Sstevel@tonic-gate 	{ ReleaseWindow, "ReleaseWindow" },
101*0Sstevel@tonic-gate 	{ ModifyWindow, "ModifyWindow" },
102*0Sstevel@tonic-gate 	{ MapMemPage, "MapMemPage" },
103*0Sstevel@tonic-gate 	{ RequestSocketMask, "RequestSocketMask" },
104*0Sstevel@tonic-gate 	{ ReleaseSocketMask, "ReleaseSocketMask" },
105*0Sstevel@tonic-gate 	{ RequestConfiguration, "RequestConfiguration" },
106*0Sstevel@tonic-gate 	{ GetConfigurationInfo, "GetConfigurationInfo" },
107*0Sstevel@tonic-gate 	{ ModifyConfiguration, "ModifyConfiguration" },
108*0Sstevel@tonic-gate 	{ ReleaseConfiguration, "ReleaseConfiguration" },
109*0Sstevel@tonic-gate 	{ OpenMemory, "OpenMemory" },
110*0Sstevel@tonic-gate 	{ ReadMemory, "ReadMemory" },
111*0Sstevel@tonic-gate 	{ WriteMemory, "WriteMemory" },
112*0Sstevel@tonic-gate 	{ CopyMemory, "CopyMemory" },
113*0Sstevel@tonic-gate 	{ RegisterEraseQueue, "RegisterEraseQueue" },
114*0Sstevel@tonic-gate 	{ CheckEraseQueue, "CheckEraseQueue" },
115*0Sstevel@tonic-gate 	{ DeregisterEraseQueue, "DeregisterEraseQueue" },
116*0Sstevel@tonic-gate 	{ CloseMemory, "CloseMemory" },
117*0Sstevel@tonic-gate 	{ GetFirstRegion, "GetFirstRegion" },
118*0Sstevel@tonic-gate 	{ GetNextRegion, "GetNextRegion" },
119*0Sstevel@tonic-gate 	{ GetFirstPartition, "GetFirstPartition" },
120*0Sstevel@tonic-gate 	{ GetNextPartition, "GetNextPartition" },
121*0Sstevel@tonic-gate 	{ ReturnSSEntry, "ReturnSSEntry" },
122*0Sstevel@tonic-gate 	{ MapLogSocket, "MapLogSocket" },
123*0Sstevel@tonic-gate 	{ MapPhySocket, "MapPhySocket" },
124*0Sstevel@tonic-gate 	{ MapLogWindow, "MapLogWindow" },
125*0Sstevel@tonic-gate 	{ MapPhyWindow, "MapPhyWindow" },
126*0Sstevel@tonic-gate 	{ RegisterMTD, "RegisterMTD" },
127*0Sstevel@tonic-gate 	{ RegisterTimer, "RegisterTimer" },
128*0Sstevel@tonic-gate 	{ SetRegion, "SetRegion" },
129*0Sstevel@tonic-gate 	{ RequestExclusive, "RequestExclusive" },
130*0Sstevel@tonic-gate 	{ ReleaseExclusive, "ReleaseExclusive" },
131*0Sstevel@tonic-gate 	{ GetFirstClient, "GetFirstClient" },
132*0Sstevel@tonic-gate 	{ GetNextClient, "GetNextClient" },
133*0Sstevel@tonic-gate 	{ GetClientInfo, "GetClientInfo" },
134*0Sstevel@tonic-gate 	{ AddSocketServices, "AddSocketServices" },
135*0Sstevel@tonic-gate 	{ ReplaceSocketServices, "ReplaceSocketServices" },
136*0Sstevel@tonic-gate 	{ VendorSpecific, "VendorSpecific" },
137*0Sstevel@tonic-gate 	{ AdjustResourceInfo, "AdjustResourceInfo" },
138*0Sstevel@tonic-gate 	{ ValidateCIS, "ValidateCIS" },
139*0Sstevel@tonic-gate 	{ GetFirstTuple, "GetFirstTuple" },
140*0Sstevel@tonic-gate 	{ GetNextTuple, "GetNextTuple" },
141*0Sstevel@tonic-gate 	{ GetTupleData, "GetTupleData" },
142*0Sstevel@tonic-gate 	{ ParseTuple, "ParseTuple" },
143*0Sstevel@tonic-gate 	{ MakeDeviceNode, "MakeDeviceNode" },
144*0Sstevel@tonic-gate 	{ RemoveDeviceNode, "RemoveDeviceNode" },
145*0Sstevel@tonic-gate 	{ ConvertSpeed, "ConvertSpeed" },
146*0Sstevel@tonic-gate 	{ ConvertSize, "ConvertSize" },
147*0Sstevel@tonic-gate 	{ Event2Text, "Event2Text" },
148*0Sstevel@tonic-gate 	{ Error2Text, "Error2Text" },
149*0Sstevel@tonic-gate 	{ AccessConfigurationRegister, "AccessConfigurationRegister" },
150*0Sstevel@tonic-gate 	{ CS_DDI_Info, "CS_DDI_Info" },
151*0Sstevel@tonic-gate 	{ CS_Sys_Ctl, "CS_Sys_Ctl" },
152*0Sstevel@tonic-gate 	{ CSFuncListEnd, "{unknown Card Services function}" },
153*0Sstevel@tonic-gate };
154*0Sstevel@tonic-gate 
155*0Sstevel@tonic-gate cs_csfunc2text_strings_t cs_csfunc2text_returnstrings[] = {
156*0Sstevel@tonic-gate 	{ CS_SUCCESS, "CS_SUCCESS" },
157*0Sstevel@tonic-gate 	{ CS_BAD_ADAPTER, "CS_BAD_ADAPTER" },
158*0Sstevel@tonic-gate 	{ CS_BAD_ATTRIBUTE, "CS_BAD_ATTRIBUTE" },
159*0Sstevel@tonic-gate 	{ CS_BAD_BASE, "CS_BAD_BASE" },
160*0Sstevel@tonic-gate 	{ CS_BAD_EDC, "CS_BAD_EDC" },
161*0Sstevel@tonic-gate 	{ CS_BAD_IRQ, "CS_BAD_IRQ" },
162*0Sstevel@tonic-gate 	{ CS_BAD_OFFSET, "CS_BAD_OFFSET" },
163*0Sstevel@tonic-gate 	{ CS_BAD_PAGE, "CS_BAD_PAGE" },
164*0Sstevel@tonic-gate 	{ CS_READ_FAILURE, "CS_READ_FAILURE" },
165*0Sstevel@tonic-gate 	{ CS_BAD_SIZE, "CS_BAD_SIZE" },
166*0Sstevel@tonic-gate 	{ CS_BAD_SOCKET, "CS_BAD_SOCKET" },
167*0Sstevel@tonic-gate 	{ CS_BAD_TYPE, "CS_BAD_TYPE" },
168*0Sstevel@tonic-gate 	{ CS_BAD_VCC, "CS_BAD_VCC" },
169*0Sstevel@tonic-gate 	{ CS_BAD_VPP, "CS_BAD_VPP" },
170*0Sstevel@tonic-gate 	{ CS_BAD_WINDOW, "CS_BAD_WINDOW" },
171*0Sstevel@tonic-gate 	{ CS_WRITE_FAILURE, "CS_WRITE_FAILURE" },
172*0Sstevel@tonic-gate 	{ CS_NO_CARD, "CS_NO_CARD" },
173*0Sstevel@tonic-gate 	{ CS_UNSUPPORTED_FUNCTION, "CS_UNSUPPORTED_FUNCTION" },
174*0Sstevel@tonic-gate 	{ CS_UNSUPPORTED_MODE, "CS_UNSUPPORTED_MODE" },
175*0Sstevel@tonic-gate 	{ CS_BAD_SPEED, "CS_BAD_SPEED" },
176*0Sstevel@tonic-gate 	{ CS_BUSY, "CS_BUSY" },
177*0Sstevel@tonic-gate 	{ CS_GENERAL_FAILURE, "CS_GENERAL_FAILURE" },
178*0Sstevel@tonic-gate 	{ CS_WRITE_PROTECTED, "CS_WRITE_PROTECTED" },
179*0Sstevel@tonic-gate 	{ CS_BAD_ARG_LENGTH, "CS_BAD_ARG_LENGTH" },
180*0Sstevel@tonic-gate 	{ CS_BAD_ARGS, "CS_BAD_ARGS" },
181*0Sstevel@tonic-gate 	{ CS_CONFIGURATION_LOCKED, "CS_CONFIGURATION_LOCKED" },
182*0Sstevel@tonic-gate 	{ CS_IN_USE, "CS_IN_USE" },
183*0Sstevel@tonic-gate 	{ CS_NO_MORE_ITEMS, "CS_NO_MORE_ITEMS" },
184*0Sstevel@tonic-gate 	{ CS_OUT_OF_RESOURCE, "CS_OUT_OF_RESOURCE" },
185*0Sstevel@tonic-gate 	{ CS_BAD_HANDLE, "CS_BAD_HANDLE" },
186*0Sstevel@tonic-gate 	{ CS_NO_CIS, "CS_NO_CIS" },
187*0Sstevel@tonic-gate 	{ CS_BAD_CIS, "CS_BAD_CIS" },
188*0Sstevel@tonic-gate 	{ CS_UNKNOWN_TUPLE, "CS_UNKNOWN_TUPLE" },
189*0Sstevel@tonic-gate 	{ CS_BAD_VERSION, "CS_BAD_VERSION" },
190*0Sstevel@tonic-gate 	{ CS_UNSUPPORTED_EVENT, "CS_UNSUPPORTED_EVENT" },
191*0Sstevel@tonic-gate 	{ CS_CSI_ERROR, "CS_CSI_ERROR" },
192*0Sstevel@tonic-gate 	{ CS_CSI_NOT_INIT, "CS_CSI_NOT_INIT" },
193*0Sstevel@tonic-gate 	{ CS_NO_TUPLE_PARSER, "CS_NO_TUPLE_PARSER" },
194*0Sstevel@tonic-gate 	{ CS_ERRORLIST_END, "{unknown Card Services return code}" },
195*0Sstevel@tonic-gate };
196*0Sstevel@tonic-gate 
197*0Sstevel@tonic-gate #ifdef	__cplusplus
198*0Sstevel@tonic-gate }
199*0Sstevel@tonic-gate #endif
200*0Sstevel@tonic-gate 
201*0Sstevel@tonic-gate #endif /* _CS_STRINGS_H */
202