xref: /illumos-gate/usr/src/uts/common/pcmcia/sys/cs_strings.h (revision e3ae4b35c024af1196582063ecee3ab79367227d)
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 #ifdef	__cplusplus
31 extern "C" {
32 #endif
33 
34 /*
35  * These values depend on the size of the cs_ss_event_text_t array
36  *	and on the number of CS events that we want the client to
37  *	be able to display.
38  * XXX - this should be determined automatically
39  */
40 #define	MAX_SS_EVENTS	9	/* maximum SS events */
41 #define	MAX_CS_EVENTS	28	/* maximum CS events */
42 
43 /*
44  * The cs_ss_event_text_t structure is used to support the Event2Text
45  *	and cs_event2text function.  MAX_SS_EVENTS and MAX_CS_EVENTS
46  *	are defined in the cs_priv.h header file.  If the size of this
47  *	array or strctures changes, the MAX_CS_EVENT_BUFSIZE define
48  *	which is in cs.h might need to be changed as well.
49  */
50 cs_ss_event_text_t cs_ss_event_text[MAX_CS_EVENTS+1] = {
51 	{ PCE_CARD_REMOVAL, CS_EVENT_CARD_REMOVAL, "CARD_REMOVAL" },
52 	{ PCE_CARD_INSERT, CS_EVENT_CARD_INSERTION, "CARD_INSERTION" },
53 	{ PCE_CARD_READY, CS_EVENT_CARD_READY, "CARD_READY" },
54 	{ PCE_CARD_BATTERY_WARN, CS_EVENT_BATTERY_LOW, "BATTERY_WARN" },
55 	{ PCE_CARD_BATTERY_DEAD, CS_EVENT_BATTERY_DEAD, "BATTERY_DEAD" },
56 	{ PCE_CARD_STATUS_CHANGE, 0, "STATUS_CHANGE" },
57 	{ PCE_CARD_WRITE_PROTECT, CS_EVENT_WRITE_PROTECT, "WRITE_PROTECT" },
58 	{ PCE_PM_RESUME, CS_EVENT_PM_RESUME, "PM_RESUME" },
59 	{ PCE_PM_SUSPEND, CS_EVENT_PM_SUSPEND, "PM_SUSPEND" },
60 	{ 0, CS_EVENT_REGISTRATION_COMPLETE, "REGISTRATION_COMPLETE" },
61 	{ 0, CS_EVENT_CARD_LOCK, "CARD_LOCK" },
62 	{ 0, CS_EVENT_CARD_RESET, "CARD_RESET" },
63 	{ 0, CS_EVENT_CARD_UNLOCK, "CARD_UNLOCK" },
64 	{ 0, CS_EVENT_EJECTION_COMPLETE, "EJECTION_COMPLETE" },
65 	{ 0, CS_EVENT_EJECTION_REQUEST, "EJECTION_REQUEST" },
66 	{ 0, CS_EVENT_ERASE_COMPLETE, "ERASE_COMPLETE" },
67 	{ 0, CS_EVENT_EXCLUSIVE_COMPLETE, "EXCLUSIVE_COMPLETE" },
68 	{ 0, CS_EVENT_EXCLUSIVE_REQUEST, "EXCLUSIVE_REQUEST" },
69 	{ 0, CS_EVENT_INSERTION_COMPLETE, "INSERTION_COMPLETE" },
70 	{ 0, CS_EVENT_INSERTION_REQUEST, "INSERTION_REQUEST" },
71 	{ 0, CS_EVENT_RESET_COMPLETE, "RESET_COMPLETE" },
72 	{ 0, CS_EVENT_RESET_PHYSICAL, "RESET_PHYSICAL" },
73 	{ 0, CS_EVENT_RESET_REQUEST, "RESET_REQUEST" },
74 	{ 0, CS_EVENT_MTD_REQUEST, "MTD_REQUEST" },
75 	{ 0, CS_EVENT_CLIENT_INFO, "CLIENT_INFO" },
76 	{ 0, CS_EVENT_TIMER_EXPIRED, "TIMER_EXPIRED" },
77 	{ 0, CS_EVENT_SS_UPDATED, "SS_UPDATED" },
78 	{ 0, CS_EVENT_CARD_REMOVAL_LOWP, "CARD_REMOVAL_LOWP" },
79 	{ MAX_SS_EVENTS, 0, "{undefined}" },
80 };
81 
82 cs_csfunc2text_strings_t cs_csfunc2text_funcstrings[] = {
83 	{ CISRegister, "CISRegister" },
84 	{ CISUnregister, "CISUnregister" },
85 	{ InitCISWindow, "InitCISWindow" },
86 	{ GetCardServicesInfo, "GetCardServicesInfo" },
87 	{ RegisterClient, "RegisterClient" },
88 	{ DeregisterClient, "DeregisterClient" },
89 	{ GetStatus, "GetStatus" },
90 	{ ResetFunction, "ResetFunction" },
91 	{ SetEventMask, "SetEventMask" },
92 	{ GetEventMask, "GetEventMask" },
93 	{ RequestIO, "RequestIO" },
94 	{ ReleaseIO, "ReleaseIO" },
95 	{ RequestIRQ, "RequestIRQ" },
96 	{ ReleaseIRQ, "ReleaseIRQ" },
97 	{ RequestWindow, "RequestWindow" },
98 	{ ReleaseWindow, "ReleaseWindow" },
99 	{ ModifyWindow, "ModifyWindow" },
100 	{ MapMemPage, "MapMemPage" },
101 	{ RequestSocketMask, "RequestSocketMask" },
102 	{ ReleaseSocketMask, "ReleaseSocketMask" },
103 	{ RequestConfiguration, "RequestConfiguration" },
104 	{ GetConfigurationInfo, "GetConfigurationInfo" },
105 	{ ModifyConfiguration, "ModifyConfiguration" },
106 	{ ReleaseConfiguration, "ReleaseConfiguration" },
107 	{ OpenMemory, "OpenMemory" },
108 	{ ReadMemory, "ReadMemory" },
109 	{ WriteMemory, "WriteMemory" },
110 	{ CopyMemory, "CopyMemory" },
111 	{ RegisterEraseQueue, "RegisterEraseQueue" },
112 	{ CheckEraseQueue, "CheckEraseQueue" },
113 	{ DeregisterEraseQueue, "DeregisterEraseQueue" },
114 	{ CloseMemory, "CloseMemory" },
115 	{ GetFirstRegion, "GetFirstRegion" },
116 	{ GetNextRegion, "GetNextRegion" },
117 	{ GetFirstPartition, "GetFirstPartition" },
118 	{ GetNextPartition, "GetNextPartition" },
119 	{ ReturnSSEntry, "ReturnSSEntry" },
120 	{ MapLogSocket, "MapLogSocket" },
121 	{ MapPhySocket, "MapPhySocket" },
122 	{ MapLogWindow, "MapLogWindow" },
123 	{ MapPhyWindow, "MapPhyWindow" },
124 	{ RegisterMTD, "RegisterMTD" },
125 	{ RegisterTimer, "RegisterTimer" },
126 	{ SetRegion, "SetRegion" },
127 	{ RequestExclusive, "RequestExclusive" },
128 	{ ReleaseExclusive, "ReleaseExclusive" },
129 	{ GetFirstClient, "GetFirstClient" },
130 	{ GetNextClient, "GetNextClient" },
131 	{ GetClientInfo, "GetClientInfo" },
132 	{ AddSocketServices, "AddSocketServices" },
133 	{ ReplaceSocketServices, "ReplaceSocketServices" },
134 	{ VendorSpecific, "VendorSpecific" },
135 	{ AdjustResourceInfo, "AdjustResourceInfo" },
136 	{ ValidateCIS, "ValidateCIS" },
137 	{ GetFirstTuple, "GetFirstTuple" },
138 	{ GetNextTuple, "GetNextTuple" },
139 	{ GetTupleData, "GetTupleData" },
140 	{ ParseTuple, "ParseTuple" },
141 	{ MakeDeviceNode, "MakeDeviceNode" },
142 	{ RemoveDeviceNode, "RemoveDeviceNode" },
143 	{ ConvertSpeed, "ConvertSpeed" },
144 	{ ConvertSize, "ConvertSize" },
145 	{ Event2Text, "Event2Text" },
146 	{ Error2Text, "Error2Text" },
147 	{ AccessConfigurationRegister, "AccessConfigurationRegister" },
148 	{ CS_DDI_Info, "CS_DDI_Info" },
149 	{ CS_Sys_Ctl, "CS_Sys_Ctl" },
150 	{ CSFuncListEnd, "{unknown Card Services function}" },
151 };
152 
153 cs_csfunc2text_strings_t cs_csfunc2text_returnstrings[] = {
154 	{ CS_SUCCESS, "CS_SUCCESS" },
155 	{ CS_BAD_ADAPTER, "CS_BAD_ADAPTER" },
156 	{ CS_BAD_ATTRIBUTE, "CS_BAD_ATTRIBUTE" },
157 	{ CS_BAD_BASE, "CS_BAD_BASE" },
158 	{ CS_BAD_EDC, "CS_BAD_EDC" },
159 	{ CS_BAD_IRQ, "CS_BAD_IRQ" },
160 	{ CS_BAD_OFFSET, "CS_BAD_OFFSET" },
161 	{ CS_BAD_PAGE, "CS_BAD_PAGE" },
162 	{ CS_READ_FAILURE, "CS_READ_FAILURE" },
163 	{ CS_BAD_SIZE, "CS_BAD_SIZE" },
164 	{ CS_BAD_SOCKET, "CS_BAD_SOCKET" },
165 	{ CS_BAD_TYPE, "CS_BAD_TYPE" },
166 	{ CS_BAD_VCC, "CS_BAD_VCC" },
167 	{ CS_BAD_VPP, "CS_BAD_VPP" },
168 	{ CS_BAD_WINDOW, "CS_BAD_WINDOW" },
169 	{ CS_WRITE_FAILURE, "CS_WRITE_FAILURE" },
170 	{ CS_NO_CARD, "CS_NO_CARD" },
171 	{ CS_UNSUPPORTED_FUNCTION, "CS_UNSUPPORTED_FUNCTION" },
172 	{ CS_UNSUPPORTED_MODE, "CS_UNSUPPORTED_MODE" },
173 	{ CS_BAD_SPEED, "CS_BAD_SPEED" },
174 	{ CS_BUSY, "CS_BUSY" },
175 	{ CS_GENERAL_FAILURE, "CS_GENERAL_FAILURE" },
176 	{ CS_WRITE_PROTECTED, "CS_WRITE_PROTECTED" },
177 	{ CS_BAD_ARG_LENGTH, "CS_BAD_ARG_LENGTH" },
178 	{ CS_BAD_ARGS, "CS_BAD_ARGS" },
179 	{ CS_CONFIGURATION_LOCKED, "CS_CONFIGURATION_LOCKED" },
180 	{ CS_IN_USE, "CS_IN_USE" },
181 	{ CS_NO_MORE_ITEMS, "CS_NO_MORE_ITEMS" },
182 	{ CS_OUT_OF_RESOURCE, "CS_OUT_OF_RESOURCE" },
183 	{ CS_BAD_HANDLE, "CS_BAD_HANDLE" },
184 	{ CS_NO_CIS, "CS_NO_CIS" },
185 	{ CS_BAD_CIS, "CS_BAD_CIS" },
186 	{ CS_UNKNOWN_TUPLE, "CS_UNKNOWN_TUPLE" },
187 	{ CS_BAD_VERSION, "CS_BAD_VERSION" },
188 	{ CS_UNSUPPORTED_EVENT, "CS_UNSUPPORTED_EVENT" },
189 	{ CS_CSI_ERROR, "CS_CSI_ERROR" },
190 	{ CS_CSI_NOT_INIT, "CS_CSI_NOT_INIT" },
191 	{ CS_NO_TUPLE_PARSER, "CS_NO_TUPLE_PARSER" },
192 	{ CS_ERRORLIST_END, "{unknown Card Services return code}" },
193 };
194 
195 #ifdef	__cplusplus
196 }
197 #endif
198 
199 #endif /* _CS_STRINGS_H */
200