xref: /onnv-gate/usr/src/uts/common/pcmcia/cs/cs_stubs.c (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 2004 Sun Microsystems, Inc.  All rights reserved.
24*0Sstevel@tonic-gate  * Use is subject to license terms.
25*0Sstevel@tonic-gate  */
26*0Sstevel@tonic-gate 
27*0Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
28*0Sstevel@tonic-gate 
29*0Sstevel@tonic-gate /*
30*0Sstevel@tonic-gate  * This is the PCMCIA Card Services kernel stubs module. It provides
31*0Sstevel@tonic-gate  *	the various PCMCIA kernel framework entry points.
32*0Sstevel@tonic-gate  */
33*0Sstevel@tonic-gate 
34*0Sstevel@tonic-gate #if defined(DEBUG)
35*0Sstevel@tonic-gate #define	CS_STUBS_DEBUG
36*0Sstevel@tonic-gate #endif
37*0Sstevel@tonic-gate 
38*0Sstevel@tonic-gate #include <sys/types.h>
39*0Sstevel@tonic-gate #include <sys/systm.h>
40*0Sstevel@tonic-gate #include <sys/user.h>
41*0Sstevel@tonic-gate #include <sys/buf.h>
42*0Sstevel@tonic-gate #include <sys/file.h>
43*0Sstevel@tonic-gate #include <sys/uio.h>
44*0Sstevel@tonic-gate #include <sys/conf.h>
45*0Sstevel@tonic-gate #include <sys/stat.h>
46*0Sstevel@tonic-gate #include <sys/autoconf.h>
47*0Sstevel@tonic-gate #include <sys/vtoc.h>
48*0Sstevel@tonic-gate #include <sys/dkio.h>
49*0Sstevel@tonic-gate #include <sys/ddi.h>
50*0Sstevel@tonic-gate #include <sys/sunddi.h>
51*0Sstevel@tonic-gate #include <sys/debug.h>
52*0Sstevel@tonic-gate #include <sys/varargs.h>
53*0Sstevel@tonic-gate #include <sys/var.h>
54*0Sstevel@tonic-gate #include <sys/proc.h>
55*0Sstevel@tonic-gate #include <sys/thread.h>
56*0Sstevel@tonic-gate #include <sys/utsname.h>
57*0Sstevel@tonic-gate #include <sys/vtrace.h>
58*0Sstevel@tonic-gate #include <sys/kstat.h>
59*0Sstevel@tonic-gate #include <sys/kmem.h>
60*0Sstevel@tonic-gate #include <sys/modctl.h>
61*0Sstevel@tonic-gate #include <sys/kobj.h>
62*0Sstevel@tonic-gate #include <sys/callb.h>
63*0Sstevel@tonic-gate 
64*0Sstevel@tonic-gate #include <sys/pctypes.h>
65*0Sstevel@tonic-gate #include <pcmcia/sys/cs_types.h>
66*0Sstevel@tonic-gate #include <sys/pcmcia.h>
67*0Sstevel@tonic-gate #include <sys/sservice.h>
68*0Sstevel@tonic-gate #include <pcmcia/sys/cis.h>
69*0Sstevel@tonic-gate #include <pcmcia/sys/cis_handlers.h>
70*0Sstevel@tonic-gate #include <pcmcia/sys/cs.h>
71*0Sstevel@tonic-gate #include <pcmcia/sys/cs_priv.h>
72*0Sstevel@tonic-gate #include <pcmcia/sys/cs_stubs.h>
73*0Sstevel@tonic-gate 
74*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
75*0Sstevel@tonic-gate int cs_stubs_debug = 0;
76*0Sstevel@tonic-gate #endif
77*0Sstevel@tonic-gate 
78*0Sstevel@tonic-gate static csfunction_t *cardservices = NULL;
79*0Sstevel@tonic-gate static int do_cs_call = 0;
80*0Sstevel@tonic-gate static int cs_no_carservices(void);
81*0Sstevel@tonic-gate 
82*0Sstevel@tonic-gate #define	CardServices	(do_cs_call ? (*cardservices) :		\
83*0Sstevel@tonic-gate 			((csfunction_t *)cs_no_carservices))
84*0Sstevel@tonic-gate 
85*0Sstevel@tonic-gate #ifdef	USE_CS_STUBS_MODULE
86*0Sstevel@tonic-gate 
87*0Sstevel@tonic-gate /*
88*0Sstevel@tonic-gate  * Module linkage information for the kernel.
89*0Sstevel@tonic-gate  */
90*0Sstevel@tonic-gate static struct modlmisc modlmisc = {
91*0Sstevel@tonic-gate 	&mod_miscops,
92*0Sstevel@tonic-gate 	"PCMCIA Card Services stub module"
93*0Sstevel@tonic-gate };
94*0Sstevel@tonic-gate 
95*0Sstevel@tonic-gate static struct modlinkage modlinkage = {
96*0Sstevel@tonic-gate 	MODREV_1,
97*0Sstevel@tonic-gate 	(void *)&modlmisc,
98*0Sstevel@tonic-gate 	NULL
99*0Sstevel@tonic-gate };
100*0Sstevel@tonic-gate 
101*0Sstevel@tonic-gate int
_init(void)102*0Sstevel@tonic-gate _init(void)
103*0Sstevel@tonic-gate {
104*0Sstevel@tonic-gate 	return (mod_install(&modlinkage));
105*0Sstevel@tonic-gate }
106*0Sstevel@tonic-gate 
107*0Sstevel@tonic-gate int
_fini(void)108*0Sstevel@tonic-gate _fini(void)
109*0Sstevel@tonic-gate {
110*0Sstevel@tonic-gate 	if (!do_cs_call)
111*0Sstevel@tonic-gate 	    return (mod_remove(&modlinkage));
112*0Sstevel@tonic-gate 	else
113*0Sstevel@tonic-gate 	    return (EBUSY);
114*0Sstevel@tonic-gate }
115*0Sstevel@tonic-gate 
116*0Sstevel@tonic-gate int
_info(struct modinfo * modinfop)117*0Sstevel@tonic-gate _info(struct modinfo *modinfop)
118*0Sstevel@tonic-gate {
119*0Sstevel@tonic-gate 	return (mod_info(&modlinkage, modinfop));
120*0Sstevel@tonic-gate }
121*0Sstevel@tonic-gate #endif	/* USE_CS_STUBS_MODULE */
122*0Sstevel@tonic-gate 
123*0Sstevel@tonic-gate /*
124*0Sstevel@tonic-gate  * csx_register_cardservices - The Card Services loadable module
125*0Sstevel@tonic-gate  *	calls this runction to register it's entry point.
126*0Sstevel@tonic-gate  *
127*0Sstevel@tonic-gate  * Returns:	CS_SUCCESS - if operation sucessful
128*0Sstevel@tonic-gate  *		CS_UNSUPPORTED_FUNCTION - if invalid function code
129*0Sstevel@tonic-gate  *		CS_BAD_HANDLE - if Card Services is not registered
130*0Sstevel@tonic-gate  */
131*0Sstevel@tonic-gate int32_t
csx_register_cardservices(cs_register_cardservices_t * rcs)132*0Sstevel@tonic-gate csx_register_cardservices(cs_register_cardservices_t *rcs)
133*0Sstevel@tonic-gate {
134*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
135*0Sstevel@tonic-gate 	if (cs_stubs_debug > 2)
136*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_register_cardservices: "
137*0Sstevel@tonic-gate 		"magic: 0x%x function: 0x%x cardservices: 0x%p\n",
138*0Sstevel@tonic-gate 		rcs->magic, rcs->function, (void *)rcs->cardservices);
139*0Sstevel@tonic-gate #endif
140*0Sstevel@tonic-gate 
141*0Sstevel@tonic-gate 	if (rcs->magic != CS_STUBS_MAGIC)
142*0Sstevel@tonic-gate 	    return (CS_BAD_ARGS);
143*0Sstevel@tonic-gate 
144*0Sstevel@tonic-gate 	switch (rcs->function) {
145*0Sstevel@tonic-gate 	    case CS_ENTRY_REGISTER:
146*0Sstevel@tonic-gate 		cardservices = rcs->cardservices;
147*0Sstevel@tonic-gate 		do_cs_call = 1;
148*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
149*0Sstevel@tonic-gate 	if (cs_stubs_debug > 2)
150*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_register_cardservices: CS_ENTRY_REGISTER\n");
151*0Sstevel@tonic-gate #endif
152*0Sstevel@tonic-gate 
153*0Sstevel@tonic-gate 		return (CS_SUCCESS);
154*0Sstevel@tonic-gate 
155*0Sstevel@tonic-gate 	    case CS_ENTRY_DEREGISTER:
156*0Sstevel@tonic-gate 		do_cs_call = 0;
157*0Sstevel@tonic-gate 		cardservices = (csfunction_t *)cs_no_carservices;
158*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
159*0Sstevel@tonic-gate 	if (cs_stubs_debug > 2)
160*0Sstevel@tonic-gate 	    cmn_err(CE_CONT,
161*0Sstevel@tonic-gate 		"csx_register_cardservices: CS_ENTRY_DEREGISTER\n");
162*0Sstevel@tonic-gate #endif
163*0Sstevel@tonic-gate 		return (CS_UNSUPPORTED_FUNCTION);
164*0Sstevel@tonic-gate 
165*0Sstevel@tonic-gate 	    case CS_ENTRY_INQUIRE:
166*0Sstevel@tonic-gate 		rcs->cardservices = cardservices;
167*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
168*0Sstevel@tonic-gate 	if (cs_stubs_debug > 2)
169*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_register_cardservices: CS_ENTRY_INQUIRE\n");
170*0Sstevel@tonic-gate #endif
171*0Sstevel@tonic-gate 
172*0Sstevel@tonic-gate 		if (do_cs_call)
173*0Sstevel@tonic-gate 		    return (CS_SUCCESS);
174*0Sstevel@tonic-gate 		else
175*0Sstevel@tonic-gate 		    return (CS_BAD_HANDLE);
176*0Sstevel@tonic-gate 
177*0Sstevel@tonic-gate 	    default:
178*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
179*0Sstevel@tonic-gate 	if (cs_stubs_debug > 2)
180*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_register_cardservices: (unknown function)\n");
181*0Sstevel@tonic-gate #endif
182*0Sstevel@tonic-gate 		return (CS_UNSUPPORTED_FUNCTION);
183*0Sstevel@tonic-gate 	}
184*0Sstevel@tonic-gate 
185*0Sstevel@tonic-gate }
186*0Sstevel@tonic-gate 
187*0Sstevel@tonic-gate int32_t
csx_RegisterClient(client_handle_t * ch,client_reg_t * cr)188*0Sstevel@tonic-gate csx_RegisterClient(client_handle_t *ch, client_reg_t *cr)
189*0Sstevel@tonic-gate {
190*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
191*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
192*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_RegisterClient: (no handle yet)\n");
193*0Sstevel@tonic-gate #endif
194*0Sstevel@tonic-gate 	return (CardServices(RegisterClient, ch, cr));
195*0Sstevel@tonic-gate }
196*0Sstevel@tonic-gate 
197*0Sstevel@tonic-gate int32_t
csx_DeregisterClient(client_handle_t ch)198*0Sstevel@tonic-gate csx_DeregisterClient(client_handle_t ch)
199*0Sstevel@tonic-gate {
200*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
201*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
202*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_DeregisterClient: handle: 0x%x\n", ch);
203*0Sstevel@tonic-gate #endif
204*0Sstevel@tonic-gate 	return (CardServices(DeregisterClient, ch));
205*0Sstevel@tonic-gate }
206*0Sstevel@tonic-gate 
207*0Sstevel@tonic-gate int32_t
csx_GetStatus(client_handle_t ch,get_status_t * gs)208*0Sstevel@tonic-gate csx_GetStatus(client_handle_t ch, get_status_t *gs)
209*0Sstevel@tonic-gate {
210*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
211*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
212*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_GetStatus: handle: 0x%x\n", ch);
213*0Sstevel@tonic-gate #endif
214*0Sstevel@tonic-gate 	return (CardServices(GetStatus, ch, gs));
215*0Sstevel@tonic-gate }
216*0Sstevel@tonic-gate 
217*0Sstevel@tonic-gate int32_t
csx_SetEventMask(client_handle_t ch,sockevent_t * se)218*0Sstevel@tonic-gate csx_SetEventMask(client_handle_t ch, sockevent_t *se)
219*0Sstevel@tonic-gate {
220*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
221*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
222*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_SetEventMask: handle: 0x%x\n", ch);
223*0Sstevel@tonic-gate #endif
224*0Sstevel@tonic-gate 	return (CardServices(SetEventMask, ch, se));
225*0Sstevel@tonic-gate }
226*0Sstevel@tonic-gate 
227*0Sstevel@tonic-gate int32_t
csx_GetEventMask(client_handle_t ch,sockevent_t * se)228*0Sstevel@tonic-gate csx_GetEventMask(client_handle_t ch, sockevent_t *se)
229*0Sstevel@tonic-gate {
230*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
231*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
232*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_GetEventMask: handle: 0x%x\n", ch);
233*0Sstevel@tonic-gate #endif
234*0Sstevel@tonic-gate 	return (CardServices(GetEventMask, ch, se));
235*0Sstevel@tonic-gate }
236*0Sstevel@tonic-gate 
237*0Sstevel@tonic-gate int32_t
csx_RequestIO(client_handle_t ch,io_req_t * ior)238*0Sstevel@tonic-gate csx_RequestIO(client_handle_t ch, io_req_t *ior)
239*0Sstevel@tonic-gate {
240*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
241*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
242*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_RequestIO: handle: 0x%x\n", ch);
243*0Sstevel@tonic-gate #endif
244*0Sstevel@tonic-gate 	return (CardServices(RequestIO, ch, ior));
245*0Sstevel@tonic-gate }
246*0Sstevel@tonic-gate 
247*0Sstevel@tonic-gate int32_t
csx_ReleaseIO(client_handle_t ch,io_req_t * ior)248*0Sstevel@tonic-gate csx_ReleaseIO(client_handle_t ch, io_req_t *ior)
249*0Sstevel@tonic-gate {
250*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
251*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
252*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_ReleaseIO: handle: 0x%x\n", ch);
253*0Sstevel@tonic-gate #endif
254*0Sstevel@tonic-gate 	return (CardServices(ReleaseIO, ch, ior));
255*0Sstevel@tonic-gate }
256*0Sstevel@tonic-gate 
257*0Sstevel@tonic-gate int32_t
csx_RequestIRQ(client_handle_t ch,irq_req_t * irqr)258*0Sstevel@tonic-gate csx_RequestIRQ(client_handle_t ch, irq_req_t *irqr)
259*0Sstevel@tonic-gate {
260*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
261*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
262*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_RequestIRQ: handle: 0x%x\n", ch);
263*0Sstevel@tonic-gate #endif
264*0Sstevel@tonic-gate 	return (CardServices(RequestIRQ, ch, irqr));
265*0Sstevel@tonic-gate }
266*0Sstevel@tonic-gate 
267*0Sstevel@tonic-gate int32_t
csx_ReleaseIRQ(client_handle_t ch,irq_req_t * irqr)268*0Sstevel@tonic-gate csx_ReleaseIRQ(client_handle_t ch, irq_req_t *irqr)
269*0Sstevel@tonic-gate {
270*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
271*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
272*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_ReleaseIRQ: handle: 0x%x\n", ch);
273*0Sstevel@tonic-gate #endif
274*0Sstevel@tonic-gate 	return (CardServices(ReleaseIRQ, ch, irqr));
275*0Sstevel@tonic-gate }
276*0Sstevel@tonic-gate 
277*0Sstevel@tonic-gate int32_t
csx_RequestWindow(client_handle_t ch,window_handle_t * wh,win_req_t * wr)278*0Sstevel@tonic-gate csx_RequestWindow(client_handle_t ch, window_handle_t *wh, win_req_t *wr)
279*0Sstevel@tonic-gate {
280*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
281*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
282*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_RequestWindow: handle: 0x%x\n", ch);
283*0Sstevel@tonic-gate #endif
284*0Sstevel@tonic-gate 	return (CardServices(RequestWindow, ch, wh, wr));
285*0Sstevel@tonic-gate }
286*0Sstevel@tonic-gate 
287*0Sstevel@tonic-gate int32_t
csx_ReleaseWindow(window_handle_t wh)288*0Sstevel@tonic-gate csx_ReleaseWindow(window_handle_t wh)
289*0Sstevel@tonic-gate {
290*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
291*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
292*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_ReleaseWindow: handle: 0x%x\n", wh);
293*0Sstevel@tonic-gate #endif
294*0Sstevel@tonic-gate 	return (CardServices(ReleaseWindow, wh));
295*0Sstevel@tonic-gate }
296*0Sstevel@tonic-gate 
297*0Sstevel@tonic-gate int32_t
csx_ModifyWindow(window_handle_t wh,modify_win_t * mw)298*0Sstevel@tonic-gate csx_ModifyWindow(window_handle_t wh, modify_win_t *mw)
299*0Sstevel@tonic-gate {
300*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
301*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
302*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_ModifyWindow: handle: 0x%x\n", wh);
303*0Sstevel@tonic-gate #endif
304*0Sstevel@tonic-gate 	return (CardServices(ModifyWindow, wh, mw));
305*0Sstevel@tonic-gate }
306*0Sstevel@tonic-gate 
307*0Sstevel@tonic-gate int32_t
csx_MapMemPage(window_handle_t wh,map_mem_page_t * mmp)308*0Sstevel@tonic-gate csx_MapMemPage(window_handle_t wh, map_mem_page_t *mmp)
309*0Sstevel@tonic-gate {
310*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
311*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
312*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_MapMemPage: handle: 0x%x\n", wh);
313*0Sstevel@tonic-gate #endif
314*0Sstevel@tonic-gate 	return (CardServices(MapMemPage, wh, mmp));
315*0Sstevel@tonic-gate }
316*0Sstevel@tonic-gate 
317*0Sstevel@tonic-gate int32_t
csx_RequestSocketMask(client_handle_t ch,request_socket_mask_t * sm)318*0Sstevel@tonic-gate csx_RequestSocketMask(client_handle_t ch, request_socket_mask_t *sm)
319*0Sstevel@tonic-gate {
320*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
321*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
322*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_RequestSocketMask: handle: 0x%x\n", ch);
323*0Sstevel@tonic-gate #endif
324*0Sstevel@tonic-gate 	return (CardServices(RequestSocketMask, ch, sm));
325*0Sstevel@tonic-gate }
326*0Sstevel@tonic-gate 
327*0Sstevel@tonic-gate int32_t
csx_ReleaseSocketMask(client_handle_t ch,release_socket_mask_t * rsm)328*0Sstevel@tonic-gate csx_ReleaseSocketMask(client_handle_t ch, release_socket_mask_t *rsm)
329*0Sstevel@tonic-gate {
330*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
331*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
332*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_ReleaseSocketMask: handle: 0x%x\n", ch);
333*0Sstevel@tonic-gate #endif
334*0Sstevel@tonic-gate 	return (CardServices(ReleaseSocketMask, ch, rsm));
335*0Sstevel@tonic-gate }
336*0Sstevel@tonic-gate 
337*0Sstevel@tonic-gate int32_t
csx_RequestConfiguration(client_handle_t ch,config_req_t * cr)338*0Sstevel@tonic-gate csx_RequestConfiguration(client_handle_t ch, config_req_t *cr)
339*0Sstevel@tonic-gate {
340*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
341*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
342*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_RequestConfiguration: handle: 0x%x\n", ch);
343*0Sstevel@tonic-gate #endif
344*0Sstevel@tonic-gate 	return (CardServices(RequestConfiguration, ch, cr));
345*0Sstevel@tonic-gate }
346*0Sstevel@tonic-gate 
347*0Sstevel@tonic-gate int32_t
csx_ModifyConfiguration(client_handle_t ch,modify_config_t * mc)348*0Sstevel@tonic-gate csx_ModifyConfiguration(client_handle_t ch, modify_config_t *mc)
349*0Sstevel@tonic-gate {
350*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
351*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
352*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_ModifyConfiguration: handle: 0x%x\n", ch);
353*0Sstevel@tonic-gate #endif
354*0Sstevel@tonic-gate 	return (CardServices(ModifyConfiguration, ch, mc));
355*0Sstevel@tonic-gate }
356*0Sstevel@tonic-gate 
357*0Sstevel@tonic-gate int32_t
csx_ReleaseConfiguration(client_handle_t ch,release_config_t * rc)358*0Sstevel@tonic-gate csx_ReleaseConfiguration(client_handle_t ch, release_config_t *rc)
359*0Sstevel@tonic-gate {
360*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
361*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
362*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_ReleaseConfiguration: handle: 0x%x\n", ch);
363*0Sstevel@tonic-gate #endif
364*0Sstevel@tonic-gate 	return (CardServices(ReleaseConfiguration, ch, rc));
365*0Sstevel@tonic-gate }
366*0Sstevel@tonic-gate 
367*0Sstevel@tonic-gate int32_t
csx_AccessConfigurationRegister(client_handle_t ch,access_config_reg_t * acr)368*0Sstevel@tonic-gate csx_AccessConfigurationRegister(client_handle_t ch, access_config_reg_t *acr)
369*0Sstevel@tonic-gate {
370*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
371*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
372*0Sstevel@tonic-gate 	    cmn_err(CE_CONT,
373*0Sstevel@tonic-gate 		"csx_AccessConfigurationRegister: handle: 0x%x\n", ch);
374*0Sstevel@tonic-gate #endif
375*0Sstevel@tonic-gate 	return (CardServices(AccessConfigurationRegister, ch, acr));
376*0Sstevel@tonic-gate }
377*0Sstevel@tonic-gate 
378*0Sstevel@tonic-gate int32_t
csx_GetFirstTuple(client_handle_t ch,tuple_t * tp)379*0Sstevel@tonic-gate csx_GetFirstTuple(client_handle_t ch, tuple_t *tp)
380*0Sstevel@tonic-gate {
381*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
382*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
383*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_GetFirstTuple: handle: 0x%x\n", ch);
384*0Sstevel@tonic-gate #endif
385*0Sstevel@tonic-gate 	return (CardServices(GetFirstTuple, ch, tp));
386*0Sstevel@tonic-gate }
387*0Sstevel@tonic-gate 
388*0Sstevel@tonic-gate int32_t
csx_GetNextTuple(client_handle_t ch,tuple_t * tp)389*0Sstevel@tonic-gate csx_GetNextTuple(client_handle_t ch, tuple_t *tp)
390*0Sstevel@tonic-gate {
391*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
392*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
393*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_GetNextTuple: handle: 0x%x\n", ch);
394*0Sstevel@tonic-gate #endif
395*0Sstevel@tonic-gate 	return (CardServices(GetNextTuple, ch, tp));
396*0Sstevel@tonic-gate }
397*0Sstevel@tonic-gate 
398*0Sstevel@tonic-gate int32_t
csx_GetTupleData(client_handle_t ch,tuple_t * tp)399*0Sstevel@tonic-gate csx_GetTupleData(client_handle_t ch, tuple_t *tp)
400*0Sstevel@tonic-gate {
401*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
402*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
403*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_GetTupleData: handle: 0x%x\n", ch);
404*0Sstevel@tonic-gate #endif
405*0Sstevel@tonic-gate 	return (CardServices(GetTupleData, ch, tp));
406*0Sstevel@tonic-gate }
407*0Sstevel@tonic-gate 
408*0Sstevel@tonic-gate int32_t
csx_MapLogSocket(client_handle_t ch,map_log_socket_t * mls)409*0Sstevel@tonic-gate csx_MapLogSocket(client_handle_t ch, map_log_socket_t *mls)
410*0Sstevel@tonic-gate {
411*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
412*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
413*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_MapLogSocket: handle: 0x%x\n", ch);
414*0Sstevel@tonic-gate #endif
415*0Sstevel@tonic-gate 	return (CardServices(MapLogSocket, ch, mls));
416*0Sstevel@tonic-gate }
417*0Sstevel@tonic-gate 
418*0Sstevel@tonic-gate int32_t
csx_ValidateCIS(client_handle_t ch,cisinfo_t * ci)419*0Sstevel@tonic-gate csx_ValidateCIS(client_handle_t ch, cisinfo_t *ci)
420*0Sstevel@tonic-gate {
421*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
422*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
423*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_ValidateCIS: handle: 0x%x\n", ch);
424*0Sstevel@tonic-gate #endif
425*0Sstevel@tonic-gate 	return (CardServices(ValidateCIS, ch, ci));
426*0Sstevel@tonic-gate }
427*0Sstevel@tonic-gate 
428*0Sstevel@tonic-gate int32_t
csx_MakeDeviceNode(client_handle_t ch,make_device_node_t * mdn)429*0Sstevel@tonic-gate csx_MakeDeviceNode(client_handle_t ch, make_device_node_t *mdn)
430*0Sstevel@tonic-gate {
431*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
432*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
433*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_MakeDeviceNode: handle: 0x%x\n", ch);
434*0Sstevel@tonic-gate #endif
435*0Sstevel@tonic-gate 	return (CardServices(MakeDeviceNode, ch, mdn));
436*0Sstevel@tonic-gate }
437*0Sstevel@tonic-gate 
438*0Sstevel@tonic-gate int32_t
csx_RemoveDeviceNode(client_handle_t ch,remove_device_node_t * rdn)439*0Sstevel@tonic-gate csx_RemoveDeviceNode(client_handle_t ch, remove_device_node_t *rdn)
440*0Sstevel@tonic-gate {
441*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
442*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
443*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_RemoveDeviceNode: handle: 0x%x\n", ch);
444*0Sstevel@tonic-gate #endif
445*0Sstevel@tonic-gate 	return (CardServices(RemoveDeviceNode, ch, rdn));
446*0Sstevel@tonic-gate }
447*0Sstevel@tonic-gate 
448*0Sstevel@tonic-gate int32_t
csx_ConvertSpeed(convert_speed_t * cp)449*0Sstevel@tonic-gate csx_ConvertSpeed(convert_speed_t *cp)
450*0Sstevel@tonic-gate {
451*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
452*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
453*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_ConvertSpeed\n");
454*0Sstevel@tonic-gate #endif
455*0Sstevel@tonic-gate 	return (CardServices(ConvertSpeed, cp));
456*0Sstevel@tonic-gate }
457*0Sstevel@tonic-gate 
458*0Sstevel@tonic-gate int32_t
csx_ConvertSize(convert_size_t * cp)459*0Sstevel@tonic-gate csx_ConvertSize(convert_size_t *cp)
460*0Sstevel@tonic-gate {
461*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
462*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
463*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_ConvertSize\n");
464*0Sstevel@tonic-gate #endif
465*0Sstevel@tonic-gate 	return (CardServices(ConvertSize, cp));
466*0Sstevel@tonic-gate }
467*0Sstevel@tonic-gate 
468*0Sstevel@tonic-gate int32_t
csx_Event2Text(event2text_t * e2t)469*0Sstevel@tonic-gate csx_Event2Text(event2text_t *e2t)
470*0Sstevel@tonic-gate {
471*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
472*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
473*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_Event2Text\n");
474*0Sstevel@tonic-gate #endif
475*0Sstevel@tonic-gate 	return (CardServices(Event2Text, e2t));
476*0Sstevel@tonic-gate }
477*0Sstevel@tonic-gate 
478*0Sstevel@tonic-gate int32_t
csx_Error2Text(error2text_t * e2t)479*0Sstevel@tonic-gate csx_Error2Text(error2text_t *e2t)
480*0Sstevel@tonic-gate {
481*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
482*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
483*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_Error2Text\n");
484*0Sstevel@tonic-gate #endif
485*0Sstevel@tonic-gate 	return (CardServices(Error2Text, e2t));
486*0Sstevel@tonic-gate }
487*0Sstevel@tonic-gate 
488*0Sstevel@tonic-gate int32_t
csx_CS_DDI_Info(cs_ddi_info_t * cp)489*0Sstevel@tonic-gate csx_CS_DDI_Info(cs_ddi_info_t *cp)
490*0Sstevel@tonic-gate {
491*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
492*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
493*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_CS_DDI_Info\n");
494*0Sstevel@tonic-gate #endif
495*0Sstevel@tonic-gate 	return (CardServices(CS_DDI_Info, cp));
496*0Sstevel@tonic-gate }
497*0Sstevel@tonic-gate 
498*0Sstevel@tonic-gate int32_t
csx_CS_Sys_Ctl(cs_sys_ctl_t * csc)499*0Sstevel@tonic-gate csx_CS_Sys_Ctl(cs_sys_ctl_t *csc)
500*0Sstevel@tonic-gate {
501*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
502*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
503*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_CS_Sys_Ctl\n");
504*0Sstevel@tonic-gate #endif
505*0Sstevel@tonic-gate 	return (CardServices(CS_Sys_Ctl, csc));
506*0Sstevel@tonic-gate }
507*0Sstevel@tonic-gate 
508*0Sstevel@tonic-gate int32_t
csx_GetClientInfo(client_handle_t ch,client_info_t * ci)509*0Sstevel@tonic-gate csx_GetClientInfo(client_handle_t ch, client_info_t *ci)
510*0Sstevel@tonic-gate {
511*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
512*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
513*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_GetClientInfo: handle: 0x%x\n", ch);
514*0Sstevel@tonic-gate #endif
515*0Sstevel@tonic-gate 
516*0Sstevel@tonic-gate 	return (CardServices(GetClientInfo, ch, ci));
517*0Sstevel@tonic-gate }
518*0Sstevel@tonic-gate 
519*0Sstevel@tonic-gate int32_t
csx_GetFirstClient(get_firstnext_client_t * fnc)520*0Sstevel@tonic-gate csx_GetFirstClient(get_firstnext_client_t *fnc)
521*0Sstevel@tonic-gate {
522*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
523*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
524*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_GetFirstClient\n");
525*0Sstevel@tonic-gate #endif
526*0Sstevel@tonic-gate 
527*0Sstevel@tonic-gate 	return (CardServices(GetFirstClient, fnc));
528*0Sstevel@tonic-gate }
529*0Sstevel@tonic-gate 
530*0Sstevel@tonic-gate int32_t
csx_GetNextClient(get_firstnext_client_t * fnc)531*0Sstevel@tonic-gate csx_GetNextClient(get_firstnext_client_t *fnc)
532*0Sstevel@tonic-gate {
533*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
534*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
535*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_GetNextClient\n");
536*0Sstevel@tonic-gate #endif
537*0Sstevel@tonic-gate 
538*0Sstevel@tonic-gate 	return (CardServices(GetNextClient, fnc));
539*0Sstevel@tonic-gate }
540*0Sstevel@tonic-gate 
541*0Sstevel@tonic-gate int32_t
csx_ResetFunction(client_handle_t ch,reset_function_t * rf)542*0Sstevel@tonic-gate csx_ResetFunction(client_handle_t ch, reset_function_t *rf)
543*0Sstevel@tonic-gate {
544*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
545*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
546*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_ResetFunction: handle: 0x%x\n", ch);
547*0Sstevel@tonic-gate #endif
548*0Sstevel@tonic-gate 
549*0Sstevel@tonic-gate 	return (CardServices(ResetFunction, ch, rf));
550*0Sstevel@tonic-gate }
551*0Sstevel@tonic-gate 
552*0Sstevel@tonic-gate int32_t
csx_GetCardServicesInfo(client_handle_t ch,get_cardservices_info_t * gcsi)553*0Sstevel@tonic-gate csx_GetCardServicesInfo(client_handle_t ch, get_cardservices_info_t *gcsi)
554*0Sstevel@tonic-gate {
555*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
556*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
557*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_GetCardServicesInfo: handle: 0x%x\n", ch);
558*0Sstevel@tonic-gate #endif
559*0Sstevel@tonic-gate 
560*0Sstevel@tonic-gate 	return (CardServices(GetCardServicesInfo, ch, gcsi));
561*0Sstevel@tonic-gate }
562*0Sstevel@tonic-gate 
563*0Sstevel@tonic-gate int32_t
csx_GetConfigurationInfo(client_handle_t * ch,get_configuration_info_t * gci)564*0Sstevel@tonic-gate csx_GetConfigurationInfo(client_handle_t *ch, get_configuration_info_t *gci)
565*0Sstevel@tonic-gate {
566*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
567*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
568*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_GetConfigurationInfo: "
569*0Sstevel@tonic-gate 		"handle: (no handle yet)\n");
570*0Sstevel@tonic-gate #endif
571*0Sstevel@tonic-gate 
572*0Sstevel@tonic-gate 	return (CardServices(GetConfigurationInfo, ch, gci));
573*0Sstevel@tonic-gate }
574*0Sstevel@tonic-gate 
575*0Sstevel@tonic-gate int32_t
csx_GetPhysicalAdapterInfo(client_handle_t ch,get_physical_adapter_info_t * gp)576*0Sstevel@tonic-gate csx_GetPhysicalAdapterInfo(client_handle_t ch, get_physical_adapter_info_t *gp)
577*0Sstevel@tonic-gate {
578*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
579*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
580*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_GetPhysicalAdapterInfo: handle: 0x%x\n", ch);
581*0Sstevel@tonic-gate #endif
582*0Sstevel@tonic-gate 
583*0Sstevel@tonic-gate 	return (CardServices(GetPhysicalAdapterInfo, ch, gp));
584*0Sstevel@tonic-gate }
585*0Sstevel@tonic-gate 
586*0Sstevel@tonic-gate /*
587*0Sstevel@tonic-gate  * CIS tuple parsing functions - one entrypoint per tuple that we know
588*0Sstevel@tonic-gate  *	how to parse
589*0Sstevel@tonic-gate  */
590*0Sstevel@tonic-gate int32_t
csx_Parse_CISTPL_CONFIG(client_handle_t ch,tuple_t * tp,cistpl_config_t * pt)591*0Sstevel@tonic-gate csx_Parse_CISTPL_CONFIG(client_handle_t ch, tuple_t *tp, cistpl_config_t *pt)
592*0Sstevel@tonic-gate {
593*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
594*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
595*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_Parse_CISTPL_CONFIG: handle: 0x%x\n", ch);
596*0Sstevel@tonic-gate #endif
597*0Sstevel@tonic-gate 	tp->DesiredTuple = CISTPL_CONFIG;
598*0Sstevel@tonic-gate 	return (CardServices(ParseTuple, ch, tp, pt));
599*0Sstevel@tonic-gate }
600*0Sstevel@tonic-gate 
601*0Sstevel@tonic-gate int32_t
csx_Parse_CISTPL_DEVICE(client_handle_t ch,tuple_t * tp,cistpl_device_t * pt)602*0Sstevel@tonic-gate csx_Parse_CISTPL_DEVICE(client_handle_t ch, tuple_t *tp, cistpl_device_t *pt)
603*0Sstevel@tonic-gate {
604*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
605*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
606*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_Parse_CISTPL_DEVICE: handle: 0x%x\n", ch);
607*0Sstevel@tonic-gate #endif
608*0Sstevel@tonic-gate 	tp->DesiredTuple = CISTPL_DEVICE;
609*0Sstevel@tonic-gate 	return (CardServices(ParseTuple, ch, tp, pt));
610*0Sstevel@tonic-gate }
611*0Sstevel@tonic-gate 
612*0Sstevel@tonic-gate int32_t
csx_Parse_CISTPL_DEVICE_A(client_handle_t ch,tuple_t * tp,cistpl_device_t * pt)613*0Sstevel@tonic-gate csx_Parse_CISTPL_DEVICE_A(client_handle_t ch, tuple_t *tp, cistpl_device_t *pt)
614*0Sstevel@tonic-gate {
615*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
616*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
617*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_Parse_CISTPL_DEVICE_A: handle: 0x%x\n", ch);
618*0Sstevel@tonic-gate #endif
619*0Sstevel@tonic-gate 	tp->DesiredTuple = CISTPL_DEVICE_A;
620*0Sstevel@tonic-gate 	return (CardServices(ParseTuple, ch, tp, pt));
621*0Sstevel@tonic-gate }
622*0Sstevel@tonic-gate 
623*0Sstevel@tonic-gate int32_t
csx_Parse_CISTPL_DEVICE_OA(client_handle_t ch,tuple_t * tp,cistpl_device_t * pt)624*0Sstevel@tonic-gate csx_Parse_CISTPL_DEVICE_OA(client_handle_t ch, tuple_t *tp, cistpl_device_t *pt)
625*0Sstevel@tonic-gate {
626*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
627*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
628*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_Parse_CISTPL_DEVICE_OA: handle: 0x%x\n", ch);
629*0Sstevel@tonic-gate #endif
630*0Sstevel@tonic-gate 	tp->DesiredTuple = CISTPL_DEVICE_OA;
631*0Sstevel@tonic-gate 	return (CardServices(ParseTuple, ch, tp, pt));
632*0Sstevel@tonic-gate }
633*0Sstevel@tonic-gate 
634*0Sstevel@tonic-gate int32_t
csx_Parse_CISTPL_DEVICE_OC(client_handle_t ch,tuple_t * tp,cistpl_device_t * pt)635*0Sstevel@tonic-gate csx_Parse_CISTPL_DEVICE_OC(client_handle_t ch, tuple_t *tp, cistpl_device_t *pt)
636*0Sstevel@tonic-gate {
637*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
638*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
639*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_Parse_CISTPL_DEVICE_OC: handle: 0x%x\n", ch);
640*0Sstevel@tonic-gate #endif
641*0Sstevel@tonic-gate 	tp->DesiredTuple = CISTPL_DEVICE_OC;
642*0Sstevel@tonic-gate 	return (CardServices(ParseTuple, ch, tp, pt));
643*0Sstevel@tonic-gate }
644*0Sstevel@tonic-gate 
645*0Sstevel@tonic-gate int32_t
csx_Parse_CISTPL_VERS_1(client_handle_t ch,tuple_t * tp,cistpl_vers_1_t * pt)646*0Sstevel@tonic-gate csx_Parse_CISTPL_VERS_1(client_handle_t ch, tuple_t *tp, cistpl_vers_1_t *pt)
647*0Sstevel@tonic-gate {
648*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
649*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
650*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_Parse_CISTPL_VERS_1: handle: 0x%x\n", ch);
651*0Sstevel@tonic-gate #endif
652*0Sstevel@tonic-gate 	tp->DesiredTuple = CISTPL_VERS_1;
653*0Sstevel@tonic-gate 	return (CardServices(ParseTuple, ch, tp, pt));
654*0Sstevel@tonic-gate }
655*0Sstevel@tonic-gate 
656*0Sstevel@tonic-gate int32_t
csx_Parse_CISTPL_VERS_2(client_handle_t ch,tuple_t * tp,cistpl_vers_2_t * pt)657*0Sstevel@tonic-gate csx_Parse_CISTPL_VERS_2(client_handle_t ch, tuple_t *tp, cistpl_vers_2_t *pt)
658*0Sstevel@tonic-gate {
659*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
660*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
661*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_Parse_CISTPL_VERS_2: handle: 0x%x\n", ch);
662*0Sstevel@tonic-gate #endif
663*0Sstevel@tonic-gate 	tp->DesiredTuple = CISTPL_VERS_2;
664*0Sstevel@tonic-gate 	return (CardServices(ParseTuple, ch, tp, pt));
665*0Sstevel@tonic-gate }
666*0Sstevel@tonic-gate 
667*0Sstevel@tonic-gate int32_t
csx_Parse_CISTPL_JEDEC_A(client_handle_t ch,tuple_t * tp,cistpl_jedec_t * pt)668*0Sstevel@tonic-gate csx_Parse_CISTPL_JEDEC_A(client_handle_t ch, tuple_t *tp, cistpl_jedec_t *pt)
669*0Sstevel@tonic-gate {
670*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
671*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
672*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_Parse_CISTPL_JEDEC_A: handle: 0x%x\n", ch);
673*0Sstevel@tonic-gate #endif
674*0Sstevel@tonic-gate 	tp->DesiredTuple = CISTPL_JEDEC_A;
675*0Sstevel@tonic-gate 	return (CardServices(ParseTuple, ch, tp, pt));
676*0Sstevel@tonic-gate }
677*0Sstevel@tonic-gate 
678*0Sstevel@tonic-gate int32_t
csx_Parse_CISTPL_JEDEC_C(client_handle_t ch,tuple_t * tp,cistpl_jedec_t * pt)679*0Sstevel@tonic-gate csx_Parse_CISTPL_JEDEC_C(client_handle_t ch, tuple_t *tp, cistpl_jedec_t *pt)
680*0Sstevel@tonic-gate {
681*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
682*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
683*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_Parse_CISTPL_JEDEC_C: handle: 0x%x\n", ch);
684*0Sstevel@tonic-gate #endif
685*0Sstevel@tonic-gate 	tp->DesiredTuple = CISTPL_JEDEC_C;
686*0Sstevel@tonic-gate 	return (CardServices(ParseTuple, ch, tp, pt));
687*0Sstevel@tonic-gate }
688*0Sstevel@tonic-gate 
689*0Sstevel@tonic-gate int32_t
csx_Parse_CISTPL_FORMAT(client_handle_t ch,tuple_t * tp,cistpl_format_t * pt)690*0Sstevel@tonic-gate csx_Parse_CISTPL_FORMAT(client_handle_t ch, tuple_t *tp, cistpl_format_t *pt)
691*0Sstevel@tonic-gate {
692*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
693*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
694*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_Parse_CISTPL_FORMAT: handle: 0x%x\n", ch);
695*0Sstevel@tonic-gate #endif
696*0Sstevel@tonic-gate 	tp->DesiredTuple = CISTPL_FORMAT;
697*0Sstevel@tonic-gate 	return (CardServices(ParseTuple, ch, tp, pt));
698*0Sstevel@tonic-gate }
699*0Sstevel@tonic-gate 
700*0Sstevel@tonic-gate int32_t
csx_Parse_CISTPL_FORMAT_A(client_handle_t ch,tuple_t * tp,cistpl_format_t * pt)701*0Sstevel@tonic-gate csx_Parse_CISTPL_FORMAT_A(client_handle_t ch, tuple_t *tp, cistpl_format_t *pt)
702*0Sstevel@tonic-gate {
703*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
704*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
705*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_Parse_CISTPL_FORMAT_A: handle: 0x%x\n", ch);
706*0Sstevel@tonic-gate #endif
707*0Sstevel@tonic-gate 	tp->DesiredTuple = CISTPL_FORMAT_A;
708*0Sstevel@tonic-gate 	return (CardServices(ParseTuple, ch, tp, pt));
709*0Sstevel@tonic-gate }
710*0Sstevel@tonic-gate 
711*0Sstevel@tonic-gate int32_t
csx_Parse_CISTPL_GEOMETRY(client_handle_t ch,tuple_t * tp,cistpl_geometry_t * pt)712*0Sstevel@tonic-gate csx_Parse_CISTPL_GEOMETRY(client_handle_t ch, tuple_t *tp,
713*0Sstevel@tonic-gate     cistpl_geometry_t *pt)
714*0Sstevel@tonic-gate {
715*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
716*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
717*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_Parse_CISTPL_GEOMETRY: handle: 0x%x\n", ch);
718*0Sstevel@tonic-gate #endif
719*0Sstevel@tonic-gate 	tp->DesiredTuple = CISTPL_GEOMETRY;
720*0Sstevel@tonic-gate 	return (CardServices(ParseTuple, ch, tp, pt));
721*0Sstevel@tonic-gate }
722*0Sstevel@tonic-gate 
723*0Sstevel@tonic-gate int32_t
csx_Parse_CISTPL_BYTEORDER(client_handle_t ch,tuple_t * tp,cistpl_byteorder_t * pt)724*0Sstevel@tonic-gate csx_Parse_CISTPL_BYTEORDER(client_handle_t ch, tuple_t *tp,
725*0Sstevel@tonic-gate     cistpl_byteorder_t *pt)
726*0Sstevel@tonic-gate {
727*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
728*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
729*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_Parse_CISTPL_BYTEORDER: handle: 0x%x\n", ch);
730*0Sstevel@tonic-gate #endif
731*0Sstevel@tonic-gate 	tp->DesiredTuple = CISTPL_BYTEORDER;
732*0Sstevel@tonic-gate 	return (CardServices(ParseTuple, ch, tp, pt));
733*0Sstevel@tonic-gate }
734*0Sstevel@tonic-gate 
735*0Sstevel@tonic-gate int32_t
csx_Parse_CISTPL_DATE(client_handle_t ch,tuple_t * tp,cistpl_date_t * pt)736*0Sstevel@tonic-gate csx_Parse_CISTPL_DATE(client_handle_t ch, tuple_t *tp, cistpl_date_t *pt)
737*0Sstevel@tonic-gate {
738*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
739*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
740*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_Parse_CISTPL_DATE: handle: 0x%x\n", ch);
741*0Sstevel@tonic-gate #endif
742*0Sstevel@tonic-gate 	tp->DesiredTuple = CISTPL_DATE;
743*0Sstevel@tonic-gate 	return (CardServices(ParseTuple, ch, tp, pt));
744*0Sstevel@tonic-gate }
745*0Sstevel@tonic-gate 
746*0Sstevel@tonic-gate int32_t
csx_Parse_CISTPL_BATTERY(client_handle_t ch,tuple_t * tp,cistpl_battery_t * pt)747*0Sstevel@tonic-gate csx_Parse_CISTPL_BATTERY(client_handle_t ch, tuple_t *tp, cistpl_battery_t *pt)
748*0Sstevel@tonic-gate {
749*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
750*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
751*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_Parse_CISTPL_BATTERY: handle: 0x%x\n", ch);
752*0Sstevel@tonic-gate #endif
753*0Sstevel@tonic-gate 	tp->DesiredTuple = CISTPL_BATTERY;
754*0Sstevel@tonic-gate 	return (CardServices(ParseTuple, ch, tp, pt));
755*0Sstevel@tonic-gate }
756*0Sstevel@tonic-gate 
757*0Sstevel@tonic-gate int32_t
csx_Parse_CISTPL_ORG(client_handle_t ch,tuple_t * tp,cistpl_org_t * pt)758*0Sstevel@tonic-gate csx_Parse_CISTPL_ORG(client_handle_t ch, tuple_t *tp, cistpl_org_t *pt)
759*0Sstevel@tonic-gate {
760*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
761*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
762*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_Parse_CISTPL_ORG: handle: 0x%x\n", ch);
763*0Sstevel@tonic-gate #endif
764*0Sstevel@tonic-gate 	tp->DesiredTuple = CISTPL_ORG;
765*0Sstevel@tonic-gate 	return (CardServices(ParseTuple, ch, tp, pt));
766*0Sstevel@tonic-gate }
767*0Sstevel@tonic-gate 
768*0Sstevel@tonic-gate int32_t
csx_Parse_CISTPL_MANFID(client_handle_t ch,tuple_t * tp,cistpl_manfid_t * pt)769*0Sstevel@tonic-gate csx_Parse_CISTPL_MANFID(client_handle_t ch, tuple_t *tp, cistpl_manfid_t *pt)
770*0Sstevel@tonic-gate {
771*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
772*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
773*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_Parse_CISTPL_MANFID: handle: 0x%x\n", ch);
774*0Sstevel@tonic-gate #endif
775*0Sstevel@tonic-gate 	tp->DesiredTuple = CISTPL_MANFID;
776*0Sstevel@tonic-gate 	return (CardServices(ParseTuple, ch, tp, pt));
777*0Sstevel@tonic-gate }
778*0Sstevel@tonic-gate 
779*0Sstevel@tonic-gate int32_t
csx_Parse_CISTPL_FUNCID(client_handle_t ch,tuple_t * tp,cistpl_funcid_t * pt)780*0Sstevel@tonic-gate csx_Parse_CISTPL_FUNCID(client_handle_t ch, tuple_t *tp, cistpl_funcid_t *pt)
781*0Sstevel@tonic-gate {
782*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
783*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
784*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_Parse_CISTPL_FUNCID: handle: 0x%x\n", ch);
785*0Sstevel@tonic-gate #endif
786*0Sstevel@tonic-gate 	tp->DesiredTuple = CISTPL_FUNCID;
787*0Sstevel@tonic-gate 	return (CardServices(ParseTuple, ch, tp, pt));
788*0Sstevel@tonic-gate }
789*0Sstevel@tonic-gate 
790*0Sstevel@tonic-gate int32_t
csx_Parse_CISTPL_FUNCE(client_handle_t ch,tuple_t * tp,cistpl_funce_t * pt,uint32_t function)791*0Sstevel@tonic-gate csx_Parse_CISTPL_FUNCE(client_handle_t ch, tuple_t *tp,
792*0Sstevel@tonic-gate     cistpl_funce_t *pt, uint32_t function)
793*0Sstevel@tonic-gate {
794*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
795*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
796*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_Parse_CISTPL_FUNCE: handle: 0x%x\n", ch);
797*0Sstevel@tonic-gate #endif
798*0Sstevel@tonic-gate 	tp->DesiredTuple = CISTPL_FUNCE;
799*0Sstevel@tonic-gate 	return (CardServices(ParseTuple, ch, tp, pt, function));
800*0Sstevel@tonic-gate }
801*0Sstevel@tonic-gate 
802*0Sstevel@tonic-gate int32_t
csx_Parse_CISTPL_CFTABLE_ENTRY(client_handle_t ch,tuple_t * tp,cistpl_cftable_entry_t * pt)803*0Sstevel@tonic-gate csx_Parse_CISTPL_CFTABLE_ENTRY(client_handle_t ch, tuple_t *tp,
804*0Sstevel@tonic-gate     cistpl_cftable_entry_t *pt)
805*0Sstevel@tonic-gate {
806*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
807*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
808*0Sstevel@tonic-gate 	    cmn_err(CE_CONT,
809*0Sstevel@tonic-gate 		"csx_Parse_CISTPL_CFTABLE_ENTRY: handle: 0x%x\n", ch);
810*0Sstevel@tonic-gate #endif
811*0Sstevel@tonic-gate 	tp->DesiredTuple = CISTPL_CFTABLE_ENTRY;
812*0Sstevel@tonic-gate 	return (CardServices(ParseTuple, ch, tp, pt));
813*0Sstevel@tonic-gate }
814*0Sstevel@tonic-gate 
815*0Sstevel@tonic-gate int32_t
csx_Parse_CISTPL_LINKTARGET(client_handle_t ch,tuple_t * tp,cistpl_linktarget_t * pt)816*0Sstevel@tonic-gate csx_Parse_CISTPL_LINKTARGET(client_handle_t ch, tuple_t *tp,
817*0Sstevel@tonic-gate     cistpl_linktarget_t *pt)
818*0Sstevel@tonic-gate {
819*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
820*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
821*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_Parse_CISTPL_LINKTARGET: handle: 0x%x\n", ch);
822*0Sstevel@tonic-gate #endif
823*0Sstevel@tonic-gate 	tp->DesiredTuple = CISTPL_LINKTARGET;
824*0Sstevel@tonic-gate 	return (CardServices(ParseTuple, ch, tp, pt));
825*0Sstevel@tonic-gate }
826*0Sstevel@tonic-gate 
827*0Sstevel@tonic-gate int32_t
csx_Parse_CISTPL_LONGLINK_A(client_handle_t ch,tuple_t * tp,cistpl_longlink_ac_t * pt)828*0Sstevel@tonic-gate csx_Parse_CISTPL_LONGLINK_A(client_handle_t ch, tuple_t *tp,
829*0Sstevel@tonic-gate     cistpl_longlink_ac_t *pt)
830*0Sstevel@tonic-gate {
831*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
832*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
833*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_Parse_CISTPL_LONGLINK_A: handle: 0x%x\n", ch);
834*0Sstevel@tonic-gate #endif
835*0Sstevel@tonic-gate 	tp->DesiredTuple = CISTPL_LONGLINK_A;
836*0Sstevel@tonic-gate 	return (CardServices(ParseTuple, ch, tp, pt));
837*0Sstevel@tonic-gate }
838*0Sstevel@tonic-gate 
839*0Sstevel@tonic-gate int32_t
csx_Parse_CISTPL_LONGLINK_C(client_handle_t ch,tuple_t * tp,cistpl_longlink_ac_t * pt)840*0Sstevel@tonic-gate csx_Parse_CISTPL_LONGLINK_C(client_handle_t ch, tuple_t *tp,
841*0Sstevel@tonic-gate     cistpl_longlink_ac_t *pt)
842*0Sstevel@tonic-gate {
843*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
844*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
845*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_Parse_CISTPL_LONGLINK_C: handle: 0x%x\n", ch);
846*0Sstevel@tonic-gate #endif
847*0Sstevel@tonic-gate 	tp->DesiredTuple = CISTPL_LONGLINK_C;
848*0Sstevel@tonic-gate 	return (CardServices(ParseTuple, ch, tp, pt));
849*0Sstevel@tonic-gate }
850*0Sstevel@tonic-gate 
851*0Sstevel@tonic-gate int32_t
csx_Parse_CISTPL_LONGLINK_MFC(client_handle_t ch,tuple_t * tp,cistpl_longlink_mfc_t * pt)852*0Sstevel@tonic-gate csx_Parse_CISTPL_LONGLINK_MFC(client_handle_t ch, tuple_t *tp,
853*0Sstevel@tonic-gate     cistpl_longlink_mfc_t *pt)
854*0Sstevel@tonic-gate {
855*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
856*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
857*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_Parse_CISTPL_LONGLINK_MFC: "
858*0Sstevel@tonic-gate 						"handle: 0x%x\n", ch);
859*0Sstevel@tonic-gate #endif
860*0Sstevel@tonic-gate 	tp->DesiredTuple = CISTPL_LONGLINK_MFC;
861*0Sstevel@tonic-gate 	return (CardServices(ParseTuple, ch, tp, pt));
862*0Sstevel@tonic-gate }
863*0Sstevel@tonic-gate 
csx_Parse_CISTPL_LONGLINK_CB(client_handle_t ch,tuple_t * tp,cistpl_longlink_cb_t * pt)864*0Sstevel@tonic-gate int32_t csx_Parse_CISTPL_LONGLINK_CB(client_handle_t ch, tuple_t *tp,
865*0Sstevel@tonic-gate     cistpl_longlink_cb_t *pt)
866*0Sstevel@tonic-gate {
867*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
868*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
869*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_Parse_CISTPL_LONGLINK_CB: "
870*0Sstevel@tonic-gate 						"handle: 0x%x\n", ch);
871*0Sstevel@tonic-gate #endif
872*0Sstevel@tonic-gate 	tp->DesiredTuple = CISTPL_LONGLINK_CB;
873*0Sstevel@tonic-gate 	return (CardServices(ParseTuple, ch, tp, pt));
874*0Sstevel@tonic-gate }
875*0Sstevel@tonic-gate 
876*0Sstevel@tonic-gate int32_t
csx_Parse_CISTPL_SPCL(client_handle_t ch,tuple_t * tp,cistpl_spcl_t * pt)877*0Sstevel@tonic-gate csx_Parse_CISTPL_SPCL(client_handle_t ch, tuple_t *tp,
878*0Sstevel@tonic-gate     cistpl_spcl_t *pt)
879*0Sstevel@tonic-gate {
880*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
881*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
882*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_Parse_CISTPL_SPCL: handle: 0x%x\n", ch);
883*0Sstevel@tonic-gate #endif
884*0Sstevel@tonic-gate 	tp->DesiredTuple = CISTPL_SPCL;
885*0Sstevel@tonic-gate 	return (CardServices(ParseTuple, ch, tp, pt));
886*0Sstevel@tonic-gate }
887*0Sstevel@tonic-gate 
888*0Sstevel@tonic-gate int32_t
csx_Parse_CISTPL_SWIL(client_handle_t ch,tuple_t * tp,cistpl_swil_t * pt)889*0Sstevel@tonic-gate csx_Parse_CISTPL_SWIL(client_handle_t ch, tuple_t *tp,
890*0Sstevel@tonic-gate     cistpl_swil_t *pt)
891*0Sstevel@tonic-gate {
892*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
893*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
894*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_Parse_CISTPL_SWIL: handle: 0x%x\n", ch);
895*0Sstevel@tonic-gate #endif
896*0Sstevel@tonic-gate 	tp->DesiredTuple = CISTPL_SWIL;
897*0Sstevel@tonic-gate 	return (CardServices(ParseTuple, ch, tp, pt));
898*0Sstevel@tonic-gate }
899*0Sstevel@tonic-gate 
csx_Parse_CISTPL_BAR(client_handle_t ch,tuple_t * tp,cistpl_bar_t * pt)900*0Sstevel@tonic-gate int32_t csx_Parse_CISTPL_BAR(client_handle_t ch, tuple_t *tp,
901*0Sstevel@tonic-gate     cistpl_bar_t *pt)
902*0Sstevel@tonic-gate {
903*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
904*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
905*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_Parse_CISTPL_BAR: handle: 0x%x\n", ch);
906*0Sstevel@tonic-gate #endif
907*0Sstevel@tonic-gate 	tp->DesiredTuple = CISTPL_BAR;
908*0Sstevel@tonic-gate 	return (CardServices(ParseTuple, ch, tp, pt));
909*0Sstevel@tonic-gate }
910*0Sstevel@tonic-gate 
911*0Sstevel@tonic-gate int32_t
csx_Parse_CISTPL_DEVICEGEO(client_handle_t ch,tuple_t * tp,cistpl_devicegeo_t * pt)912*0Sstevel@tonic-gate csx_Parse_CISTPL_DEVICEGEO(client_handle_t ch, tuple_t *tp,
913*0Sstevel@tonic-gate     cistpl_devicegeo_t *pt)
914*0Sstevel@tonic-gate {
915*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
916*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
917*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_Parse_CISTPL_DEVICEGEO: handle: 0x%x\n", ch);
918*0Sstevel@tonic-gate #endif
919*0Sstevel@tonic-gate 	tp->DesiredTuple = CISTPL_DEVICEGEO;
920*0Sstevel@tonic-gate 	return (CardServices(ParseTuple, ch, tp, pt));
921*0Sstevel@tonic-gate }
922*0Sstevel@tonic-gate 
923*0Sstevel@tonic-gate int32_t
csx_Parse_CISTPL_DEVICEGEO_A(client_handle_t ch,tuple_t * tp,cistpl_devicegeo_t * pt)924*0Sstevel@tonic-gate csx_Parse_CISTPL_DEVICEGEO_A(client_handle_t ch, tuple_t *tp,
925*0Sstevel@tonic-gate     cistpl_devicegeo_t *pt)
926*0Sstevel@tonic-gate {
927*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
928*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
929*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_Parse_CISTPL_DEVICEGEO_A: "
930*0Sstevel@tonic-gate 						"handle: 0x%x\n", ch);
931*0Sstevel@tonic-gate #endif
932*0Sstevel@tonic-gate 	tp->DesiredTuple = CISTPL_DEVICEGEO_A;
933*0Sstevel@tonic-gate 	return (CardServices(ParseTuple, ch, tp, pt));
934*0Sstevel@tonic-gate }
935*0Sstevel@tonic-gate 
936*0Sstevel@tonic-gate int32_t
csx_ParseTuple(client_handle_t ch,tuple_t * tp,cisparse_t * cp,uint32_t ef)937*0Sstevel@tonic-gate csx_ParseTuple(client_handle_t ch, tuple_t *tp, cisparse_t *cp, uint32_t ef)
938*0Sstevel@tonic-gate {
939*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
940*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
941*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_ParseTuple: handle: 0x%x\n", ch);
942*0Sstevel@tonic-gate #endif
943*0Sstevel@tonic-gate 	return (CardServices(ParseTuple, ch, tp, cp, ef));
944*0Sstevel@tonic-gate }
945*0Sstevel@tonic-gate 
946*0Sstevel@tonic-gate /*
947*0Sstevel@tonic-gate  * The following functions are used to access various datatypes.
948*0Sstevel@tonic-gate  *	These functions are not specific to PCMCIA client drivers
949*0Sstevel@tonic-gate  *	and they don't depend on Card Services being present to
950*0Sstevel@tonic-gate  *	operate.
951*0Sstevel@tonic-gate  */
952*0Sstevel@tonic-gate void
csx_Put8(acc_handle_t handle,uint32_t offset,uint8_t value)953*0Sstevel@tonic-gate csx_Put8(acc_handle_t handle, uint32_t offset, uint8_t value)
954*0Sstevel@tonic-gate {
955*0Sstevel@tonic-gate 	ddi_acc_hdl_t *hp = impl_acc_hdl_get(handle);
956*0Sstevel@tonic-gate 
957*0Sstevel@tonic-gate 	ddi_put8(handle, (uint8_t *)(hp->ah_addr + offset), value);
958*0Sstevel@tonic-gate }
959*0Sstevel@tonic-gate 
960*0Sstevel@tonic-gate void
csx_Put16(acc_handle_t handle,uint32_t offset,uint16_t value)961*0Sstevel@tonic-gate csx_Put16(acc_handle_t handle, uint32_t offset, uint16_t value)
962*0Sstevel@tonic-gate {
963*0Sstevel@tonic-gate 	ddi_acc_hdl_t *hp = impl_acc_hdl_get(handle);
964*0Sstevel@tonic-gate 
965*0Sstevel@tonic-gate 	ddi_put16(handle, (uint16_t *)(hp->ah_addr + offset), value);
966*0Sstevel@tonic-gate }
967*0Sstevel@tonic-gate 
968*0Sstevel@tonic-gate void
csx_Put32(acc_handle_t handle,uint32_t offset,uint32_t value)969*0Sstevel@tonic-gate csx_Put32(acc_handle_t handle, uint32_t offset, uint32_t value)
970*0Sstevel@tonic-gate {
971*0Sstevel@tonic-gate 	ddi_acc_hdl_t *hp = impl_acc_hdl_get(handle);
972*0Sstevel@tonic-gate 
973*0Sstevel@tonic-gate 	ddi_put32(handle, (uint32_t *)(hp->ah_addr + offset), value);
974*0Sstevel@tonic-gate }
975*0Sstevel@tonic-gate 
976*0Sstevel@tonic-gate void
csx_Put64(acc_handle_t handle,uint32_t offset,uint64_t value)977*0Sstevel@tonic-gate csx_Put64(acc_handle_t handle, uint32_t offset, uint64_t value)
978*0Sstevel@tonic-gate {
979*0Sstevel@tonic-gate 	ddi_acc_hdl_t *hp = impl_acc_hdl_get(handle);
980*0Sstevel@tonic-gate 
981*0Sstevel@tonic-gate 	ddi_put64(handle, (uint64_t *)(hp->ah_addr + offset), value);
982*0Sstevel@tonic-gate }
983*0Sstevel@tonic-gate 
984*0Sstevel@tonic-gate uint8_t
csx_Get8(acc_handle_t handle,uint32_t offset)985*0Sstevel@tonic-gate csx_Get8(acc_handle_t handle, uint32_t offset)
986*0Sstevel@tonic-gate {
987*0Sstevel@tonic-gate 	ddi_acc_hdl_t *hp = impl_acc_hdl_get(handle);
988*0Sstevel@tonic-gate 
989*0Sstevel@tonic-gate 	return (ddi_get8(handle, (uint8_t *)(hp->ah_addr + offset)));
990*0Sstevel@tonic-gate }
991*0Sstevel@tonic-gate 
992*0Sstevel@tonic-gate uint16_t
csx_Get16(acc_handle_t handle,uint32_t offset)993*0Sstevel@tonic-gate csx_Get16(acc_handle_t handle, uint32_t offset)
994*0Sstevel@tonic-gate {
995*0Sstevel@tonic-gate 	ddi_acc_hdl_t *hp = impl_acc_hdl_get(handle);
996*0Sstevel@tonic-gate 
997*0Sstevel@tonic-gate 	return (ddi_get16(handle, (uint16_t *)(hp->ah_addr + offset)));
998*0Sstevel@tonic-gate }
999*0Sstevel@tonic-gate 
1000*0Sstevel@tonic-gate uint32_t
csx_Get32(acc_handle_t handle,uint32_t offset)1001*0Sstevel@tonic-gate csx_Get32(acc_handle_t handle, uint32_t offset)
1002*0Sstevel@tonic-gate {
1003*0Sstevel@tonic-gate 	ddi_acc_hdl_t *hp = impl_acc_hdl_get(handle);
1004*0Sstevel@tonic-gate 
1005*0Sstevel@tonic-gate 	return (ddi_get32(handle, (uint32_t *)(hp->ah_addr + offset)));
1006*0Sstevel@tonic-gate }
1007*0Sstevel@tonic-gate 
1008*0Sstevel@tonic-gate uint64_t
csx_Get64(acc_handle_t handle,uint32_t offset)1009*0Sstevel@tonic-gate csx_Get64(acc_handle_t handle, uint32_t offset)
1010*0Sstevel@tonic-gate {
1011*0Sstevel@tonic-gate 	ddi_acc_hdl_t *hp = impl_acc_hdl_get(handle);
1012*0Sstevel@tonic-gate 
1013*0Sstevel@tonic-gate 	return (ddi_get64(handle, (uint64_t *)(hp->ah_addr + offset)));
1014*0Sstevel@tonic-gate }
1015*0Sstevel@tonic-gate 
1016*0Sstevel@tonic-gate void
csx_RepPut8(acc_handle_t handle,uint8_t * hostaddr,uint32_t offset,uint32_t rc,uint32_t flags)1017*0Sstevel@tonic-gate csx_RepPut8(acc_handle_t handle, uint8_t *hostaddr, uint32_t offset,
1018*0Sstevel@tonic-gate 						uint32_t rc, uint32_t flags)
1019*0Sstevel@tonic-gate {
1020*0Sstevel@tonic-gate 	ddi_acc_hdl_t *hp = impl_acc_hdl_get(handle);
1021*0Sstevel@tonic-gate 
1022*0Sstevel@tonic-gate 	ddi_rep_put8(handle, hostaddr, (uint8_t *)(hp->ah_addr + offset),
1023*0Sstevel@tonic-gate 		rc, (uint32_t)flags);
1024*0Sstevel@tonic-gate }
1025*0Sstevel@tonic-gate 
1026*0Sstevel@tonic-gate void
csx_RepPut16(acc_handle_t handle,uint16_t * hostaddr,uint32_t offset,uint32_t rc,uint32_t flags)1027*0Sstevel@tonic-gate csx_RepPut16(acc_handle_t handle, uint16_t *hostaddr, uint32_t offset,
1028*0Sstevel@tonic-gate 						uint32_t rc, uint32_t flags)
1029*0Sstevel@tonic-gate {
1030*0Sstevel@tonic-gate 	ddi_acc_hdl_t *hp = impl_acc_hdl_get(handle);
1031*0Sstevel@tonic-gate 
1032*0Sstevel@tonic-gate 	ddi_rep_put16(handle, hostaddr, (uint16_t *)(hp->ah_addr + offset),
1033*0Sstevel@tonic-gate 		rc, (uint32_t)flags);
1034*0Sstevel@tonic-gate }
1035*0Sstevel@tonic-gate 
1036*0Sstevel@tonic-gate void
csx_RepPut32(acc_handle_t handle,uint32_t * hostaddr,uint32_t offset,uint32_t rc,uint32_t flags)1037*0Sstevel@tonic-gate csx_RepPut32(acc_handle_t handle, uint32_t *hostaddr, uint32_t offset,
1038*0Sstevel@tonic-gate 						uint32_t rc, uint32_t flags)
1039*0Sstevel@tonic-gate {
1040*0Sstevel@tonic-gate 	ddi_acc_hdl_t *hp = impl_acc_hdl_get(handle);
1041*0Sstevel@tonic-gate 
1042*0Sstevel@tonic-gate 	ddi_rep_put32(handle, hostaddr, (uint32_t *)(hp->ah_addr + offset),
1043*0Sstevel@tonic-gate 		rc, (uint32_t)flags);
1044*0Sstevel@tonic-gate }
1045*0Sstevel@tonic-gate 
1046*0Sstevel@tonic-gate void
csx_RepPut64(acc_handle_t handle,uint64_t * hostaddr,uint32_t offset,uint32_t rc,uint32_t flags)1047*0Sstevel@tonic-gate csx_RepPut64(acc_handle_t handle, uint64_t *hostaddr, uint32_t offset,
1048*0Sstevel@tonic-gate 						uint32_t rc, uint32_t flags)
1049*0Sstevel@tonic-gate {
1050*0Sstevel@tonic-gate 	ddi_acc_hdl_t *hp = impl_acc_hdl_get(handle);
1051*0Sstevel@tonic-gate 
1052*0Sstevel@tonic-gate 	ddi_rep_put64(handle, hostaddr, (uint64_t *)(hp->ah_addr + offset),
1053*0Sstevel@tonic-gate 		rc, (uint32_t)flags);
1054*0Sstevel@tonic-gate }
1055*0Sstevel@tonic-gate 
1056*0Sstevel@tonic-gate void
csx_RepGet8(acc_handle_t handle,uint8_t * hostaddr,uint32_t offset,uint32_t rc,uint32_t flags)1057*0Sstevel@tonic-gate csx_RepGet8(acc_handle_t handle, uint8_t *hostaddr, uint32_t offset,
1058*0Sstevel@tonic-gate 						uint32_t rc, uint32_t flags)
1059*0Sstevel@tonic-gate {
1060*0Sstevel@tonic-gate 	ddi_acc_hdl_t *hp = impl_acc_hdl_get(handle);
1061*0Sstevel@tonic-gate 
1062*0Sstevel@tonic-gate 	ddi_rep_get8(handle, hostaddr, (uint8_t *)(hp->ah_addr + offset),
1063*0Sstevel@tonic-gate 		rc, (uint32_t)flags);
1064*0Sstevel@tonic-gate }
1065*0Sstevel@tonic-gate 
1066*0Sstevel@tonic-gate void
csx_RepGet16(acc_handle_t handle,uint16_t * hostaddr,uint32_t offset,uint32_t rc,uint32_t flags)1067*0Sstevel@tonic-gate csx_RepGet16(acc_handle_t handle, uint16_t *hostaddr, uint32_t offset,
1068*0Sstevel@tonic-gate 						uint32_t rc, uint32_t flags)
1069*0Sstevel@tonic-gate {
1070*0Sstevel@tonic-gate 	ddi_acc_hdl_t *hp = impl_acc_hdl_get(handle);
1071*0Sstevel@tonic-gate 
1072*0Sstevel@tonic-gate 	ddi_rep_get16(handle, hostaddr, (uint16_t *)(hp->ah_addr + offset),
1073*0Sstevel@tonic-gate 		rc, (uint32_t)flags);
1074*0Sstevel@tonic-gate }
1075*0Sstevel@tonic-gate 
1076*0Sstevel@tonic-gate void
csx_RepGet32(acc_handle_t handle,uint32_t * hostaddr,uint32_t offset,uint32_t rc,uint32_t flags)1077*0Sstevel@tonic-gate csx_RepGet32(acc_handle_t handle, uint32_t *hostaddr, uint32_t offset,
1078*0Sstevel@tonic-gate 						uint32_t rc, uint32_t flags)
1079*0Sstevel@tonic-gate {
1080*0Sstevel@tonic-gate 	ddi_acc_hdl_t *hp = impl_acc_hdl_get(handle);
1081*0Sstevel@tonic-gate 
1082*0Sstevel@tonic-gate 	ddi_rep_get32(handle, hostaddr, (uint32_t *)(hp->ah_addr + offset),
1083*0Sstevel@tonic-gate 		rc, (uint32_t)flags);
1084*0Sstevel@tonic-gate }
1085*0Sstevel@tonic-gate 
1086*0Sstevel@tonic-gate void
csx_RepGet64(acc_handle_t handle,uint64_t * hostaddr,uint32_t offset,uint32_t rc,uint32_t flags)1087*0Sstevel@tonic-gate csx_RepGet64(acc_handle_t handle, uint64_t *hostaddr, uint32_t offset,
1088*0Sstevel@tonic-gate 						uint32_t rc, uint32_t flags)
1089*0Sstevel@tonic-gate {
1090*0Sstevel@tonic-gate 	ddi_acc_hdl_t *hp = impl_acc_hdl_get(handle);
1091*0Sstevel@tonic-gate 
1092*0Sstevel@tonic-gate 	ddi_rep_get64(handle, hostaddr, (uint64_t *)(hp->ah_addr + offset),
1093*0Sstevel@tonic-gate 		rc, (uint32_t)flags);
1094*0Sstevel@tonic-gate }
1095*0Sstevel@tonic-gate 
1096*0Sstevel@tonic-gate /*
1097*0Sstevel@tonic-gate  * The following two functions return the mapped (virtual) or physical
1098*0Sstevel@tonic-gate  *	base address associated with the passed handle if the address
1099*0Sstevel@tonic-gate  *	can be directly accessed by the caller. If the object represented
1100*0Sstevel@tonic-gate  *	by the handle needs to be accessed through a common access
1101*0Sstevel@tonic-gate  *	function, CS_BAD_BASE is returned.
1102*0Sstevel@tonic-gate  *
1103*0Sstevel@tonic-gate  * XXX - Need to figure out how to determine when to return CS_BAD_BASE
1104*0Sstevel@tonic-gate  *	and also we need more generic return codes not tied to CS.
1105*0Sstevel@tonic-gate  */
1106*0Sstevel@tonic-gate int32_t
csx_GetMappedAddr(acc_handle_t handle,void ** addr)1107*0Sstevel@tonic-gate csx_GetMappedAddr(acc_handle_t handle, void **addr)
1108*0Sstevel@tonic-gate {
1109*0Sstevel@tonic-gate 	ddi_acc_hdl_t *hp = impl_acc_hdl_get(handle);
1110*0Sstevel@tonic-gate 
1111*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
1112*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
1113*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_GetMappedAddr: handle: 0x%p\n", handle);
1114*0Sstevel@tonic-gate #endif
1115*0Sstevel@tonic-gate 
1116*0Sstevel@tonic-gate 	*addr = hp->ah_addr;
1117*0Sstevel@tonic-gate 
1118*0Sstevel@tonic-gate 	return (CS_SUCCESS);	/* XXX should be generic return code */
1119*0Sstevel@tonic-gate }
1120*0Sstevel@tonic-gate 
1121*0Sstevel@tonic-gate int32_t
csx_GetPhysAddr(acc_handle_t handle,void ** addr)1122*0Sstevel@tonic-gate csx_GetPhysAddr(acc_handle_t handle, void **addr)
1123*0Sstevel@tonic-gate {
1124*0Sstevel@tonic-gate #ifndef	lint
1125*0Sstevel@tonic-gate 	ddi_acc_hdl_t *hp = impl_acc_hdl_get(handle);
1126*0Sstevel@tonic-gate #endif	/* lint */
1127*0Sstevel@tonic-gate 
1128*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
1129*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
1130*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_GetPhysAddr: handle: 0x%p\n", handle);
1131*0Sstevel@tonic-gate #endif
1132*0Sstevel@tonic-gate 
1133*0Sstevel@tonic-gate 	*addr = NULL;
1134*0Sstevel@tonic-gate 
1135*0Sstevel@tonic-gate 	return (CS_BAD_BASE);
1136*0Sstevel@tonic-gate }
1137*0Sstevel@tonic-gate 
1138*0Sstevel@tonic-gate /*ARGSUSED*/
1139*0Sstevel@tonic-gate int32_t
csx_DupHandle(acc_handle_t handle,acc_handle_t * dup,uint32_t flags)1140*0Sstevel@tonic-gate csx_DupHandle(acc_handle_t handle, acc_handle_t *dup, uint32_t flags)
1141*0Sstevel@tonic-gate {
1142*0Sstevel@tonic-gate #ifndef	lint
1143*0Sstevel@tonic-gate 	ddi_acc_hdl_t *hp = impl_acc_hdl_get(handle);
1144*0Sstevel@tonic-gate #endif	/* lint */
1145*0Sstevel@tonic-gate 
1146*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
1147*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
1148*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_DupHandle: handle: 0x%p\n", handle);
1149*0Sstevel@tonic-gate #endif
1150*0Sstevel@tonic-gate 
1151*0Sstevel@tonic-gate 	return (CS_BAD_HANDLE);
1152*0Sstevel@tonic-gate 
1153*0Sstevel@tonic-gate #ifdef	XXX
1154*0Sstevel@tonic-gate 	*dup = (acc_handle_t)kmem_alloc(sizeof (acc_hdl_t), KM_SLEEP);
1155*0Sstevel@tonic-gate 	((acc_hdl_t *)*dup)->ddi_handle =
1156*0Sstevel@tonic-gate 		(ddi_acc_handle_t *)kmem_alloc(sizeof (ddi_acc_impl_t),
1157*0Sstevel@tonic-gate 		    KM_SLEEP);
1158*0Sstevel@tonic-gate 
1159*0Sstevel@tonic-gate 	bcopy((caddr_t)hp, (caddr_t)((acc_hdl_t *)*dup)->ddi_handle,
1160*0Sstevel@tonic-gate 	    sizeof (ddi_acc_impl_t));
1161*0Sstevel@tonic-gate 
1162*0Sstevel@tonic-gate 	return (CS_SUCCESS);
1163*0Sstevel@tonic-gate #endif
1164*0Sstevel@tonic-gate }
1165*0Sstevel@tonic-gate 
1166*0Sstevel@tonic-gate int32_t
csx_FreeHandle(acc_handle_t * handle)1167*0Sstevel@tonic-gate csx_FreeHandle(acc_handle_t *handle)
1168*0Sstevel@tonic-gate {
1169*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
1170*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
1171*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_FreeHandle: handle: 0x%p\n", *handle);
1172*0Sstevel@tonic-gate #endif
1173*0Sstevel@tonic-gate 	return (CS_BAD_HANDLE);
1174*0Sstevel@tonic-gate 
1175*0Sstevel@tonic-gate #ifdef	XXX
1176*0Sstevel@tonic-gate 
1177*0Sstevel@tonic-gate 	kmem_free((void *)((acc_hdl_t *)*handle)->ddi_handle,
1178*0Sstevel@tonic-gate 		sizeof (ddi_acc_impl_t));
1179*0Sstevel@tonic-gate 	kmem_free((void *)(acc_hdl_t *)*handle, sizeof (acc_hdl_t));
1180*0Sstevel@tonic-gate 
1181*0Sstevel@tonic-gate 	return (CS_SUCCESS);
1182*0Sstevel@tonic-gate #endif
1183*0Sstevel@tonic-gate }
1184*0Sstevel@tonic-gate 
1185*0Sstevel@tonic-gate /*
1186*0Sstevel@tonic-gate  * XXX - Probably want to remove these fucntions soon
1187*0Sstevel@tonic-gate  */
1188*0Sstevel@tonic-gate int32_t
csx_GetHandleOffset(acc_handle_t handle,uint32_t * offset)1189*0Sstevel@tonic-gate csx_GetHandleOffset(acc_handle_t handle, uint32_t *offset)
1190*0Sstevel@tonic-gate {
1191*0Sstevel@tonic-gate 	ddi_acc_hdl_t *hp = impl_acc_hdl_get(handle);
1192*0Sstevel@tonic-gate 
1193*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
1194*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
1195*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_GetHandleOffset: handle: 0x%p\n", handle);
1196*0Sstevel@tonic-gate #endif
1197*0Sstevel@tonic-gate 
1198*0Sstevel@tonic-gate 	*offset = hp->ah_offset;
1199*0Sstevel@tonic-gate 
1200*0Sstevel@tonic-gate 	return (CS_SUCCESS);
1201*0Sstevel@tonic-gate }
1202*0Sstevel@tonic-gate 
1203*0Sstevel@tonic-gate int32_t
csx_SetHandleOffset(acc_handle_t handle,uint32_t offset)1204*0Sstevel@tonic-gate csx_SetHandleOffset(acc_handle_t handle, uint32_t offset)
1205*0Sstevel@tonic-gate {
1206*0Sstevel@tonic-gate 	ddi_acc_hdl_t *hp = impl_acc_hdl_get(handle);
1207*0Sstevel@tonic-gate 
1208*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
1209*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
1210*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "csx_SetHandleOffset: handle: 0x%p\n", handle);
1211*0Sstevel@tonic-gate #endif
1212*0Sstevel@tonic-gate 
1213*0Sstevel@tonic-gate 	hp->ah_offset = offset;
1214*0Sstevel@tonic-gate 
1215*0Sstevel@tonic-gate 	return (CS_SUCCESS);
1216*0Sstevel@tonic-gate }
1217*0Sstevel@tonic-gate 
1218*0Sstevel@tonic-gate static int
cs_no_carservices()1219*0Sstevel@tonic-gate cs_no_carservices()
1220*0Sstevel@tonic-gate {
1221*0Sstevel@tonic-gate #ifdef	CS_STUBS_DEBUG
1222*0Sstevel@tonic-gate 	if (cs_stubs_debug > 3)
1223*0Sstevel@tonic-gate 	    cmn_err(CE_CONT, "cs_no_carservices\n");
1224*0Sstevel@tonic-gate #endif
1225*0Sstevel@tonic-gate 	return (CS_UNSUPPORTED_FUNCTION);
1226*0Sstevel@tonic-gate }
1227