1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef _SYS_USB_EHCI_ISOCH_H
28 #define	_SYS_USB_EHCI_ISOCH_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #ifdef	__cplusplus
33 extern "C" {
34 #endif
35 
36 /*
37  * Enchanced Host Controller Driver (EHCI)
38  *
39  * The EHCI driver is a software driver which interfaces to the Universal
40  * Serial Bus layer (USBA) and the Host Controller (HC). The interface to
41  * the Host Controller is defined by the EHCI Host Controller Interface.
42  *
43  * This header file describes the data structures and function prototypes
44  * related EHCI driver isochronous support.
45  */
46 
47 extern int
48 ehci_isoc_init(
49 	ehci_state_t		*ehcip);
50 
51 extern void
52 ehci_isoc_cleanup(
53 	ehci_state_t		*ehcip);
54 
55 extern void
56 ehci_isoc_pipe_cleanup(
57 	ehci_state_t		*ehcip,
58 	usba_pipe_handle_data_t *ph);
59 
60 extern ehci_isoc_xwrapper_t *
61 ehci_allocate_isoc_resources(
62 	ehci_state_t		*ehcip,
63 	usba_pipe_handle_data_t *ph,
64 	usb_isoc_req_t		*isoc_reqp,
65 	usb_flags_t		usb_flags);
66 
67 extern int
68 ehci_insert_isoc_req(
69 	ehci_state_t		*ehcip,
70 	ehci_pipe_private_t	*pp,
71 	ehci_isoc_xwrapper_t	*itw,
72 	usb_flags_t		usb_flags);
73 
74 extern int
75 ehci_start_isoc_polling(
76 	ehci_state_t		*ehcip,
77 	usba_pipe_handle_data_t	*ph,
78 	usb_flags_t		flags);
79 
80 extern void
81 ehci_traverse_active_isoc_list(
82 	ehci_state_t		*ehcip);
83 
84 extern void
85 ehci_hcdi_isoc_callback(
86 	usba_pipe_handle_data_t	*ph,
87 	ehci_isoc_xwrapper_t	*itw,
88 	usb_cr_t		completion_reason);
89 
90 #define	EHCI_SITD_MAX_XFER_SIZE		1023
91 #define	EHCI_MAX_ISOC_PKTS_PER_XFER	256
92 
93 #ifdef __cplusplus
94 }
95 #endif
96 
97 #endif /* _SYS_USB_EHCI_ISOCH_H */
98