xref: /onnv-gate/usr/src/uts/common/sys/usb/usba/usba10.h (revision 7492:2387323b838f)
10Sstevel@tonic-gate /*
20Sstevel@tonic-gate  * CDDL HEADER START
30Sstevel@tonic-gate  *
40Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*7492SZhigang.Lu@Sun.COM  * Common Development and Distribution License (the "License").
6*7492SZhigang.Lu@Sun.COM  * You may not use this file except in compliance with the License.
70Sstevel@tonic-gate  *
80Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate  * See the License for the specific language governing permissions
110Sstevel@tonic-gate  * and limitations under the License.
120Sstevel@tonic-gate  *
130Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate  *
190Sstevel@tonic-gate  * CDDL HEADER END
200Sstevel@tonic-gate  */
210Sstevel@tonic-gate /*
22*7492SZhigang.Lu@Sun.COM  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
230Sstevel@tonic-gate  * Use is subject to license terms.
240Sstevel@tonic-gate  */
250Sstevel@tonic-gate 
260Sstevel@tonic-gate #ifndef	_SYS_USB_USBA10_H
270Sstevel@tonic-gate #define	_SYS_USB_USBA10_H
280Sstevel@tonic-gate 
290Sstevel@tonic-gate 
300Sstevel@tonic-gate #ifdef	__cplusplus
310Sstevel@tonic-gate extern "C" {
320Sstevel@tonic-gate #endif
330Sstevel@tonic-gate 
340Sstevel@tonic-gate /*
350Sstevel@tonic-gate  * **************************************************************************
360Sstevel@tonic-gate  * The following was static in usbai.c, until the usba10 module needed it.
370Sstevel@tonic-gate  * **************************************************************************
380Sstevel@tonic-gate  */
390Sstevel@tonic-gate 
400Sstevel@tonic-gate int usba_vlog(usb_log_handle_t, uint_t, uint_t, char *, va_list);
410Sstevel@tonic-gate 
420Sstevel@tonic-gate /*
430Sstevel@tonic-gate  * **************************************************************************
440Sstevel@tonic-gate  * Defs needed only for usba10_calls module.
450Sstevel@tonic-gate  * **************************************************************************
460Sstevel@tonic-gate  */
470Sstevel@tonic-gate 
480Sstevel@tonic-gate usb_ep_data_t *
490Sstevel@tonic-gate usb_get_ep_data(
500Sstevel@tonic-gate 	dev_info_t		*dip,
510Sstevel@tonic-gate 	usb_client_dev_data_t	*dev_datap,
520Sstevel@tonic-gate 	uint_t			interface,
530Sstevel@tonic-gate 	uint_t			alternate,
540Sstevel@tonic-gate 	uint_t			type,
550Sstevel@tonic-gate 	uint_t			direction);
560Sstevel@tonic-gate 
570Sstevel@tonic-gate int
580Sstevel@tonic-gate usb_ep_num(usb_pipe_handle_t ph);
590Sstevel@tonic-gate 
600Sstevel@tonic-gate int
610Sstevel@tonic-gate usb_clear_feature(
620Sstevel@tonic-gate 	dev_info_t		*dip,
630Sstevel@tonic-gate 	usb_pipe_handle_t	ph,
640Sstevel@tonic-gate 	uint_t			type,	/* bmRequestType */
650Sstevel@tonic-gate 	uint_t			feature,
660Sstevel@tonic-gate 	uint_t			what,	/* 0, interface, endpoint number */
670Sstevel@tonic-gate 	usb_flags_t		flags);
680Sstevel@tonic-gate 
690Sstevel@tonic-gate int
700Sstevel@tonic-gate usb_pipe_bulk_transfer_size(
710Sstevel@tonic-gate 	dev_info_t		*dip,
720Sstevel@tonic-gate 	size_t			*size);
730Sstevel@tonic-gate 
740Sstevel@tonic-gate uint_t
750Sstevel@tonic-gate usb_get_max_isoc_pkts(dev_info_t *dip);
760Sstevel@tonic-gate 
770Sstevel@tonic-gate int
780Sstevel@tonic-gate usb_is_pm_enabled(dev_info_t *dip);
790Sstevel@tonic-gate 
800Sstevel@tonic-gate int
810Sstevel@tonic-gate usb_log_descr_tree(
820Sstevel@tonic-gate 	usb_client_dev_data_t	*dev_data,
830Sstevel@tonic-gate 	usb_log_handle_t	log_handle,
840Sstevel@tonic-gate 	uint_t			level,
850Sstevel@tonic-gate 	uint_t			mask);
860Sstevel@tonic-gate 
870Sstevel@tonic-gate int usb_register_client(
880Sstevel@tonic-gate 	dev_info_t			*dip,
890Sstevel@tonic-gate 	uint_t				version,
900Sstevel@tonic-gate 	usb_client_dev_data_t		**dev_data,
910Sstevel@tonic-gate 	usb_reg_parse_lvl_t		parse_level,
920Sstevel@tonic-gate 	usb_flags_t			flags);
930Sstevel@tonic-gate 
940Sstevel@tonic-gate void usb_unregister_client(
950Sstevel@tonic-gate 	dev_info_t			*dip,
960Sstevel@tonic-gate 	usb_client_dev_data_t		*dev_data);
970Sstevel@tonic-gate 
980Sstevel@tonic-gate /* allocate a log handle */
990Sstevel@tonic-gate usb_log_handle_t usb_alloc_log_handle(
1000Sstevel@tonic-gate 	dev_info_t	*dip,
1010Sstevel@tonic-gate 	char		*name,
1020Sstevel@tonic-gate 	uint_t		*errlevel,
1030Sstevel@tonic-gate 	uint_t		*mask,
1040Sstevel@tonic-gate 	uint_t		*instance_filter,
1050Sstevel@tonic-gate 	uint_t		reserved,
1060Sstevel@tonic-gate 	usb_flags_t	flags);
1070Sstevel@tonic-gate 
1080Sstevel@tonic-gate 
1090Sstevel@tonic-gate /* free the log handle */
1100Sstevel@tonic-gate void usb_free_log_handle(
1110Sstevel@tonic-gate 	usb_log_handle_t handle);
1120Sstevel@tonic-gate 
1130Sstevel@tonic-gate /*
1140Sstevel@tonic-gate  * **************************************************************************
1150Sstevel@tonic-gate  * Remaining functions are declarations for wrapper functions exported to
1160Sstevel@tonic-gate  * legacy drivers.
1170Sstevel@tonic-gate  * **************************************************************************
1180Sstevel@tonic-gate  */
1190Sstevel@tonic-gate 
1200Sstevel@tonic-gate 
1210Sstevel@tonic-gate int
1220Sstevel@tonic-gate usba10_usb_register_client(
1230Sstevel@tonic-gate 	dev_info_t			*dip,
1240Sstevel@tonic-gate 	uint_t				version,
1250Sstevel@tonic-gate 	usb_client_dev_data_t		**dev_data,
1260Sstevel@tonic-gate 	usb_reg_parse_lvl_t		parse_level,
1270Sstevel@tonic-gate 	usb_flags_t			flags);
1280Sstevel@tonic-gate 
1290Sstevel@tonic-gate void
1300Sstevel@tonic-gate usba10_usb_unregister_client(
1310Sstevel@tonic-gate 	dev_info_t			*dip,
1320Sstevel@tonic-gate 	usb_client_dev_data_t		*dev_data);
1330Sstevel@tonic-gate 
1340Sstevel@tonic-gate void
1350Sstevel@tonic-gate usba10_usb_free_descr_tree(
1360Sstevel@tonic-gate 	dev_info_t			*dip,
1370Sstevel@tonic-gate 	usb_client_dev_data_t		*dev_data);
1380Sstevel@tonic-gate 
1390Sstevel@tonic-gate size_t
1400Sstevel@tonic-gate usba10_usb_parse_data(
1410Sstevel@tonic-gate 	char			*format,
1420Sstevel@tonic-gate 	uchar_t 		*data,
1430Sstevel@tonic-gate 	size_t			datalen,
1440Sstevel@tonic-gate 	void			*structure,
1450Sstevel@tonic-gate 	size_t			structlen);
1460Sstevel@tonic-gate 
1470Sstevel@tonic-gate usb_ep_data_t *
1480Sstevel@tonic-gate usba10_usb_get_ep_data(
1490Sstevel@tonic-gate 	dev_info_t		*dip,
1500Sstevel@tonic-gate 	usb_client_dev_data_t	*dev_datap,
1510Sstevel@tonic-gate 	uint_t			interface,
1520Sstevel@tonic-gate 	uint_t			alternate,
1530Sstevel@tonic-gate 	uint_t			type,
1540Sstevel@tonic-gate 	uint_t			direction);
1550Sstevel@tonic-gate 
1560Sstevel@tonic-gate int
1570Sstevel@tonic-gate usba10_usb_get_string_descr(
1580Sstevel@tonic-gate 	dev_info_t		*dip,
1590Sstevel@tonic-gate 	uint16_t		langid,
1600Sstevel@tonic-gate 	uint8_t			index,
1610Sstevel@tonic-gate 	char			*buf,
1620Sstevel@tonic-gate 	size_t			buflen);
1630Sstevel@tonic-gate 
1640Sstevel@tonic-gate int
1650Sstevel@tonic-gate usba10_usb_get_addr(dev_info_t *dip);
1660Sstevel@tonic-gate 
1670Sstevel@tonic-gate int
1680Sstevel@tonic-gate usba10_usb_get_if_number(dev_info_t *dip);
1690Sstevel@tonic-gate 
1700Sstevel@tonic-gate boolean_t
1710Sstevel@tonic-gate usba10_usb_owns_device(dev_info_t *dip);
1720Sstevel@tonic-gate 
1730Sstevel@tonic-gate int
1740Sstevel@tonic-gate usba10_usb_pipe_get_state(
1750Sstevel@tonic-gate 	usb_pipe_handle_t	pipe_handle,
1760Sstevel@tonic-gate 	usb_pipe_state_t	*pipe_state,
1770Sstevel@tonic-gate 	usb_flags_t		flags);
1780Sstevel@tonic-gate 
1790Sstevel@tonic-gate int
1800Sstevel@tonic-gate usba10_usb_ep_num(usb_pipe_handle_t ph);
1810Sstevel@tonic-gate 
1820Sstevel@tonic-gate int
1830Sstevel@tonic-gate usba10_usb_pipe_open(
1840Sstevel@tonic-gate 	dev_info_t		*dip,
1850Sstevel@tonic-gate 	usb_ep_descr_t		*ep,
1860Sstevel@tonic-gate 	usb_pipe_policy_t	*pipe_policy,
1870Sstevel@tonic-gate 	usb_flags_t		flags,
1880Sstevel@tonic-gate 	usb_pipe_handle_t	*pipe_handle);
1890Sstevel@tonic-gate 
1900Sstevel@tonic-gate void
1910Sstevel@tonic-gate usba10_usb_pipe_close(
1920Sstevel@tonic-gate 	dev_info_t		*dip,
1930Sstevel@tonic-gate 	usb_pipe_handle_t	pipe_handle,
1940Sstevel@tonic-gate 	usb_flags_t		flags,
1950Sstevel@tonic-gate 	void			(*cb)(
1960Sstevel@tonic-gate 				    usb_pipe_handle_t	ph,
1970Sstevel@tonic-gate 				    usb_opaque_t	arg,	/* cb arg */
1980Sstevel@tonic-gate 				    int			rval,
1990Sstevel@tonic-gate 				    usb_cb_flags_t	flags),
2000Sstevel@tonic-gate 	usb_opaque_t		cb_arg);
2010Sstevel@tonic-gate 
2020Sstevel@tonic-gate int
2030Sstevel@tonic-gate usba10_usb_pipe_drain_reqs(
2040Sstevel@tonic-gate 	dev_info_t		*dip,
2050Sstevel@tonic-gate 	usb_pipe_handle_t	pipe_handle,
2060Sstevel@tonic-gate 	uint_t			time,
2070Sstevel@tonic-gate 	usb_flags_t		flags,
2080Sstevel@tonic-gate 	void			(*cb)(
2090Sstevel@tonic-gate 				    usb_pipe_handle_t	ph,
2100Sstevel@tonic-gate 				    usb_opaque_t	arg,	/* cb arg */
2110Sstevel@tonic-gate 				    int			rval,
2120Sstevel@tonic-gate 				    usb_cb_flags_t	flags),
2130Sstevel@tonic-gate 	usb_opaque_t		cb_arg);
2140Sstevel@tonic-gate 
2150Sstevel@tonic-gate int
2160Sstevel@tonic-gate usba10_usb_pipe_set_private(
2170Sstevel@tonic-gate 	usb_pipe_handle_t	pipe_handle,
2180Sstevel@tonic-gate 	usb_opaque_t		data);
2190Sstevel@tonic-gate 
2200Sstevel@tonic-gate usb_opaque_t
2210Sstevel@tonic-gate usba10_usb_pipe_get_private(usb_pipe_handle_t pipe_handle);
2220Sstevel@tonic-gate 
2230Sstevel@tonic-gate void
2240Sstevel@tonic-gate usba10_usb_pipe_reset(
2250Sstevel@tonic-gate 	dev_info_t		*dip,
2260Sstevel@tonic-gate 	usb_pipe_handle_t	pipe_handle,
2270Sstevel@tonic-gate 	usb_flags_t		usb_flags,
2280Sstevel@tonic-gate 	void			(*cb)(
2290Sstevel@tonic-gate 					usb_pipe_handle_t ph,
2300Sstevel@tonic-gate 					usb_opaque_t	arg,
2310Sstevel@tonic-gate 					int		rval,
2320Sstevel@tonic-gate 					usb_cb_flags_t	flags),
2330Sstevel@tonic-gate 	usb_opaque_t		cb_arg);
2340Sstevel@tonic-gate 
2350Sstevel@tonic-gate usb_ctrl_req_t *
2360Sstevel@tonic-gate usba10_usb_alloc_ctrl_req(
2370Sstevel@tonic-gate 	dev_info_t		*dip,
2380Sstevel@tonic-gate 	size_t			len,
2390Sstevel@tonic-gate 	usb_flags_t		flags);
2400Sstevel@tonic-gate 
2410Sstevel@tonic-gate void
2420Sstevel@tonic-gate usba10_usb_free_ctrl_req(usb_ctrl_req_t *reqp);
2430Sstevel@tonic-gate 
2440Sstevel@tonic-gate int
2450Sstevel@tonic-gate usba10_usb_pipe_ctrl_xfer(
2460Sstevel@tonic-gate 	usb_pipe_handle_t	pipe_handle,
2470Sstevel@tonic-gate 	usb_ctrl_req_t		*reqp,
2480Sstevel@tonic-gate 	usb_flags_t		flags);
2490Sstevel@tonic-gate 
2500Sstevel@tonic-gate int
2510Sstevel@tonic-gate usba10_usb_get_status(
2520Sstevel@tonic-gate 	dev_info_t		*dip,
2530Sstevel@tonic-gate 	usb_pipe_handle_t	ph,
2540Sstevel@tonic-gate 	uint_t			type,	/* bmRequestType */
2550Sstevel@tonic-gate 	uint_t			what,	/* 0, interface, endpoint number */
2560Sstevel@tonic-gate 	uint16_t		*status,
2570Sstevel@tonic-gate 	usb_flags_t		flags);
2580Sstevel@tonic-gate 
2590Sstevel@tonic-gate int
2600Sstevel@tonic-gate usba10_usb_clear_feature(
2610Sstevel@tonic-gate 	dev_info_t		*dip,
2620Sstevel@tonic-gate 	usb_pipe_handle_t	ph,
2630Sstevel@tonic-gate 	uint_t			type,	/* bmRequestType */
2640Sstevel@tonic-gate 	uint_t			feature,
2650Sstevel@tonic-gate 	uint_t			what,	/* 0, interface, endpoint number */
2660Sstevel@tonic-gate 	usb_flags_t		flags);
2670Sstevel@tonic-gate 
2680Sstevel@tonic-gate int
2690Sstevel@tonic-gate usba10_usb_pipe_ctrl_xfer_wait(
2700Sstevel@tonic-gate 	usb_pipe_handle_t	pipe_handle,
2710Sstevel@tonic-gate 	usb_ctrl_setup_t	*setup,
2720Sstevel@tonic-gate 	mblk_t			**data,
2730Sstevel@tonic-gate 	usb_cr_t		*completion_reason,
2740Sstevel@tonic-gate 	usb_cb_flags_t		*cb_flags,
2750Sstevel@tonic-gate 	usb_flags_t		flags);
2760Sstevel@tonic-gate 
2770Sstevel@tonic-gate int
2780Sstevel@tonic-gate usba10_usb_set_cfg(
2790Sstevel@tonic-gate 	dev_info_t		*dip,
2800Sstevel@tonic-gate 	uint_t			cfg_index,
2810Sstevel@tonic-gate 	usb_flags_t		usb_flags,
2820Sstevel@tonic-gate 	void			(*cb)(
2830Sstevel@tonic-gate 					usb_pipe_handle_t ph,
2840Sstevel@tonic-gate 					usb_opaque_t	arg,
2850Sstevel@tonic-gate 					int		rval,
2860Sstevel@tonic-gate 					usb_cb_flags_t	flags),
2870Sstevel@tonic-gate 	usb_opaque_t		cb_arg);
2880Sstevel@tonic-gate 
2890Sstevel@tonic-gate int
2900Sstevel@tonic-gate usba10_usb_get_cfg(
2910Sstevel@tonic-gate 	dev_info_t		*dip,
2920Sstevel@tonic-gate 	uint_t			*cfgval,
2930Sstevel@tonic-gate 	usb_flags_t		usb_flags);
2940Sstevel@tonic-gate 
2950Sstevel@tonic-gate int
2960Sstevel@tonic-gate usba10_usb_set_alt_if(
2970Sstevel@tonic-gate 	dev_info_t		*dip,
2980Sstevel@tonic-gate 	uint_t			interface,
2990Sstevel@tonic-gate 	uint_t			alt_number,
3000Sstevel@tonic-gate 	usb_flags_t		usb_flags,
3010Sstevel@tonic-gate 	void			(*cb)(
3020Sstevel@tonic-gate 					usb_pipe_handle_t ph,
3030Sstevel@tonic-gate 					usb_opaque_t	arg,
3040Sstevel@tonic-gate 					int		rval,
3050Sstevel@tonic-gate 					usb_cb_flags_t	flags),
3060Sstevel@tonic-gate 	usb_opaque_t		cb_arg);
3070Sstevel@tonic-gate 
3080Sstevel@tonic-gate int
3090Sstevel@tonic-gate usba10_usb_get_alt_if(
3100Sstevel@tonic-gate 	dev_info_t		*dip,
3110Sstevel@tonic-gate 	uint_t			if_number,
3120Sstevel@tonic-gate 	uint_t			*alt_number,
3130Sstevel@tonic-gate 	usb_flags_t		flags);
3140Sstevel@tonic-gate 
3150Sstevel@tonic-gate usb_bulk_req_t *
3160Sstevel@tonic-gate usba10_usb_alloc_bulk_req(
3170Sstevel@tonic-gate 	dev_info_t		*dip,
3180Sstevel@tonic-gate 	size_t			len,
3190Sstevel@tonic-gate 	usb_flags_t		flags);
3200Sstevel@tonic-gate 
3210Sstevel@tonic-gate void
3220Sstevel@tonic-gate usba10_usb_free_bulk_req(usb_bulk_req_t *reqp);
3230Sstevel@tonic-gate 
3240Sstevel@tonic-gate int
3250Sstevel@tonic-gate usba10_usb_pipe_bulk_xfer(
3260Sstevel@tonic-gate 	usb_pipe_handle_t	pipe_handle,
3270Sstevel@tonic-gate 	usb_bulk_req_t		*reqp,
3280Sstevel@tonic-gate 	usb_flags_t		flags);
3290Sstevel@tonic-gate 
3300Sstevel@tonic-gate int
3310Sstevel@tonic-gate usba10_usb_pipe_bulk_transfer_size(
3320Sstevel@tonic-gate 	dev_info_t		*dip,
3330Sstevel@tonic-gate 	size_t			*size);
3340Sstevel@tonic-gate 
3350Sstevel@tonic-gate usb_intr_req_t *
3360Sstevel@tonic-gate usba10_usb_alloc_intr_req(
3370Sstevel@tonic-gate 	dev_info_t		*dip,
3380Sstevel@tonic-gate 	size_t			len,
3390Sstevel@tonic-gate 	usb_flags_t		flags);
3400Sstevel@tonic-gate 
3410Sstevel@tonic-gate void
3420Sstevel@tonic-gate usba10_usb_free_intr_req(usb_intr_req_t *reqp);
3430Sstevel@tonic-gate 
3440Sstevel@tonic-gate int
3450Sstevel@tonic-gate usba10_usb_pipe_intr_xfer(
3460Sstevel@tonic-gate 	usb_pipe_handle_t	pipe_handle,
3470Sstevel@tonic-gate 	usb_intr_req_t		*req,
3480Sstevel@tonic-gate 	usb_flags_t		flags);
3490Sstevel@tonic-gate 
3500Sstevel@tonic-gate void
3510Sstevel@tonic-gate usba10_usb_pipe_stop_intr_polling(
3520Sstevel@tonic-gate 	usb_pipe_handle_t	pipe_handle,
3530Sstevel@tonic-gate 	usb_flags_t		flags);
3540Sstevel@tonic-gate 
3550Sstevel@tonic-gate usb_isoc_req_t *
3560Sstevel@tonic-gate usba10_usb_alloc_isoc_req(
3570Sstevel@tonic-gate 	dev_info_t		*dip,
3580Sstevel@tonic-gate 	uint_t			isoc_pkts_count,
3590Sstevel@tonic-gate 	size_t			len,
3600Sstevel@tonic-gate 	usb_flags_t		flags);
3610Sstevel@tonic-gate 
3620Sstevel@tonic-gate void
3630Sstevel@tonic-gate usba10_usb_free_isoc_req(usb_isoc_req_t *usb_isoc_req);
3640Sstevel@tonic-gate 
3650Sstevel@tonic-gate usb_frame_number_t
3660Sstevel@tonic-gate usba10_usb_get_current_frame_number(dev_info_t	*dip);
3670Sstevel@tonic-gate 
3680Sstevel@tonic-gate uint_t
3690Sstevel@tonic-gate usba10_usb_get_max_isoc_pkts(dev_info_t *dip);
3700Sstevel@tonic-gate 
3710Sstevel@tonic-gate int
3720Sstevel@tonic-gate usba10_usb_pipe_isoc_xfer(
3730Sstevel@tonic-gate 	usb_pipe_handle_t	pipe_handle,
3740Sstevel@tonic-gate 	usb_isoc_req_t		*reqp,
3750Sstevel@tonic-gate 	usb_flags_t		flags);
3760Sstevel@tonic-gate 
3770Sstevel@tonic-gate void
3780Sstevel@tonic-gate usba10_usb_pipe_stop_isoc_polling(
3790Sstevel@tonic-gate 	usb_pipe_handle_t	pipe_handle,
3800Sstevel@tonic-gate 	usb_flags_t		flags);
3810Sstevel@tonic-gate 
3820Sstevel@tonic-gate int
3830Sstevel@tonic-gate usba10_usb_req_raise_power(
3840Sstevel@tonic-gate 	dev_info_t	*dip,
3850Sstevel@tonic-gate 	int		comp,
3860Sstevel@tonic-gate 	int		level,
3870Sstevel@tonic-gate 	void		(*cb)(void *arg, int rval),
3880Sstevel@tonic-gate 	void		*arg,
3890Sstevel@tonic-gate 	usb_flags_t	flags);
3900Sstevel@tonic-gate 
3910Sstevel@tonic-gate int
3920Sstevel@tonic-gate usba10_usb_req_lower_power(
3930Sstevel@tonic-gate 	dev_info_t	*dip,
3940Sstevel@tonic-gate 	int		comp,
3950Sstevel@tonic-gate 	int		level,
3960Sstevel@tonic-gate 	void		(*cb)(void *arg, int rval),
3970Sstevel@tonic-gate 	void		*arg,
3980Sstevel@tonic-gate 	usb_flags_t	flags);
3990Sstevel@tonic-gate 
4000Sstevel@tonic-gate int
4010Sstevel@tonic-gate usba10_usb_is_pm_enabled(dev_info_t *dip);
4020Sstevel@tonic-gate 
4030Sstevel@tonic-gate int
4040Sstevel@tonic-gate usba10_usb_handle_remote_wakeup(
4050Sstevel@tonic-gate 	dev_info_t	*dip,
4060Sstevel@tonic-gate 	int		cmd);
4070Sstevel@tonic-gate 
4080Sstevel@tonic-gate int
4090Sstevel@tonic-gate usba10_usb_create_pm_components(
4100Sstevel@tonic-gate 	dev_info_t	*dip,
4110Sstevel@tonic-gate 	uint_t		*pwrstates);
4120Sstevel@tonic-gate 
4130Sstevel@tonic-gate int
4140Sstevel@tonic-gate usba10_usb_set_device_pwrlvl0(dev_info_t *dip);
4150Sstevel@tonic-gate 
4160Sstevel@tonic-gate int
4170Sstevel@tonic-gate usba10_usb_set_device_pwrlvl1(dev_info_t *dip);
4180Sstevel@tonic-gate 
4190Sstevel@tonic-gate int
4200Sstevel@tonic-gate usba10_usb_set_device_pwrlvl2(dev_info_t *dip);
4210Sstevel@tonic-gate 
4220Sstevel@tonic-gate int
4230Sstevel@tonic-gate usba10_usb_set_device_pwrlvl3(dev_info_t *dip);
4240Sstevel@tonic-gate 
4250Sstevel@tonic-gate int
4260Sstevel@tonic-gate usba10_usb_async_req(
4270Sstevel@tonic-gate 	dev_info_t	*dip,
4280Sstevel@tonic-gate 	void		(*func)(void *),
4290Sstevel@tonic-gate 	void		*arg,
4300Sstevel@tonic-gate 	usb_flags_t	flag);
4310Sstevel@tonic-gate 
4320Sstevel@tonic-gate int
4330Sstevel@tonic-gate usba10_usb_register_event_cbs(
4340Sstevel@tonic-gate 	dev_info_t	*dip,
4350Sstevel@tonic-gate 	usb_event_t	*usb_evt_data,
4360Sstevel@tonic-gate 	usb_flags_t	flags);
4370Sstevel@tonic-gate 
4380Sstevel@tonic-gate void
4390Sstevel@tonic-gate usba10_usb_unregister_event_cbs(
4400Sstevel@tonic-gate 	dev_info_t	*dip,
4410Sstevel@tonic-gate 	usb_event_t	*usb_evt_data);
4420Sstevel@tonic-gate 
4430Sstevel@tonic-gate void
4440Sstevel@tonic-gate usba10_usb_fail_checkpoint(
4450Sstevel@tonic-gate 	dev_info_t	*dip,
4460Sstevel@tonic-gate 	usb_flags_t	flags);
4470Sstevel@tonic-gate 
4480Sstevel@tonic-gate usb_log_handle_t
4490Sstevel@tonic-gate usba10_usb_alloc_log_handle(
4500Sstevel@tonic-gate 	dev_info_t	*dip,
4510Sstevel@tonic-gate 	char		*name,
4520Sstevel@tonic-gate 	uint_t		*errlevel,
4530Sstevel@tonic-gate 	uint_t		*mask,
4540Sstevel@tonic-gate 	uint_t		*instance_filter,
4550Sstevel@tonic-gate 	uint_t		show_label,
4560Sstevel@tonic-gate 	usb_flags_t	flags);
4570Sstevel@tonic-gate 
4580Sstevel@tonic-gate int
4590Sstevel@tonic-gate usba10_usba_vlog(
4600Sstevel@tonic-gate 	usb_log_handle_t handle,
4610Sstevel@tonic-gate 	uint_t		level,
4620Sstevel@tonic-gate 	uint_t		mask,
4630Sstevel@tonic-gate 	char		*fmt,
4640Sstevel@tonic-gate 	va_list		ap);
4650Sstevel@tonic-gate 
4660Sstevel@tonic-gate void
4670Sstevel@tonic-gate usba10_usb_free_log_handle(usb_log_handle_t handle);
4680Sstevel@tonic-gate 
4690Sstevel@tonic-gate int
4700Sstevel@tonic-gate usba10_usb_log_descr_tree(
4710Sstevel@tonic-gate 	usb_client_dev_data_t	*dev_data,
4720Sstevel@tonic-gate 	usb_log_handle_t	log_handle,
4730Sstevel@tonic-gate 	uint_t			level,
4740Sstevel@tonic-gate 	uint_t			mask);
4750Sstevel@tonic-gate 
4760Sstevel@tonic-gate int
4770Sstevel@tonic-gate usba10_usb_print_descr_tree(
4780Sstevel@tonic-gate 	dev_info_t		*dip,
4790Sstevel@tonic-gate 	usb_client_dev_data_t	*dev_data);
4800Sstevel@tonic-gate 
4810Sstevel@tonic-gate int
4820Sstevel@tonic-gate usba10_usb_check_same_device(
4830Sstevel@tonic-gate 	dev_info_t		*dip,
4840Sstevel@tonic-gate 	usb_log_handle_t	log_handle,
4850Sstevel@tonic-gate 	int			log_level,
4860Sstevel@tonic-gate 	int			log_mask,
4870Sstevel@tonic-gate 	uint_t			check_mask,
4880Sstevel@tonic-gate 	char			*device_string);
4890Sstevel@tonic-gate 
4900Sstevel@tonic-gate const char *
4910Sstevel@tonic-gate usba10_usb_str_cr(usb_cr_t cr);
4920Sstevel@tonic-gate 
4930Sstevel@tonic-gate char *
4940Sstevel@tonic-gate usba10_usb_str_cb_flags(
4950Sstevel@tonic-gate 	usb_cb_flags_t cb_flags,
4960Sstevel@tonic-gate 	char *buffer,
4970Sstevel@tonic-gate 	size_t length);
4980Sstevel@tonic-gate 
4990Sstevel@tonic-gate const char *
5000Sstevel@tonic-gate usba10_usb_str_pipe_state(usb_pipe_state_t state);
5010Sstevel@tonic-gate 
5020Sstevel@tonic-gate const char *
5030Sstevel@tonic-gate usba10_usb_str_dev_state(int state);
5040Sstevel@tonic-gate 
5050Sstevel@tonic-gate const char *
5060Sstevel@tonic-gate usba10_usb_str_rval(int rval);
5070Sstevel@tonic-gate 
5080Sstevel@tonic-gate int
5090Sstevel@tonic-gate usba10_usb_rval2errno(int rval);
5100Sstevel@tonic-gate 
5110Sstevel@tonic-gate usb_serialization_t
5120Sstevel@tonic-gate usba10_usb_init_serialization(
5130Sstevel@tonic-gate 	dev_info_t	*s_dip,
5140Sstevel@tonic-gate 	uint_t		flag);
5150Sstevel@tonic-gate 
5160Sstevel@tonic-gate void
5170Sstevel@tonic-gate usba10_usb_fini_serialization(usb_serialization_t usb_serp);
5180Sstevel@tonic-gate 
5190Sstevel@tonic-gate int
5200Sstevel@tonic-gate usba10_usb_serialize_access(
5210Sstevel@tonic-gate 	usb_serialization_t	usb_serp,
5220Sstevel@tonic-gate 	uint_t			how_to_wait,
5230Sstevel@tonic-gate 	uint_t			delta_timeout);
5240Sstevel@tonic-gate 
5250Sstevel@tonic-gate int
5260Sstevel@tonic-gate usba10_usb_try_serialize_access(
5270Sstevel@tonic-gate 	usb_serialization_t usb_serp,
5280Sstevel@tonic-gate 	uint_t flag);
5290Sstevel@tonic-gate 
5300Sstevel@tonic-gate void
5310Sstevel@tonic-gate usba10_usb_release_access(usb_serialization_t usb_serp);
5320Sstevel@tonic-gate 
5330Sstevel@tonic-gate #ifdef __cplusplus
5340Sstevel@tonic-gate }
5350Sstevel@tonic-gate #endif
5360Sstevel@tonic-gate 
5370Sstevel@tonic-gate #endif /* _SYS_USB_USBA10_H */
538