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