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