17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * CDDL HEADER START
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
577e51571Sgongtian zhao - Sun Microsystems - Beijing China  * Common Development and Distribution License (the "License").
677e51571Sgongtian zhao - Sun Microsystems - Beijing China  * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate  *
87c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate  * and limitations under the License.
127c478bd9Sstevel@tonic-gate  *
137c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate  *
197c478bd9Sstevel@tonic-gate  * CDDL HEADER END
207c478bd9Sstevel@tonic-gate  */
217c478bd9Sstevel@tonic-gate /*
2277e51571Sgongtian zhao - Sun Microsystems - Beijing China  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
24*0d2006e4SRobert Mustacchi  * Copyright 2019, Joyent, Inc.
257c478bd9Sstevel@tonic-gate  */
267c478bd9Sstevel@tonic-gate 
277c478bd9Sstevel@tonic-gate 
287c478bd9Sstevel@tonic-gate /*
297c478bd9Sstevel@tonic-gate  * Bridge module containing functions with different names than those in the
307c478bd9Sstevel@tonic-gate  * usba10 module, so the usba10 module can call functions in this (usba) module.
317c478bd9Sstevel@tonic-gate  *
327c478bd9Sstevel@tonic-gate  * The usba10 module is present to satisfy a runtime loader dependency for
337c478bd9Sstevel@tonic-gate  * legacy DDK drivers (V0.8).  The usba10 module calls functions in this (usba)
347c478bd9Sstevel@tonic-gate  * module to carry out driver requests.
357c478bd9Sstevel@tonic-gate  *
367c478bd9Sstevel@tonic-gate  * The intent is that this file disappear once krtld functionality is improved
377c478bd9Sstevel@tonic-gate  * so that drivers dependent on usba10 can call into usba without these wrapper
387c478bd9Sstevel@tonic-gate  * functions.
397c478bd9Sstevel@tonic-gate  *
407c478bd9Sstevel@tonic-gate  * Please see the on81-patch gate usr/src/uts/common/sys/usba10/usba10_usbai.h
417c478bd9Sstevel@tonic-gate  * header file for descriptions and comments for these functions.
427c478bd9Sstevel@tonic-gate  */
437c478bd9Sstevel@tonic-gate 
447c478bd9Sstevel@tonic-gate #include <sys/usb/usba.h>
457c478bd9Sstevel@tonic-gate #include <sys/usb/usba/usbai_private.h>
467c478bd9Sstevel@tonic-gate #include <sys/usb/usba/usba10.h>
477c478bd9Sstevel@tonic-gate 
487c478bd9Sstevel@tonic-gate #ifndef __lock_lint
497c478bd9Sstevel@tonic-gate 
507c478bd9Sstevel@tonic-gate int
usba10_usb_register_client(dev_info_t * dip,uint_t version,usb_client_dev_data_t ** dev_data,usb_reg_parse_lvl_t parse_level,usb_flags_t flags)517c478bd9Sstevel@tonic-gate usba10_usb_register_client(
527c478bd9Sstevel@tonic-gate 	dev_info_t			*dip,
537c478bd9Sstevel@tonic-gate 	uint_t				version,
547c478bd9Sstevel@tonic-gate 	usb_client_dev_data_t		**dev_data,
557c478bd9Sstevel@tonic-gate 	usb_reg_parse_lvl_t		parse_level,
567c478bd9Sstevel@tonic-gate 	usb_flags_t			flags)
577c478bd9Sstevel@tonic-gate {
587c478bd9Sstevel@tonic-gate 	return (usb_register_client(
597c478bd9Sstevel@tonic-gate 	    dip, version, dev_data, parse_level, flags));
607c478bd9Sstevel@tonic-gate }
617c478bd9Sstevel@tonic-gate 
627c478bd9Sstevel@tonic-gate 
637c478bd9Sstevel@tonic-gate void
usba10_usb_unregister_client(dev_info_t * dip,usb_client_dev_data_t * dev_data)647c478bd9Sstevel@tonic-gate usba10_usb_unregister_client(
657c478bd9Sstevel@tonic-gate 	dev_info_t			*dip,
667c478bd9Sstevel@tonic-gate 	usb_client_dev_data_t		*dev_data)
677c478bd9Sstevel@tonic-gate {
687c478bd9Sstevel@tonic-gate 	usb_unregister_client(dip, dev_data);
697c478bd9Sstevel@tonic-gate }
707c478bd9Sstevel@tonic-gate 
717c478bd9Sstevel@tonic-gate 
727c478bd9Sstevel@tonic-gate void
usba10_usb_free_descr_tree(dev_info_t * dip,usb_client_dev_data_t * dev_data)737c478bd9Sstevel@tonic-gate usba10_usb_free_descr_tree(
747c478bd9Sstevel@tonic-gate 	dev_info_t			*dip,
757c478bd9Sstevel@tonic-gate 	usb_client_dev_data_t		*dev_data)
767c478bd9Sstevel@tonic-gate {
777c478bd9Sstevel@tonic-gate 	usb_free_descr_tree(dip, dev_data);
787c478bd9Sstevel@tonic-gate }
797c478bd9Sstevel@tonic-gate 
807c478bd9Sstevel@tonic-gate 
817c478bd9Sstevel@tonic-gate size_t
usba10_usb_parse_data(char * format,const uchar_t * data,size_t datalen,void * structure,size_t structlen)827c478bd9Sstevel@tonic-gate usba10_usb_parse_data(
837c478bd9Sstevel@tonic-gate 	char			*format,
84*0d2006e4SRobert Mustacchi 	const uchar_t 		*data,
857c478bd9Sstevel@tonic-gate 	size_t			datalen,
867c478bd9Sstevel@tonic-gate 	void			*structure,
877c478bd9Sstevel@tonic-gate 	size_t			structlen)
887c478bd9Sstevel@tonic-gate {
897c478bd9Sstevel@tonic-gate 	return (usb_parse_data(
907c478bd9Sstevel@tonic-gate 	    format, data, datalen, structure, structlen));
917c478bd9Sstevel@tonic-gate }
927c478bd9Sstevel@tonic-gate 
937c478bd9Sstevel@tonic-gate usb_ep_data_t *
usba10_usb_get_ep_data(dev_info_t * dip,usb_client_dev_data_t * dev_datap,uint_t interface,uint_t alternate,uint_t type,uint_t direction)947c478bd9Sstevel@tonic-gate usba10_usb_get_ep_data(
957c478bd9Sstevel@tonic-gate 	dev_info_t		*dip,
967c478bd9Sstevel@tonic-gate 	usb_client_dev_data_t	*dev_datap,
977c478bd9Sstevel@tonic-gate 	uint_t			interface,
987c478bd9Sstevel@tonic-gate 	uint_t			alternate,
997c478bd9Sstevel@tonic-gate 	uint_t			type,
1007c478bd9Sstevel@tonic-gate 	uint_t			direction)
1017c478bd9Sstevel@tonic-gate {
1027c478bd9Sstevel@tonic-gate 	return (usb_get_ep_data(
1037c478bd9Sstevel@tonic-gate 	    dip, dev_datap, interface, alternate, type, direction));
1047c478bd9Sstevel@tonic-gate }
1057c478bd9Sstevel@tonic-gate 
1067c478bd9Sstevel@tonic-gate 
1077c478bd9Sstevel@tonic-gate int
usba10_usb_get_string_descr(dev_info_t * dip,uint16_t langid,uint8_t index,char * buf,size_t buflen)1087c478bd9Sstevel@tonic-gate usba10_usb_get_string_descr(
1097c478bd9Sstevel@tonic-gate 	dev_info_t		*dip,
1107c478bd9Sstevel@tonic-gate 	uint16_t		langid,
1117c478bd9Sstevel@tonic-gate 	uint8_t			index,
1127c478bd9Sstevel@tonic-gate 	char			*buf,
1137c478bd9Sstevel@tonic-gate 	size_t			buflen)
1147c478bd9Sstevel@tonic-gate {
1157c478bd9Sstevel@tonic-gate 	return (usb_get_string_descr(dip, langid, index, buf, buflen));
1167c478bd9Sstevel@tonic-gate }
1177c478bd9Sstevel@tonic-gate 
1187c478bd9Sstevel@tonic-gate 
1197c478bd9Sstevel@tonic-gate int
usba10_usb_get_addr(dev_info_t * dip)1207c478bd9Sstevel@tonic-gate usba10_usb_get_addr(dev_info_t *dip)
1217c478bd9Sstevel@tonic-gate {
1227c478bd9Sstevel@tonic-gate 	return (usb_get_addr(dip));
1237c478bd9Sstevel@tonic-gate }
1247c478bd9Sstevel@tonic-gate 
1257c478bd9Sstevel@tonic-gate 
1267c478bd9Sstevel@tonic-gate int
usba10_usb_get_if_number(dev_info_t * dip)1277c478bd9Sstevel@tonic-gate usba10_usb_get_if_number(dev_info_t *dip)
1287c478bd9Sstevel@tonic-gate {
1297c478bd9Sstevel@tonic-gate 	return (usb_get_if_number(dip));
1307c478bd9Sstevel@tonic-gate }
1317c478bd9Sstevel@tonic-gate 
1327c478bd9Sstevel@tonic-gate 
1337c478bd9Sstevel@tonic-gate boolean_t
usba10_usb_owns_device(dev_info_t * dip)1347c478bd9Sstevel@tonic-gate usba10_usb_owns_device(dev_info_t *dip)
1357c478bd9Sstevel@tonic-gate {
1367c478bd9Sstevel@tonic-gate 	return (usb_owns_device(dip));
1377c478bd9Sstevel@tonic-gate }
1387c478bd9Sstevel@tonic-gate 
1397c478bd9Sstevel@tonic-gate 
1407c478bd9Sstevel@tonic-gate int
usba10_usb_pipe_get_state(usb_pipe_handle_t pipe_handle,usb_pipe_state_t * pipe_state,usb_flags_t flags)1417c478bd9Sstevel@tonic-gate usba10_usb_pipe_get_state(
1427c478bd9Sstevel@tonic-gate 	usb_pipe_handle_t	pipe_handle,
1437c478bd9Sstevel@tonic-gate 	usb_pipe_state_t	*pipe_state,
1447c478bd9Sstevel@tonic-gate 	usb_flags_t		flags)
1457c478bd9Sstevel@tonic-gate {
1467c478bd9Sstevel@tonic-gate 	return (usb_pipe_get_state(pipe_handle, pipe_state, flags));
1477c478bd9Sstevel@tonic-gate }
1487c478bd9Sstevel@tonic-gate 
1497c478bd9Sstevel@tonic-gate 
1507c478bd9Sstevel@tonic-gate int
usba10_usb_ep_num(usb_pipe_handle_t ph)1517c478bd9Sstevel@tonic-gate usba10_usb_ep_num(usb_pipe_handle_t ph)
1527c478bd9Sstevel@tonic-gate {
1537c478bd9Sstevel@tonic-gate 	return (usb_ep_num(ph));
1547c478bd9Sstevel@tonic-gate }
1557c478bd9Sstevel@tonic-gate 
1567c478bd9Sstevel@tonic-gate 
1577c478bd9Sstevel@tonic-gate int
usba10_usb_pipe_open(dev_info_t * dip,usb_ep_descr_t * ep,usb_pipe_policy_t * pipe_policy,usb_flags_t flags,usb_pipe_handle_t * pipe_handle)1587c478bd9Sstevel@tonic-gate usba10_usb_pipe_open(
1597c478bd9Sstevel@tonic-gate 	dev_info_t		*dip,
1607c478bd9Sstevel@tonic-gate 	usb_ep_descr_t		*ep,
1617c478bd9Sstevel@tonic-gate 	usb_pipe_policy_t	*pipe_policy,
1627c478bd9Sstevel@tonic-gate 	usb_flags_t		flags,
1637c478bd9Sstevel@tonic-gate 	usb_pipe_handle_t	*pipe_handle)
1647c478bd9Sstevel@tonic-gate {
1657c478bd9Sstevel@tonic-gate 	return (usb_pipe_open(dip, ep, pipe_policy, flags, pipe_handle));
1667c478bd9Sstevel@tonic-gate }
1677c478bd9Sstevel@tonic-gate 
1687c478bd9Sstevel@tonic-gate 
1697c478bd9Sstevel@tonic-gate void
usba10_usb_pipe_close(dev_info_t * dip,usb_pipe_handle_t pipe_handle,usb_flags_t flags,void (* cb)(usb_pipe_handle_t ph,usb_opaque_t arg,int rval,usb_cb_flags_t flags),usb_opaque_t cb_arg)1707c478bd9Sstevel@tonic-gate usba10_usb_pipe_close(
1717c478bd9Sstevel@tonic-gate 	dev_info_t		*dip,
1727c478bd9Sstevel@tonic-gate 	usb_pipe_handle_t	pipe_handle,
1737c478bd9Sstevel@tonic-gate 	usb_flags_t		flags,
1747c478bd9Sstevel@tonic-gate 	void			(*cb)(
1757c478bd9Sstevel@tonic-gate 				    usb_pipe_handle_t	ph,
1767c478bd9Sstevel@tonic-gate 				    usb_opaque_t	arg,	/* cb arg */
1777c478bd9Sstevel@tonic-gate 				    int			rval,
1787c478bd9Sstevel@tonic-gate 				    usb_cb_flags_t	flags),
1797c478bd9Sstevel@tonic-gate 	usb_opaque_t		cb_arg)
1807c478bd9Sstevel@tonic-gate {
1817c478bd9Sstevel@tonic-gate 	usb_pipe_close(dip, pipe_handle, flags, cb, cb_arg);
1827c478bd9Sstevel@tonic-gate }
1837c478bd9Sstevel@tonic-gate 
1847c478bd9Sstevel@tonic-gate 
1857c478bd9Sstevel@tonic-gate int
usba10_usb_pipe_drain_reqs(dev_info_t * dip,usb_pipe_handle_t pipe_handle,uint_t time,usb_flags_t flags,void (* cb)(usb_pipe_handle_t ph,usb_opaque_t arg,int rval,usb_cb_flags_t flags),usb_opaque_t cb_arg)1867c478bd9Sstevel@tonic-gate usba10_usb_pipe_drain_reqs(
1877c478bd9Sstevel@tonic-gate 	dev_info_t		*dip,
1887c478bd9Sstevel@tonic-gate 	usb_pipe_handle_t	pipe_handle,
1897c478bd9Sstevel@tonic-gate 	uint_t			time,
1907c478bd9Sstevel@tonic-gate 	usb_flags_t		flags,
1917c478bd9Sstevel@tonic-gate 	void			(*cb)(
1927c478bd9Sstevel@tonic-gate 				    usb_pipe_handle_t	ph,
1937c478bd9Sstevel@tonic-gate 				    usb_opaque_t	arg,	/* cb arg */
1947c478bd9Sstevel@tonic-gate 				    int			rval,
1957c478bd9Sstevel@tonic-gate 				    usb_cb_flags_t	flags),
1967c478bd9Sstevel@tonic-gate 	usb_opaque_t		cb_arg)
1977c478bd9Sstevel@tonic-gate {
1987c478bd9Sstevel@tonic-gate 	return (usb_pipe_drain_reqs(
1997c478bd9Sstevel@tonic-gate 	    dip, pipe_handle, time, flags, cb, cb_arg));
2007c478bd9Sstevel@tonic-gate }
2017c478bd9Sstevel@tonic-gate 
2027c478bd9Sstevel@tonic-gate 
2037c478bd9Sstevel@tonic-gate int
usba10_usb_pipe_set_private(usb_pipe_handle_t pipe_handle,usb_opaque_t data)2047c478bd9Sstevel@tonic-gate usba10_usb_pipe_set_private(
2057c478bd9Sstevel@tonic-gate 	usb_pipe_handle_t	pipe_handle,
2067c478bd9Sstevel@tonic-gate 	usb_opaque_t		data)
2077c478bd9Sstevel@tonic-gate {
2087c478bd9Sstevel@tonic-gate 	return (usb_pipe_set_private(pipe_handle, data));
2097c478bd9Sstevel@tonic-gate }
2107c478bd9Sstevel@tonic-gate 
2117c478bd9Sstevel@tonic-gate 
2127c478bd9Sstevel@tonic-gate usb_opaque_t
usba10_usb_pipe_get_private(usb_pipe_handle_t pipe_handle)2137c478bd9Sstevel@tonic-gate usba10_usb_pipe_get_private(usb_pipe_handle_t pipe_handle)
2147c478bd9Sstevel@tonic-gate {
2157c478bd9Sstevel@tonic-gate 	return (usb_pipe_get_private(pipe_handle));
2167c478bd9Sstevel@tonic-gate }
2177c478bd9Sstevel@tonic-gate 
2187c478bd9Sstevel@tonic-gate 
2197c478bd9Sstevel@tonic-gate void
usba10_usb_pipe_reset(dev_info_t * dip,usb_pipe_handle_t pipe_handle,usb_flags_t usb_flags,void (* cb)(usb_pipe_handle_t ph,usb_opaque_t arg,int rval,usb_cb_flags_t flags),usb_opaque_t cb_arg)2207c478bd9Sstevel@tonic-gate usba10_usb_pipe_reset(
2217c478bd9Sstevel@tonic-gate 	dev_info_t		*dip,
2227c478bd9Sstevel@tonic-gate 	usb_pipe_handle_t	pipe_handle,
2237c478bd9Sstevel@tonic-gate 	usb_flags_t		usb_flags,
2247c478bd9Sstevel@tonic-gate 	void			(*cb)(
2257c478bd9Sstevel@tonic-gate 					usb_pipe_handle_t ph,
2267c478bd9Sstevel@tonic-gate 					usb_opaque_t	arg,
2277c478bd9Sstevel@tonic-gate 					int		rval,
2287c478bd9Sstevel@tonic-gate 					usb_cb_flags_t	flags),
2297c478bd9Sstevel@tonic-gate 	usb_opaque_t		cb_arg)
2307c478bd9Sstevel@tonic-gate {
2317c478bd9Sstevel@tonic-gate 	usb_pipe_reset(dip, pipe_handle, usb_flags, cb, cb_arg);
2327c478bd9Sstevel@tonic-gate }
2337c478bd9Sstevel@tonic-gate 
2347c478bd9Sstevel@tonic-gate 
2357c478bd9Sstevel@tonic-gate usb_ctrl_req_t *
usba10_usb_alloc_ctrl_req(dev_info_t * dip,size_t len,usb_flags_t flags)2367c478bd9Sstevel@tonic-gate usba10_usb_alloc_ctrl_req(
2377c478bd9Sstevel@tonic-gate 	dev_info_t		*dip,
2387c478bd9Sstevel@tonic-gate 	size_t			len,
2397c478bd9Sstevel@tonic-gate 	usb_flags_t		flags)
2407c478bd9Sstevel@tonic-gate {
2417c478bd9Sstevel@tonic-gate 	return (usb_alloc_ctrl_req(dip, len, flags));
2427c478bd9Sstevel@tonic-gate }
2437c478bd9Sstevel@tonic-gate 
2447c478bd9Sstevel@tonic-gate 
2457c478bd9Sstevel@tonic-gate void
usba10_usb_free_ctrl_req(usb_ctrl_req_t * reqp)2467c478bd9Sstevel@tonic-gate usba10_usb_free_ctrl_req(usb_ctrl_req_t *reqp)
2477c478bd9Sstevel@tonic-gate {
2487c478bd9Sstevel@tonic-gate 	usb_free_ctrl_req(reqp);
2497c478bd9Sstevel@tonic-gate }
2507c478bd9Sstevel@tonic-gate 
2517c478bd9Sstevel@tonic-gate 
2527c478bd9Sstevel@tonic-gate int
usba10_usb_pipe_ctrl_xfer(usb_pipe_handle_t pipe_handle,usb_ctrl_req_t * reqp,usb_flags_t flags)2537c478bd9Sstevel@tonic-gate usba10_usb_pipe_ctrl_xfer(
2547c478bd9Sstevel@tonic-gate 	usb_pipe_handle_t	pipe_handle,
2557c478bd9Sstevel@tonic-gate 	usb_ctrl_req_t		*reqp,
2567c478bd9Sstevel@tonic-gate 	usb_flags_t		flags)
2577c478bd9Sstevel@tonic-gate {
2587c478bd9Sstevel@tonic-gate 	return (usb_pipe_ctrl_xfer(pipe_handle, reqp, flags));
2597c478bd9Sstevel@tonic-gate }
2607c478bd9Sstevel@tonic-gate 
2617c478bd9Sstevel@tonic-gate 
2627c478bd9Sstevel@tonic-gate int
usba10_usb_get_status(dev_info_t * dip,usb_pipe_handle_t ph,uint_t type,uint_t what,uint16_t * status,usb_flags_t flags)2637c478bd9Sstevel@tonic-gate usba10_usb_get_status(
2647c478bd9Sstevel@tonic-gate 	dev_info_t		*dip,
2657c478bd9Sstevel@tonic-gate 	usb_pipe_handle_t	ph,
2667c478bd9Sstevel@tonic-gate 	uint_t			type,	/* bmRequestType */
2677c478bd9Sstevel@tonic-gate 	uint_t			what,	/* 0, interface, endpoint number */
2687c478bd9Sstevel@tonic-gate 	uint16_t		*status,
2697c478bd9Sstevel@tonic-gate 	usb_flags_t		flags)
2707c478bd9Sstevel@tonic-gate {
2717c478bd9Sstevel@tonic-gate 	return (usb_get_status(dip, ph, type, what, status, flags));
2727c478bd9Sstevel@tonic-gate }
2737c478bd9Sstevel@tonic-gate 
2747c478bd9Sstevel@tonic-gate 
2757c478bd9Sstevel@tonic-gate int
usba10_usb_clear_feature(dev_info_t * dip,usb_pipe_handle_t ph,uint_t type,uint_t feature,uint_t what,usb_flags_t flags)2767c478bd9Sstevel@tonic-gate usba10_usb_clear_feature(
2777c478bd9Sstevel@tonic-gate 	dev_info_t		*dip,
2787c478bd9Sstevel@tonic-gate 	usb_pipe_handle_t	ph,
2797c478bd9Sstevel@tonic-gate 	uint_t			type,	/* bmRequestType */
2807c478bd9Sstevel@tonic-gate 	uint_t			feature,
2817c478bd9Sstevel@tonic-gate 	uint_t			what,	/* 0, interface, endpoint number */
2827c478bd9Sstevel@tonic-gate 	usb_flags_t		flags)
2837c478bd9Sstevel@tonic-gate {
2847c478bd9Sstevel@tonic-gate 	return (usb_clear_feature(dip, ph, type, feature, what, flags));
2857c478bd9Sstevel@tonic-gate }
2867c478bd9Sstevel@tonic-gate 
2877c478bd9Sstevel@tonic-gate 
2887c478bd9Sstevel@tonic-gate int
usba10_usb_pipe_ctrl_xfer_wait(usb_pipe_handle_t pipe_handle,usb_ctrl_setup_t * setup,mblk_t ** data,usb_cr_t * completion_reason,usb_cb_flags_t * cb_flags,usb_flags_t flags)2897c478bd9Sstevel@tonic-gate usba10_usb_pipe_ctrl_xfer_wait(
2907c478bd9Sstevel@tonic-gate 	usb_pipe_handle_t	pipe_handle,
2917c478bd9Sstevel@tonic-gate 	usb_ctrl_setup_t	*setup,
2927c478bd9Sstevel@tonic-gate 	mblk_t			**data,
2937c478bd9Sstevel@tonic-gate 	usb_cr_t		*completion_reason,
2947c478bd9Sstevel@tonic-gate 	usb_cb_flags_t		*cb_flags,
2957c478bd9Sstevel@tonic-gate 	usb_flags_t		flags)
2967c478bd9Sstevel@tonic-gate {
2977c478bd9Sstevel@tonic-gate 	return (usb_pipe_ctrl_xfer_wait(
2987c478bd9Sstevel@tonic-gate 	    pipe_handle, setup, data, completion_reason, cb_flags, flags));
2997c478bd9Sstevel@tonic-gate }
3007c478bd9Sstevel@tonic-gate 
3017c478bd9Sstevel@tonic-gate 
3027c478bd9Sstevel@tonic-gate int
usba10_usb_set_cfg(dev_info_t * dip,uint_t cfg_index,usb_flags_t usb_flags,void (* cb)(usb_pipe_handle_t ph,usb_opaque_t arg,int rval,usb_cb_flags_t flags),usb_opaque_t cb_arg)3037c478bd9Sstevel@tonic-gate usba10_usb_set_cfg(
3047c478bd9Sstevel@tonic-gate 	dev_info_t		*dip,
3057c478bd9Sstevel@tonic-gate 	uint_t			cfg_index,
3067c478bd9Sstevel@tonic-gate 	usb_flags_t		usb_flags,
3077c478bd9Sstevel@tonic-gate 	void			(*cb)(
3087c478bd9Sstevel@tonic-gate 					usb_pipe_handle_t ph,
3097c478bd9Sstevel@tonic-gate 					usb_opaque_t	arg,
3107c478bd9Sstevel@tonic-gate 					int		rval,
3117c478bd9Sstevel@tonic-gate 					usb_cb_flags_t	flags),
3127c478bd9Sstevel@tonic-gate 	usb_opaque_t		cb_arg)
3137c478bd9Sstevel@tonic-gate {
3147c478bd9Sstevel@tonic-gate 	return (usb_set_cfg(dip, cfg_index, usb_flags, cb, cb_arg));
3157c478bd9Sstevel@tonic-gate }
3167c478bd9Sstevel@tonic-gate 
3177c478bd9Sstevel@tonic-gate 
3187c478bd9Sstevel@tonic-gate int
usba10_usb_get_cfg(dev_info_t * dip,uint_t * cfgval,usb_flags_t usb_flags)3197c478bd9Sstevel@tonic-gate usba10_usb_get_cfg(
3207c478bd9Sstevel@tonic-gate 	dev_info_t		*dip,
3217c478bd9Sstevel@tonic-gate 	uint_t			*cfgval,
3227c478bd9Sstevel@tonic-gate 	usb_flags_t		usb_flags)
3237c478bd9Sstevel@tonic-gate {
3247c478bd9Sstevel@tonic-gate 	return (usb_get_cfg(dip, cfgval, usb_flags));
3257c478bd9Sstevel@tonic-gate }
3267c478bd9Sstevel@tonic-gate 
3277c478bd9Sstevel@tonic-gate 
3287c478bd9Sstevel@tonic-gate int
usba10_usb_set_alt_if(dev_info_t * dip,uint_t interface,uint_t alt_number,usb_flags_t usb_flags,void (* cb)(usb_pipe_handle_t ph,usb_opaque_t arg,int rval,usb_cb_flags_t flags),usb_opaque_t cb_arg)3297c478bd9Sstevel@tonic-gate usba10_usb_set_alt_if(
3307c478bd9Sstevel@tonic-gate 	dev_info_t		*dip,
3317c478bd9Sstevel@tonic-gate 	uint_t			interface,
3327c478bd9Sstevel@tonic-gate 	uint_t			alt_number,
3337c478bd9Sstevel@tonic-gate 	usb_flags_t		usb_flags,
3347c478bd9Sstevel@tonic-gate 	void			(*cb)(
3357c478bd9Sstevel@tonic-gate 					usb_pipe_handle_t ph,
3367c478bd9Sstevel@tonic-gate 					usb_opaque_t	arg,
3377c478bd9Sstevel@tonic-gate 					int		rval,
3387c478bd9Sstevel@tonic-gate 					usb_cb_flags_t	flags),
3397c478bd9Sstevel@tonic-gate 	usb_opaque_t		cb_arg)
3407c478bd9Sstevel@tonic-gate {
3417c478bd9Sstevel@tonic-gate 	return (usb_set_alt_if(
3427c478bd9Sstevel@tonic-gate 	    dip, interface, alt_number, usb_flags, cb, cb_arg));
3437c478bd9Sstevel@tonic-gate }
3447c478bd9Sstevel@tonic-gate 
3457c478bd9Sstevel@tonic-gate 
3467c478bd9Sstevel@tonic-gate int
usba10_usb_get_alt_if(dev_info_t * dip,uint_t if_number,uint_t * alt_number,usb_flags_t flags)3477c478bd9Sstevel@tonic-gate usba10_usb_get_alt_if(
3487c478bd9Sstevel@tonic-gate 	dev_info_t		*dip,
3497c478bd9Sstevel@tonic-gate 	uint_t			if_number,
3507c478bd9Sstevel@tonic-gate 	uint_t			*alt_number,
3517c478bd9Sstevel@tonic-gate 	usb_flags_t		flags)
3527c478bd9Sstevel@tonic-gate {
3537c478bd9Sstevel@tonic-gate 	return (usb_get_alt_if(dip, if_number, alt_number, flags));
3547c478bd9Sstevel@tonic-gate }
3557c478bd9Sstevel@tonic-gate 
3567c478bd9Sstevel@tonic-gate 
3577c478bd9Sstevel@tonic-gate usb_bulk_req_t *
usba10_usb_alloc_bulk_req(dev_info_t * dip,size_t len,usb_flags_t flags)3587c478bd9Sstevel@tonic-gate usba10_usb_alloc_bulk_req(
3597c478bd9Sstevel@tonic-gate 	dev_info_t		*dip,
3607c478bd9Sstevel@tonic-gate 	size_t			len,
3617c478bd9Sstevel@tonic-gate 	usb_flags_t		flags)
3627c478bd9Sstevel@tonic-gate {
3637c478bd9Sstevel@tonic-gate 	return (usb_alloc_bulk_req(dip, len, flags));
3647c478bd9Sstevel@tonic-gate }
3657c478bd9Sstevel@tonic-gate 
3667c478bd9Sstevel@tonic-gate 
3677c478bd9Sstevel@tonic-gate void
usba10_usb_free_bulk_req(usb_bulk_req_t * reqp)3687c478bd9Sstevel@tonic-gate usba10_usb_free_bulk_req(usb_bulk_req_t *reqp)
3697c478bd9Sstevel@tonic-gate {
3707c478bd9Sstevel@tonic-gate 	usb_free_bulk_req(reqp);
3717c478bd9Sstevel@tonic-gate }
3727c478bd9Sstevel@tonic-gate 
3737c478bd9Sstevel@tonic-gate 
3747c478bd9Sstevel@tonic-gate int
usba10_usb_pipe_bulk_xfer(usb_pipe_handle_t pipe_handle,usb_bulk_req_t * reqp,usb_flags_t flags)3757c478bd9Sstevel@tonic-gate usba10_usb_pipe_bulk_xfer(
3767c478bd9Sstevel@tonic-gate 	usb_pipe_handle_t	pipe_handle,
3777c478bd9Sstevel@tonic-gate 	usb_bulk_req_t		*reqp,
3787c478bd9Sstevel@tonic-gate 	usb_flags_t		flags)
3797c478bd9Sstevel@tonic-gate {
3807c478bd9Sstevel@tonic-gate 	return (usb_pipe_bulk_xfer(pipe_handle, reqp, flags));
3817c478bd9Sstevel@tonic-gate }
3827c478bd9Sstevel@tonic-gate 
3837c478bd9Sstevel@tonic-gate 
3847c478bd9Sstevel@tonic-gate int
usba10_usb_pipe_bulk_transfer_size(dev_info_t * dip,size_t * size)3857c478bd9Sstevel@tonic-gate usba10_usb_pipe_bulk_transfer_size(
3867c478bd9Sstevel@tonic-gate 	dev_info_t		*dip,
3877c478bd9Sstevel@tonic-gate 	size_t			*size)
3887c478bd9Sstevel@tonic-gate {
3897c478bd9Sstevel@tonic-gate 	return (usb_pipe_bulk_transfer_size(dip, size));
3907c478bd9Sstevel@tonic-gate }
3917c478bd9Sstevel@tonic-gate 
3927c478bd9Sstevel@tonic-gate 
3937c478bd9Sstevel@tonic-gate usb_intr_req_t *
usba10_usb_alloc_intr_req(dev_info_t * dip,size_t len,usb_flags_t flags)3947c478bd9Sstevel@tonic-gate usba10_usb_alloc_intr_req(
3957c478bd9Sstevel@tonic-gate 	dev_info_t		*dip,
3967c478bd9Sstevel@tonic-gate 	size_t			len,
3977c478bd9Sstevel@tonic-gate 	usb_flags_t		flags)
3987c478bd9Sstevel@tonic-gate {
3997c478bd9Sstevel@tonic-gate 	return (usb_alloc_intr_req(dip, len, flags));
4007c478bd9Sstevel@tonic-gate }
4017c478bd9Sstevel@tonic-gate 
4027c478bd9Sstevel@tonic-gate 
4037c478bd9Sstevel@tonic-gate void
usba10_usb_free_intr_req(usb_intr_req_t * reqp)4047c478bd9Sstevel@tonic-gate usba10_usb_free_intr_req(usb_intr_req_t *reqp)
4057c478bd9Sstevel@tonic-gate {
4067c478bd9Sstevel@tonic-gate 	usb_free_intr_req(reqp);
4077c478bd9Sstevel@tonic-gate }
4087c478bd9Sstevel@tonic-gate 
4097c478bd9Sstevel@tonic-gate 
4107c478bd9Sstevel@tonic-gate int
usba10_usb_pipe_intr_xfer(usb_pipe_handle_t pipe_handle,usb_intr_req_t * req,usb_flags_t flags)4117c478bd9Sstevel@tonic-gate usba10_usb_pipe_intr_xfer(
4127c478bd9Sstevel@tonic-gate 	usb_pipe_handle_t	pipe_handle,
4137c478bd9Sstevel@tonic-gate 	usb_intr_req_t		*req,
4147c478bd9Sstevel@tonic-gate 	usb_flags_t		flags)
4157c478bd9Sstevel@tonic-gate {
4167c478bd9Sstevel@tonic-gate 	return (usb_pipe_intr_xfer(pipe_handle, req, flags));
4177c478bd9Sstevel@tonic-gate }
4187c478bd9Sstevel@tonic-gate 
4197c478bd9Sstevel@tonic-gate 
4207c478bd9Sstevel@tonic-gate void
usba10_usb_pipe_stop_intr_polling(usb_pipe_handle_t pipe_handle,usb_flags_t flags)4217c478bd9Sstevel@tonic-gate usba10_usb_pipe_stop_intr_polling(
4227c478bd9Sstevel@tonic-gate 	usb_pipe_handle_t	pipe_handle,
4237c478bd9Sstevel@tonic-gate 	usb_flags_t		flags)
4247c478bd9Sstevel@tonic-gate {
4257c478bd9Sstevel@tonic-gate 	usb_pipe_stop_intr_polling(pipe_handle, flags);
4267c478bd9Sstevel@tonic-gate }
4277c478bd9Sstevel@tonic-gate 
4287c478bd9Sstevel@tonic-gate 
4297c478bd9Sstevel@tonic-gate usb_isoc_req_t *
usba10_usb_alloc_isoc_req(dev_info_t * dip,uint_t isoc_pkts_count,size_t len,usb_flags_t flags)4307c478bd9Sstevel@tonic-gate usba10_usb_alloc_isoc_req(
4317c478bd9Sstevel@tonic-gate 	dev_info_t		*dip,
4327c478bd9Sstevel@tonic-gate 	uint_t			isoc_pkts_count,
4337c478bd9Sstevel@tonic-gate 	size_t			len,
4347c478bd9Sstevel@tonic-gate 	usb_flags_t		flags)
4357c478bd9Sstevel@tonic-gate {
4367c478bd9Sstevel@tonic-gate 	return (usb_alloc_isoc_req(dip, isoc_pkts_count, len, flags));
4377c478bd9Sstevel@tonic-gate }
4387c478bd9Sstevel@tonic-gate 
4397c478bd9Sstevel@tonic-gate 
4407c478bd9Sstevel@tonic-gate void
usba10_usb_free_isoc_req(usb_isoc_req_t * usb_isoc_req)4417c478bd9Sstevel@tonic-gate usba10_usb_free_isoc_req(usb_isoc_req_t *usb_isoc_req)
4427c478bd9Sstevel@tonic-gate {
4437c478bd9Sstevel@tonic-gate 	usb_free_isoc_req(usb_isoc_req);
4447c478bd9Sstevel@tonic-gate }
4457c478bd9Sstevel@tonic-gate 
4467c478bd9Sstevel@tonic-gate 
4477c478bd9Sstevel@tonic-gate usb_frame_number_t
usba10_usb_get_current_frame_number(dev_info_t * dip)4487c478bd9Sstevel@tonic-gate usba10_usb_get_current_frame_number(dev_info_t	*dip)
4497c478bd9Sstevel@tonic-gate {
4507c478bd9Sstevel@tonic-gate 	return (usb_get_current_frame_number(dip));
4517c478bd9Sstevel@tonic-gate }
4527c478bd9Sstevel@tonic-gate 
4537c478bd9Sstevel@tonic-gate 
4547c478bd9Sstevel@tonic-gate uint_t
usba10_usb_get_max_isoc_pkts(dev_info_t * dip)4557c478bd9Sstevel@tonic-gate usba10_usb_get_max_isoc_pkts(dev_info_t *dip)
4567c478bd9Sstevel@tonic-gate {
4577c478bd9Sstevel@tonic-gate 	return (usb_get_max_isoc_pkts(dip));
4587c478bd9Sstevel@tonic-gate }
4597c478bd9Sstevel@tonic-gate 
4607c478bd9Sstevel@tonic-gate 
4617c478bd9Sstevel@tonic-gate int
usba10_usb_pipe_isoc_xfer(usb_pipe_handle_t pipe_handle,usb_isoc_req_t * reqp,usb_flags_t flags)4627c478bd9Sstevel@tonic-gate usba10_usb_pipe_isoc_xfer(
4637c478bd9Sstevel@tonic-gate 	usb_pipe_handle_t	pipe_handle,
4647c478bd9Sstevel@tonic-gate 	usb_isoc_req_t		*reqp,
4657c478bd9Sstevel@tonic-gate 	usb_flags_t		flags)
4667c478bd9Sstevel@tonic-gate {
4677c478bd9Sstevel@tonic-gate 	return (usb_pipe_isoc_xfer(pipe_handle, reqp, flags));
4687c478bd9Sstevel@tonic-gate }
4697c478bd9Sstevel@tonic-gate 
4707c478bd9Sstevel@tonic-gate 
4717c478bd9Sstevel@tonic-gate void
usba10_usb_pipe_stop_isoc_polling(usb_pipe_handle_t pipe_handle,usb_flags_t flags)4727c478bd9Sstevel@tonic-gate usba10_usb_pipe_stop_isoc_polling(
4737c478bd9Sstevel@tonic-gate 	usb_pipe_handle_t	pipe_handle,
4747c478bd9Sstevel@tonic-gate 	usb_flags_t		flags)
4757c478bd9Sstevel@tonic-gate {
4767c478bd9Sstevel@tonic-gate 	usb_pipe_stop_isoc_polling(pipe_handle, flags);
4777c478bd9Sstevel@tonic-gate }
4787c478bd9Sstevel@tonic-gate 
4797c478bd9Sstevel@tonic-gate 
4807c478bd9Sstevel@tonic-gate int
usba10_usb_req_raise_power(dev_info_t * dip,int comp,int level,void (* cb)(void * arg,int rval),void * arg,usb_flags_t flags)4817c478bd9Sstevel@tonic-gate usba10_usb_req_raise_power(
4827c478bd9Sstevel@tonic-gate 	dev_info_t	*dip,
4837c478bd9Sstevel@tonic-gate 	int		comp,
4847c478bd9Sstevel@tonic-gate 	int		level,
4857c478bd9Sstevel@tonic-gate 	void		(*cb)(void *arg, int rval),
4867c478bd9Sstevel@tonic-gate 	void		*arg,
4877c478bd9Sstevel@tonic-gate 	usb_flags_t	flags)
4887c478bd9Sstevel@tonic-gate {
4897c478bd9Sstevel@tonic-gate 	return (usb_req_raise_power(dip, comp, level, cb, arg, flags));
4907c478bd9Sstevel@tonic-gate }
4917c478bd9Sstevel@tonic-gate 
4927c478bd9Sstevel@tonic-gate 
4937c478bd9Sstevel@tonic-gate int
usba10_usb_req_lower_power(dev_info_t * dip,int comp,int level,void (* cb)(void * arg,int rval),void * arg,usb_flags_t flags)4947c478bd9Sstevel@tonic-gate usba10_usb_req_lower_power(
4957c478bd9Sstevel@tonic-gate 	dev_info_t	*dip,
4967c478bd9Sstevel@tonic-gate 	int		comp,
4977c478bd9Sstevel@tonic-gate 	int		level,
4987c478bd9Sstevel@tonic-gate 	void		(*cb)(void *arg, int rval),
4997c478bd9Sstevel@tonic-gate 	void		*arg,
5007c478bd9Sstevel@tonic-gate 	usb_flags_t	flags)
5017c478bd9Sstevel@tonic-gate {
5027c478bd9Sstevel@tonic-gate 	return (usb_req_raise_power(dip, comp, level, cb, arg, flags));
5037c478bd9Sstevel@tonic-gate }
5047c478bd9Sstevel@tonic-gate 
5057c478bd9Sstevel@tonic-gate 
5067c478bd9Sstevel@tonic-gate int
usba10_usb_is_pm_enabled(dev_info_t * dip)5077c478bd9Sstevel@tonic-gate usba10_usb_is_pm_enabled(dev_info_t *dip)
5087c478bd9Sstevel@tonic-gate {
5097c478bd9Sstevel@tonic-gate 	return (usb_is_pm_enabled(dip));
5107c478bd9Sstevel@tonic-gate }
5117c478bd9Sstevel@tonic-gate 
5127c478bd9Sstevel@tonic-gate int
usba10_usb_handle_remote_wakeup(dev_info_t * dip,int cmd)5137c478bd9Sstevel@tonic-gate usba10_usb_handle_remote_wakeup(
5147c478bd9Sstevel@tonic-gate 	dev_info_t	*dip,
5157c478bd9Sstevel@tonic-gate 	int		cmd)
5167c478bd9Sstevel@tonic-gate {
5177c478bd9Sstevel@tonic-gate 	return (usb_handle_remote_wakeup(dip, cmd));
5187c478bd9Sstevel@tonic-gate }
5197c478bd9Sstevel@tonic-gate 
5207c478bd9Sstevel@tonic-gate 
5217c478bd9Sstevel@tonic-gate int
usba10_usb_create_pm_components(dev_info_t * dip,uint_t * pwrstates)5227c478bd9Sstevel@tonic-gate usba10_usb_create_pm_components(
5237c478bd9Sstevel@tonic-gate 	dev_info_t	*dip,
5247c478bd9Sstevel@tonic-gate 	uint_t		*pwrstates)
5257c478bd9Sstevel@tonic-gate {
5267c478bd9Sstevel@tonic-gate 	return (usb_create_pm_components(dip, pwrstates));
5277c478bd9Sstevel@tonic-gate }
5287c478bd9Sstevel@tonic-gate 
5297c478bd9Sstevel@tonic-gate 
5307c478bd9Sstevel@tonic-gate int
usba10_usb_set_device_pwrlvl0(dev_info_t * dip)5317c478bd9Sstevel@tonic-gate usba10_usb_set_device_pwrlvl0(dev_info_t *dip)
5327c478bd9Sstevel@tonic-gate {
5337c478bd9Sstevel@tonic-gate 	return (usb_set_device_pwrlvl0(dip));
5347c478bd9Sstevel@tonic-gate }
5357c478bd9Sstevel@tonic-gate 
5367c478bd9Sstevel@tonic-gate 
5377c478bd9Sstevel@tonic-gate int
usba10_usb_set_device_pwrlvl1(dev_info_t * dip)5387c478bd9Sstevel@tonic-gate usba10_usb_set_device_pwrlvl1(dev_info_t *dip)
5397c478bd9Sstevel@tonic-gate {
5407c478bd9Sstevel@tonic-gate 	return (usb_set_device_pwrlvl1(dip));
5417c478bd9Sstevel@tonic-gate }
5427c478bd9Sstevel@tonic-gate 
5437c478bd9Sstevel@tonic-gate 
5447c478bd9Sstevel@tonic-gate int
usba10_usb_set_device_pwrlvl2(dev_info_t * dip)5457c478bd9Sstevel@tonic-gate usba10_usb_set_device_pwrlvl2(dev_info_t *dip)
5467c478bd9Sstevel@tonic-gate {
5477c478bd9Sstevel@tonic-gate 	return (usb_set_device_pwrlvl2(dip));
5487c478bd9Sstevel@tonic-gate }
5497c478bd9Sstevel@tonic-gate 
5507c478bd9Sstevel@tonic-gate 
5517c478bd9Sstevel@tonic-gate int
usba10_usb_set_device_pwrlvl3(dev_info_t * dip)5527c478bd9Sstevel@tonic-gate usba10_usb_set_device_pwrlvl3(dev_info_t *dip)
5537c478bd9Sstevel@tonic-gate {
5547c478bd9Sstevel@tonic-gate 	return (usb_set_device_pwrlvl3(dip));
5557c478bd9Sstevel@tonic-gate }
5567c478bd9Sstevel@tonic-gate 
5577c478bd9Sstevel@tonic-gate 
5587c478bd9Sstevel@tonic-gate int
usba10_usb_async_req(dev_info_t * dip,void (* func)(void *),void * arg,usb_flags_t flag)5597c478bd9Sstevel@tonic-gate usba10_usb_async_req(
5607c478bd9Sstevel@tonic-gate 	dev_info_t	*dip,
5617c478bd9Sstevel@tonic-gate 	void		(*func)(void *),
5627c478bd9Sstevel@tonic-gate 	void		*arg,
5637c478bd9Sstevel@tonic-gate 	usb_flags_t	flag)
5647c478bd9Sstevel@tonic-gate {
5657c478bd9Sstevel@tonic-gate 	return (usb_async_req(dip, func, arg, flag));
5667c478bd9Sstevel@tonic-gate }
5677c478bd9Sstevel@tonic-gate 
5687c478bd9Sstevel@tonic-gate 
5697c478bd9Sstevel@tonic-gate int
usba10_usb_register_event_cbs(dev_info_t * dip,usb_event_t * usb_evt_data,usb_flags_t flags)5707c478bd9Sstevel@tonic-gate usba10_usb_register_event_cbs(
5717c478bd9Sstevel@tonic-gate 	dev_info_t	*dip,
5727c478bd9Sstevel@tonic-gate 	usb_event_t	*usb_evt_data,
5737c478bd9Sstevel@tonic-gate 	usb_flags_t	flags)
5747c478bd9Sstevel@tonic-gate {
5757c478bd9Sstevel@tonic-gate 	return (usb_register_event_cbs(dip, usb_evt_data, flags));
5767c478bd9Sstevel@tonic-gate }
5777c478bd9Sstevel@tonic-gate 
5787c478bd9Sstevel@tonic-gate 
5797c478bd9Sstevel@tonic-gate void
usba10_usb_unregister_event_cbs(dev_info_t * dip,usb_event_t * usb_evt_data)5807c478bd9Sstevel@tonic-gate usba10_usb_unregister_event_cbs(
5817c478bd9Sstevel@tonic-gate 	dev_info_t	*dip,
5827c478bd9Sstevel@tonic-gate 	usb_event_t	*usb_evt_data)
5837c478bd9Sstevel@tonic-gate {
5847c478bd9Sstevel@tonic-gate 	usb_unregister_event_cbs(dip, usb_evt_data);
5857c478bd9Sstevel@tonic-gate }
5867c478bd9Sstevel@tonic-gate 
5877c478bd9Sstevel@tonic-gate 
5887c478bd9Sstevel@tonic-gate void
usba10_usb_fail_checkpoint(dev_info_t * dip,usb_flags_t flags)5897c478bd9Sstevel@tonic-gate usba10_usb_fail_checkpoint(
5907c478bd9Sstevel@tonic-gate 	dev_info_t	*dip,
5917c478bd9Sstevel@tonic-gate 	usb_flags_t	flags)
5927c478bd9Sstevel@tonic-gate {
5937c478bd9Sstevel@tonic-gate 	usb_fail_checkpoint(dip, flags);
5947c478bd9Sstevel@tonic-gate }
5957c478bd9Sstevel@tonic-gate 
5967c478bd9Sstevel@tonic-gate 
5977c478bd9Sstevel@tonic-gate int
usba10_usba_vlog(usb_log_handle_t handle,uint_t level,uint_t mask,char * fmt,va_list ap)5987c478bd9Sstevel@tonic-gate usba10_usba_vlog(
5997c478bd9Sstevel@tonic-gate 	usb_log_handle_t	handle,
6007c478bd9Sstevel@tonic-gate 	uint_t			level,
6017c478bd9Sstevel@tonic-gate 	uint_t			mask,
6027c478bd9Sstevel@tonic-gate 	char			*fmt,
6037c478bd9Sstevel@tonic-gate 	va_list			ap)
6047c478bd9Sstevel@tonic-gate {
6057c478bd9Sstevel@tonic-gate 	return (usba_vlog(handle, level, mask, fmt, ap));
6067c478bd9Sstevel@tonic-gate }
6077c478bd9Sstevel@tonic-gate 
6087c478bd9Sstevel@tonic-gate 
6097c478bd9Sstevel@tonic-gate usb_log_handle_t
usba10_usb_alloc_log_handle(dev_info_t * dip,char * name,uint_t * errlevel,uint_t * mask,uint_t * instance_filter,uint_t show_label,usb_flags_t flags)6107c478bd9Sstevel@tonic-gate usba10_usb_alloc_log_handle(
6117c478bd9Sstevel@tonic-gate 	dev_info_t	*dip,
6127c478bd9Sstevel@tonic-gate 	char		*name,
6137c478bd9Sstevel@tonic-gate 	uint_t		*errlevel,
6147c478bd9Sstevel@tonic-gate 	uint_t		*mask,
6157c478bd9Sstevel@tonic-gate 	uint_t		*instance_filter,
6167c478bd9Sstevel@tonic-gate 	uint_t		show_label,
6177c478bd9Sstevel@tonic-gate 	usb_flags_t	flags)
6187c478bd9Sstevel@tonic-gate {
6197c478bd9Sstevel@tonic-gate 	return (usb_alloc_log_handle(
6207c478bd9Sstevel@tonic-gate 	    dip, name, errlevel, mask, instance_filter, show_label, flags));
6217c478bd9Sstevel@tonic-gate }
6227c478bd9Sstevel@tonic-gate 
6237c478bd9Sstevel@tonic-gate 
6247c478bd9Sstevel@tonic-gate void
usba10_usb_free_log_handle(usb_log_handle_t handle)6257c478bd9Sstevel@tonic-gate usba10_usb_free_log_handle(usb_log_handle_t handle)
6267c478bd9Sstevel@tonic-gate {
6277c478bd9Sstevel@tonic-gate 	usb_free_log_handle(handle);
6287c478bd9Sstevel@tonic-gate }
6297c478bd9Sstevel@tonic-gate 
6307c478bd9Sstevel@tonic-gate 
6317c478bd9Sstevel@tonic-gate int
usba10_usb_log_descr_tree(usb_client_dev_data_t * dev_data,usb_log_handle_t log_handle,uint_t level,uint_t mask)6327c478bd9Sstevel@tonic-gate usba10_usb_log_descr_tree(
6337c478bd9Sstevel@tonic-gate 	usb_client_dev_data_t	*dev_data,
6347c478bd9Sstevel@tonic-gate 	usb_log_handle_t	log_handle,
6357c478bd9Sstevel@tonic-gate 	uint_t			level,
6367c478bd9Sstevel@tonic-gate 	uint_t			mask)
6377c478bd9Sstevel@tonic-gate {
6387c478bd9Sstevel@tonic-gate 	return (usb_log_descr_tree(dev_data, log_handle, level, mask));
6397c478bd9Sstevel@tonic-gate }
6407c478bd9Sstevel@tonic-gate 
6417c478bd9Sstevel@tonic-gate 
6427c478bd9Sstevel@tonic-gate int
usba10_usb_print_descr_tree(dev_info_t * dip,usb_client_dev_data_t * dev_data)6437c478bd9Sstevel@tonic-gate usba10_usb_print_descr_tree(
6447c478bd9Sstevel@tonic-gate 	dev_info_t		*dip,
6457c478bd9Sstevel@tonic-gate 	usb_client_dev_data_t	*dev_data)
6467c478bd9Sstevel@tonic-gate {
6477c478bd9Sstevel@tonic-gate 	return (usb_print_descr_tree(dip, dev_data));
6487c478bd9Sstevel@tonic-gate }
6497c478bd9Sstevel@tonic-gate 
6507c478bd9Sstevel@tonic-gate 
6517c478bd9Sstevel@tonic-gate int
usba10_usb_check_same_device(dev_info_t * dip,usb_log_handle_t log_handle,int log_level,int log_mask,uint_t check_mask,char * device_string)6527c478bd9Sstevel@tonic-gate usba10_usb_check_same_device(
6537c478bd9Sstevel@tonic-gate 	dev_info_t		*dip,
6547c478bd9Sstevel@tonic-gate 	usb_log_handle_t	log_handle,
6557c478bd9Sstevel@tonic-gate 	int			log_level,
6567c478bd9Sstevel@tonic-gate 	int			log_mask,
6577c478bd9Sstevel@tonic-gate 	uint_t			check_mask,
6587c478bd9Sstevel@tonic-gate 	char			*device_string)
6597c478bd9Sstevel@tonic-gate {
6607c478bd9Sstevel@tonic-gate 	return (usb_check_same_device(
6617c478bd9Sstevel@tonic-gate 	    dip, log_handle, log_level, log_mask, check_mask, device_string));
6627c478bd9Sstevel@tonic-gate }
6637c478bd9Sstevel@tonic-gate 
6647c478bd9Sstevel@tonic-gate 
6657c478bd9Sstevel@tonic-gate const char *
usba10_usb_str_cr(usb_cr_t cr)6667c478bd9Sstevel@tonic-gate usba10_usb_str_cr(usb_cr_t cr)
6677c478bd9Sstevel@tonic-gate {
6687c478bd9Sstevel@tonic-gate 	return (usb_str_cr(cr));
6697c478bd9Sstevel@tonic-gate }
6707c478bd9Sstevel@tonic-gate 
6717c478bd9Sstevel@tonic-gate 
6727c478bd9Sstevel@tonic-gate char *
usba10_usb_str_cb_flags(usb_cb_flags_t cb_flags,char * buffer,size_t length)6737c478bd9Sstevel@tonic-gate usba10_usb_str_cb_flags(
6747c478bd9Sstevel@tonic-gate 	usb_cb_flags_t cb_flags,
6757c478bd9Sstevel@tonic-gate 	char *buffer,
6767c478bd9Sstevel@tonic-gate 	size_t length)
6777c478bd9Sstevel@tonic-gate {
6787c478bd9Sstevel@tonic-gate 	return (usb_str_cb_flags(cb_flags, buffer, length));
6797c478bd9Sstevel@tonic-gate }
6807c478bd9Sstevel@tonic-gate 
6817c478bd9Sstevel@tonic-gate 
6827c478bd9Sstevel@tonic-gate const char *
usba10_usb_str_pipe_state(usb_pipe_state_t state)6837c478bd9Sstevel@tonic-gate usba10_usb_str_pipe_state(usb_pipe_state_t state)
6847c478bd9Sstevel@tonic-gate {
6857c478bd9Sstevel@tonic-gate 	return (usb_str_pipe_state(state));
6867c478bd9Sstevel@tonic-gate }
6877c478bd9Sstevel@tonic-gate 
6887c478bd9Sstevel@tonic-gate 
6897c478bd9Sstevel@tonic-gate const char *
usba10_usb_str_dev_state(int state)6907c478bd9Sstevel@tonic-gate usba10_usb_str_dev_state(int state)
6917c478bd9Sstevel@tonic-gate {
6927c478bd9Sstevel@tonic-gate 	return (usb_str_dev_state(state));
6937c478bd9Sstevel@tonic-gate }
6947c478bd9Sstevel@tonic-gate 
6957c478bd9Sstevel@tonic-gate 
6967c478bd9Sstevel@tonic-gate const char *
usba10_usb_str_rval(int rval)6977c478bd9Sstevel@tonic-gate usba10_usb_str_rval(int rval)
6987c478bd9Sstevel@tonic-gate {
6997c478bd9Sstevel@tonic-gate 	return (usb_str_rval(rval));
7007c478bd9Sstevel@tonic-gate }
7017c478bd9Sstevel@tonic-gate 
7027c478bd9Sstevel@tonic-gate 
7037c478bd9Sstevel@tonic-gate int
usba10_usb_rval2errno(int rval)7047c478bd9Sstevel@tonic-gate usba10_usb_rval2errno(int rval)
7057c478bd9Sstevel@tonic-gate {
7067c478bd9Sstevel@tonic-gate 	return (usb_rval2errno(rval));
7077c478bd9Sstevel@tonic-gate }
7087c478bd9Sstevel@tonic-gate 
7097c478bd9Sstevel@tonic-gate 
7107c478bd9Sstevel@tonic-gate usb_serialization_t
usba10_usb_init_serialization(dev_info_t * s_dip,uint_t flag)7117c478bd9Sstevel@tonic-gate usba10_usb_init_serialization(
7127c478bd9Sstevel@tonic-gate 	dev_info_t	*s_dip,
7137c478bd9Sstevel@tonic-gate 	uint_t		flag)
7147c478bd9Sstevel@tonic-gate {
7157c478bd9Sstevel@tonic-gate 	return (usb_init_serialization(s_dip, flag));
7167c478bd9Sstevel@tonic-gate }
7177c478bd9Sstevel@tonic-gate 
7187c478bd9Sstevel@tonic-gate 
7197c478bd9Sstevel@tonic-gate void
usba10_usb_fini_serialization(usb_serialization_t usb_serp)7207c478bd9Sstevel@tonic-gate usba10_usb_fini_serialization(usb_serialization_t usb_serp)
7217c478bd9Sstevel@tonic-gate {
7227c478bd9Sstevel@tonic-gate 	usb_fini_serialization(usb_serp);
7237c478bd9Sstevel@tonic-gate }
7247c478bd9Sstevel@tonic-gate 
7257c478bd9Sstevel@tonic-gate 
7267c478bd9Sstevel@tonic-gate int
usba10_usb_serialize_access(usb_serialization_t usb_serp,uint_t how_to_wait,uint_t delta_timeout)7277c478bd9Sstevel@tonic-gate usba10_usb_serialize_access(
7287c478bd9Sstevel@tonic-gate 	usb_serialization_t	usb_serp,
7297c478bd9Sstevel@tonic-gate 	uint_t			how_to_wait,
7307c478bd9Sstevel@tonic-gate 	uint_t			delta_timeout)
7317c478bd9Sstevel@tonic-gate {
7327c478bd9Sstevel@tonic-gate 	return (usb_serialize_access(
7337c478bd9Sstevel@tonic-gate 	    usb_serp, how_to_wait, delta_timeout));
7347c478bd9Sstevel@tonic-gate }
7357c478bd9Sstevel@tonic-gate 
7367c478bd9Sstevel@tonic-gate 
7377c478bd9Sstevel@tonic-gate int
usba10_usb_try_serialize_access(usb_serialization_t usb_serp,uint_t flag)7387c478bd9Sstevel@tonic-gate usba10_usb_try_serialize_access(
7397c478bd9Sstevel@tonic-gate 	usb_serialization_t usb_serp,
7407c478bd9Sstevel@tonic-gate 	uint_t flag)
7417c478bd9Sstevel@tonic-gate {
7427c478bd9Sstevel@tonic-gate 	return (usb_try_serialize_access(usb_serp, flag));
7437c478bd9Sstevel@tonic-gate }
7447c478bd9Sstevel@tonic-gate 
7457c478bd9Sstevel@tonic-gate 
7467c478bd9Sstevel@tonic-gate void
usba10_usb_release_access(usb_serialization_t usb_serp)7477c478bd9Sstevel@tonic-gate usba10_usb_release_access(usb_serialization_t usb_serp)
7487c478bd9Sstevel@tonic-gate {
7497c478bd9Sstevel@tonic-gate 	usb_release_access(usb_serp);
7507c478bd9Sstevel@tonic-gate }
7517c478bd9Sstevel@tonic-gate 
7527c478bd9Sstevel@tonic-gate #endif
753