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 5*d29f5a71Szhigang lu - Sun Microsystems - Beijing China * Common Development and Distribution License (the "License"). 6*d29f5a71Szhigang lu - 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 /* 22*d29f5a71Szhigang lu - Sun Microsystems - Beijing China * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate * Use is subject to license terms. 247c478bd9Sstevel@tonic-gate */ 257c478bd9Sstevel@tonic-gate 267c478bd9Sstevel@tonic-gate #ifndef _SYS_USB_USBA10_H 277c478bd9Sstevel@tonic-gate #define _SYS_USB_USBA10_H 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gate 307c478bd9Sstevel@tonic-gate #ifdef __cplusplus 317c478bd9Sstevel@tonic-gate extern "C" { 327c478bd9Sstevel@tonic-gate #endif 337c478bd9Sstevel@tonic-gate 347c478bd9Sstevel@tonic-gate /* 357c478bd9Sstevel@tonic-gate * ************************************************************************** 367c478bd9Sstevel@tonic-gate * The following was static in usbai.c, until the usba10 module needed it. 377c478bd9Sstevel@tonic-gate * ************************************************************************** 387c478bd9Sstevel@tonic-gate */ 397c478bd9Sstevel@tonic-gate 407c478bd9Sstevel@tonic-gate int usba_vlog(usb_log_handle_t, uint_t, uint_t, char *, va_list); 417c478bd9Sstevel@tonic-gate 427c478bd9Sstevel@tonic-gate /* 437c478bd9Sstevel@tonic-gate * ************************************************************************** 447c478bd9Sstevel@tonic-gate * Defs needed only for usba10_calls module. 457c478bd9Sstevel@tonic-gate * ************************************************************************** 467c478bd9Sstevel@tonic-gate */ 477c478bd9Sstevel@tonic-gate 487c478bd9Sstevel@tonic-gate usb_ep_data_t * 497c478bd9Sstevel@tonic-gate usb_get_ep_data( 507c478bd9Sstevel@tonic-gate dev_info_t *dip, 517c478bd9Sstevel@tonic-gate usb_client_dev_data_t *dev_datap, 527c478bd9Sstevel@tonic-gate uint_t interface, 537c478bd9Sstevel@tonic-gate uint_t alternate, 547c478bd9Sstevel@tonic-gate uint_t type, 557c478bd9Sstevel@tonic-gate uint_t direction); 567c478bd9Sstevel@tonic-gate 577c478bd9Sstevel@tonic-gate int 587c478bd9Sstevel@tonic-gate usb_ep_num(usb_pipe_handle_t ph); 597c478bd9Sstevel@tonic-gate 607c478bd9Sstevel@tonic-gate int 617c478bd9Sstevel@tonic-gate usb_clear_feature( 627c478bd9Sstevel@tonic-gate dev_info_t *dip, 637c478bd9Sstevel@tonic-gate usb_pipe_handle_t ph, 647c478bd9Sstevel@tonic-gate uint_t type, /* bmRequestType */ 657c478bd9Sstevel@tonic-gate uint_t feature, 667c478bd9Sstevel@tonic-gate uint_t what, /* 0, interface, endpoint number */ 677c478bd9Sstevel@tonic-gate usb_flags_t flags); 687c478bd9Sstevel@tonic-gate 697c478bd9Sstevel@tonic-gate int 707c478bd9Sstevel@tonic-gate usb_pipe_bulk_transfer_size( 717c478bd9Sstevel@tonic-gate dev_info_t *dip, 727c478bd9Sstevel@tonic-gate size_t *size); 737c478bd9Sstevel@tonic-gate 747c478bd9Sstevel@tonic-gate uint_t 757c478bd9Sstevel@tonic-gate usb_get_max_isoc_pkts(dev_info_t *dip); 767c478bd9Sstevel@tonic-gate 777c478bd9Sstevel@tonic-gate int 787c478bd9Sstevel@tonic-gate usb_is_pm_enabled(dev_info_t *dip); 797c478bd9Sstevel@tonic-gate 807c478bd9Sstevel@tonic-gate int 817c478bd9Sstevel@tonic-gate usb_log_descr_tree( 827c478bd9Sstevel@tonic-gate usb_client_dev_data_t *dev_data, 837c478bd9Sstevel@tonic-gate usb_log_handle_t log_handle, 847c478bd9Sstevel@tonic-gate uint_t level, 857c478bd9Sstevel@tonic-gate uint_t mask); 867c478bd9Sstevel@tonic-gate 877c478bd9Sstevel@tonic-gate int usb_register_client( 887c478bd9Sstevel@tonic-gate dev_info_t *dip, 897c478bd9Sstevel@tonic-gate uint_t version, 907c478bd9Sstevel@tonic-gate usb_client_dev_data_t **dev_data, 917c478bd9Sstevel@tonic-gate usb_reg_parse_lvl_t parse_level, 927c478bd9Sstevel@tonic-gate usb_flags_t flags); 937c478bd9Sstevel@tonic-gate 947c478bd9Sstevel@tonic-gate void usb_unregister_client( 957c478bd9Sstevel@tonic-gate dev_info_t *dip, 967c478bd9Sstevel@tonic-gate usb_client_dev_data_t *dev_data); 977c478bd9Sstevel@tonic-gate 987c478bd9Sstevel@tonic-gate /* allocate a log handle */ 997c478bd9Sstevel@tonic-gate usb_log_handle_t usb_alloc_log_handle( 1007c478bd9Sstevel@tonic-gate dev_info_t *dip, 1017c478bd9Sstevel@tonic-gate char *name, 1027c478bd9Sstevel@tonic-gate uint_t *errlevel, 1037c478bd9Sstevel@tonic-gate uint_t *mask, 1047c478bd9Sstevel@tonic-gate uint_t *instance_filter, 1057c478bd9Sstevel@tonic-gate uint_t reserved, 1067c478bd9Sstevel@tonic-gate usb_flags_t flags); 1077c478bd9Sstevel@tonic-gate 1087c478bd9Sstevel@tonic-gate 1097c478bd9Sstevel@tonic-gate /* free the log handle */ 1107c478bd9Sstevel@tonic-gate void usb_free_log_handle( 1117c478bd9Sstevel@tonic-gate usb_log_handle_t handle); 1127c478bd9Sstevel@tonic-gate 1137c478bd9Sstevel@tonic-gate /* 1147c478bd9Sstevel@tonic-gate * ************************************************************************** 1157c478bd9Sstevel@tonic-gate * Remaining functions are declarations for wrapper functions exported to 1167c478bd9Sstevel@tonic-gate * legacy drivers. 1177c478bd9Sstevel@tonic-gate * ************************************************************************** 1187c478bd9Sstevel@tonic-gate */ 1197c478bd9Sstevel@tonic-gate 1207c478bd9Sstevel@tonic-gate 1217c478bd9Sstevel@tonic-gate int 1227c478bd9Sstevel@tonic-gate usba10_usb_register_client( 1237c478bd9Sstevel@tonic-gate dev_info_t *dip, 1247c478bd9Sstevel@tonic-gate uint_t version, 1257c478bd9Sstevel@tonic-gate usb_client_dev_data_t **dev_data, 1267c478bd9Sstevel@tonic-gate usb_reg_parse_lvl_t parse_level, 1277c478bd9Sstevel@tonic-gate usb_flags_t flags); 1287c478bd9Sstevel@tonic-gate 1297c478bd9Sstevel@tonic-gate void 1307c478bd9Sstevel@tonic-gate usba10_usb_unregister_client( 1317c478bd9Sstevel@tonic-gate dev_info_t *dip, 1327c478bd9Sstevel@tonic-gate usb_client_dev_data_t *dev_data); 1337c478bd9Sstevel@tonic-gate 1347c478bd9Sstevel@tonic-gate void 1357c478bd9Sstevel@tonic-gate usba10_usb_free_descr_tree( 1367c478bd9Sstevel@tonic-gate dev_info_t *dip, 1377c478bd9Sstevel@tonic-gate usb_client_dev_data_t *dev_data); 1387c478bd9Sstevel@tonic-gate 1397c478bd9Sstevel@tonic-gate size_t 1407c478bd9Sstevel@tonic-gate usba10_usb_parse_data( 1417c478bd9Sstevel@tonic-gate char *format, 1427c478bd9Sstevel@tonic-gate uchar_t *data, 1437c478bd9Sstevel@tonic-gate size_t datalen, 1447c478bd9Sstevel@tonic-gate void *structure, 1457c478bd9Sstevel@tonic-gate size_t structlen); 1467c478bd9Sstevel@tonic-gate 1477c478bd9Sstevel@tonic-gate usb_ep_data_t * 1487c478bd9Sstevel@tonic-gate usba10_usb_get_ep_data( 1497c478bd9Sstevel@tonic-gate dev_info_t *dip, 1507c478bd9Sstevel@tonic-gate usb_client_dev_data_t *dev_datap, 1517c478bd9Sstevel@tonic-gate uint_t interface, 1527c478bd9Sstevel@tonic-gate uint_t alternate, 1537c478bd9Sstevel@tonic-gate uint_t type, 1547c478bd9Sstevel@tonic-gate uint_t direction); 1557c478bd9Sstevel@tonic-gate 1567c478bd9Sstevel@tonic-gate int 1577c478bd9Sstevel@tonic-gate usba10_usb_get_string_descr( 1587c478bd9Sstevel@tonic-gate dev_info_t *dip, 1597c478bd9Sstevel@tonic-gate uint16_t langid, 1607c478bd9Sstevel@tonic-gate uint8_t index, 1617c478bd9Sstevel@tonic-gate char *buf, 1627c478bd9Sstevel@tonic-gate size_t buflen); 1637c478bd9Sstevel@tonic-gate 1647c478bd9Sstevel@tonic-gate int 1657c478bd9Sstevel@tonic-gate usba10_usb_get_addr(dev_info_t *dip); 1667c478bd9Sstevel@tonic-gate 1677c478bd9Sstevel@tonic-gate int 1687c478bd9Sstevel@tonic-gate usba10_usb_get_if_number(dev_info_t *dip); 1697c478bd9Sstevel@tonic-gate 1707c478bd9Sstevel@tonic-gate boolean_t 1717c478bd9Sstevel@tonic-gate usba10_usb_owns_device(dev_info_t *dip); 1727c478bd9Sstevel@tonic-gate 1737c478bd9Sstevel@tonic-gate int 1747c478bd9Sstevel@tonic-gate usba10_usb_pipe_get_state( 1757c478bd9Sstevel@tonic-gate usb_pipe_handle_t pipe_handle, 1767c478bd9Sstevel@tonic-gate usb_pipe_state_t *pipe_state, 1777c478bd9Sstevel@tonic-gate usb_flags_t flags); 1787c478bd9Sstevel@tonic-gate 1797c478bd9Sstevel@tonic-gate int 1807c478bd9Sstevel@tonic-gate usba10_usb_ep_num(usb_pipe_handle_t ph); 1817c478bd9Sstevel@tonic-gate 1827c478bd9Sstevel@tonic-gate int 1837c478bd9Sstevel@tonic-gate usba10_usb_pipe_open( 1847c478bd9Sstevel@tonic-gate dev_info_t *dip, 1857c478bd9Sstevel@tonic-gate usb_ep_descr_t *ep, 1867c478bd9Sstevel@tonic-gate usb_pipe_policy_t *pipe_policy, 1877c478bd9Sstevel@tonic-gate usb_flags_t flags, 1887c478bd9Sstevel@tonic-gate usb_pipe_handle_t *pipe_handle); 1897c478bd9Sstevel@tonic-gate 1907c478bd9Sstevel@tonic-gate void 1917c478bd9Sstevel@tonic-gate usba10_usb_pipe_close( 1927c478bd9Sstevel@tonic-gate dev_info_t *dip, 1937c478bd9Sstevel@tonic-gate usb_pipe_handle_t pipe_handle, 1947c478bd9Sstevel@tonic-gate usb_flags_t flags, 1957c478bd9Sstevel@tonic-gate void (*cb)( 1967c478bd9Sstevel@tonic-gate usb_pipe_handle_t ph, 1977c478bd9Sstevel@tonic-gate usb_opaque_t arg, /* cb arg */ 1987c478bd9Sstevel@tonic-gate int rval, 1997c478bd9Sstevel@tonic-gate usb_cb_flags_t flags), 2007c478bd9Sstevel@tonic-gate usb_opaque_t cb_arg); 2017c478bd9Sstevel@tonic-gate 2027c478bd9Sstevel@tonic-gate int 2037c478bd9Sstevel@tonic-gate usba10_usb_pipe_drain_reqs( 2047c478bd9Sstevel@tonic-gate dev_info_t *dip, 2057c478bd9Sstevel@tonic-gate usb_pipe_handle_t pipe_handle, 2067c478bd9Sstevel@tonic-gate uint_t time, 2077c478bd9Sstevel@tonic-gate usb_flags_t flags, 2087c478bd9Sstevel@tonic-gate void (*cb)( 2097c478bd9Sstevel@tonic-gate usb_pipe_handle_t ph, 2107c478bd9Sstevel@tonic-gate usb_opaque_t arg, /* cb arg */ 2117c478bd9Sstevel@tonic-gate int rval, 2127c478bd9Sstevel@tonic-gate usb_cb_flags_t flags), 2137c478bd9Sstevel@tonic-gate usb_opaque_t cb_arg); 2147c478bd9Sstevel@tonic-gate 2157c478bd9Sstevel@tonic-gate int 2167c478bd9Sstevel@tonic-gate usba10_usb_pipe_set_private( 2177c478bd9Sstevel@tonic-gate usb_pipe_handle_t pipe_handle, 2187c478bd9Sstevel@tonic-gate usb_opaque_t data); 2197c478bd9Sstevel@tonic-gate 2207c478bd9Sstevel@tonic-gate usb_opaque_t 2217c478bd9Sstevel@tonic-gate usba10_usb_pipe_get_private(usb_pipe_handle_t pipe_handle); 2227c478bd9Sstevel@tonic-gate 2237c478bd9Sstevel@tonic-gate void 2247c478bd9Sstevel@tonic-gate usba10_usb_pipe_reset( 2257c478bd9Sstevel@tonic-gate dev_info_t *dip, 2267c478bd9Sstevel@tonic-gate usb_pipe_handle_t pipe_handle, 2277c478bd9Sstevel@tonic-gate usb_flags_t usb_flags, 2287c478bd9Sstevel@tonic-gate void (*cb)( 2297c478bd9Sstevel@tonic-gate usb_pipe_handle_t ph, 2307c478bd9Sstevel@tonic-gate usb_opaque_t arg, 2317c478bd9Sstevel@tonic-gate int rval, 2327c478bd9Sstevel@tonic-gate usb_cb_flags_t flags), 2337c478bd9Sstevel@tonic-gate usb_opaque_t cb_arg); 2347c478bd9Sstevel@tonic-gate 2357c478bd9Sstevel@tonic-gate usb_ctrl_req_t * 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 void 2427c478bd9Sstevel@tonic-gate usba10_usb_free_ctrl_req(usb_ctrl_req_t *reqp); 2437c478bd9Sstevel@tonic-gate 2447c478bd9Sstevel@tonic-gate int 2457c478bd9Sstevel@tonic-gate usba10_usb_pipe_ctrl_xfer( 2467c478bd9Sstevel@tonic-gate usb_pipe_handle_t pipe_handle, 2477c478bd9Sstevel@tonic-gate usb_ctrl_req_t *reqp, 2487c478bd9Sstevel@tonic-gate usb_flags_t flags); 2497c478bd9Sstevel@tonic-gate 2507c478bd9Sstevel@tonic-gate int 2517c478bd9Sstevel@tonic-gate usba10_usb_get_status( 2527c478bd9Sstevel@tonic-gate dev_info_t *dip, 2537c478bd9Sstevel@tonic-gate usb_pipe_handle_t ph, 2547c478bd9Sstevel@tonic-gate uint_t type, /* bmRequestType */ 2557c478bd9Sstevel@tonic-gate uint_t what, /* 0, interface, endpoint number */ 2567c478bd9Sstevel@tonic-gate uint16_t *status, 2577c478bd9Sstevel@tonic-gate usb_flags_t flags); 2587c478bd9Sstevel@tonic-gate 2597c478bd9Sstevel@tonic-gate int 2607c478bd9Sstevel@tonic-gate usba10_usb_clear_feature( 2617c478bd9Sstevel@tonic-gate dev_info_t *dip, 2627c478bd9Sstevel@tonic-gate usb_pipe_handle_t ph, 2637c478bd9Sstevel@tonic-gate uint_t type, /* bmRequestType */ 2647c478bd9Sstevel@tonic-gate uint_t feature, 2657c478bd9Sstevel@tonic-gate uint_t what, /* 0, interface, endpoint number */ 2667c478bd9Sstevel@tonic-gate usb_flags_t flags); 2677c478bd9Sstevel@tonic-gate 2687c478bd9Sstevel@tonic-gate int 2697c478bd9Sstevel@tonic-gate usba10_usb_pipe_ctrl_xfer_wait( 2707c478bd9Sstevel@tonic-gate usb_pipe_handle_t pipe_handle, 2717c478bd9Sstevel@tonic-gate usb_ctrl_setup_t *setup, 2727c478bd9Sstevel@tonic-gate mblk_t **data, 2737c478bd9Sstevel@tonic-gate usb_cr_t *completion_reason, 2747c478bd9Sstevel@tonic-gate usb_cb_flags_t *cb_flags, 2757c478bd9Sstevel@tonic-gate usb_flags_t flags); 2767c478bd9Sstevel@tonic-gate 2777c478bd9Sstevel@tonic-gate int 2787c478bd9Sstevel@tonic-gate usba10_usb_set_cfg( 2797c478bd9Sstevel@tonic-gate dev_info_t *dip, 2807c478bd9Sstevel@tonic-gate uint_t cfg_index, 2817c478bd9Sstevel@tonic-gate usb_flags_t usb_flags, 2827c478bd9Sstevel@tonic-gate void (*cb)( 2837c478bd9Sstevel@tonic-gate usb_pipe_handle_t ph, 2847c478bd9Sstevel@tonic-gate usb_opaque_t arg, 2857c478bd9Sstevel@tonic-gate int rval, 2867c478bd9Sstevel@tonic-gate usb_cb_flags_t flags), 2877c478bd9Sstevel@tonic-gate usb_opaque_t cb_arg); 2887c478bd9Sstevel@tonic-gate 2897c478bd9Sstevel@tonic-gate int 2907c478bd9Sstevel@tonic-gate usba10_usb_get_cfg( 2917c478bd9Sstevel@tonic-gate dev_info_t *dip, 2927c478bd9Sstevel@tonic-gate uint_t *cfgval, 2937c478bd9Sstevel@tonic-gate usb_flags_t usb_flags); 2947c478bd9Sstevel@tonic-gate 2957c478bd9Sstevel@tonic-gate int 2967c478bd9Sstevel@tonic-gate usba10_usb_set_alt_if( 2977c478bd9Sstevel@tonic-gate dev_info_t *dip, 2987c478bd9Sstevel@tonic-gate uint_t interface, 2997c478bd9Sstevel@tonic-gate uint_t alt_number, 3007c478bd9Sstevel@tonic-gate usb_flags_t usb_flags, 3017c478bd9Sstevel@tonic-gate void (*cb)( 3027c478bd9Sstevel@tonic-gate usb_pipe_handle_t ph, 3037c478bd9Sstevel@tonic-gate usb_opaque_t arg, 3047c478bd9Sstevel@tonic-gate int rval, 3057c478bd9Sstevel@tonic-gate usb_cb_flags_t flags), 3067c478bd9Sstevel@tonic-gate usb_opaque_t cb_arg); 3077c478bd9Sstevel@tonic-gate 3087c478bd9Sstevel@tonic-gate int 3097c478bd9Sstevel@tonic-gate usba10_usb_get_alt_if( 3107c478bd9Sstevel@tonic-gate dev_info_t *dip, 3117c478bd9Sstevel@tonic-gate uint_t if_number, 3127c478bd9Sstevel@tonic-gate uint_t *alt_number, 3137c478bd9Sstevel@tonic-gate usb_flags_t flags); 3147c478bd9Sstevel@tonic-gate 3157c478bd9Sstevel@tonic-gate usb_bulk_req_t * 3167c478bd9Sstevel@tonic-gate usba10_usb_alloc_bulk_req( 3177c478bd9Sstevel@tonic-gate dev_info_t *dip, 3187c478bd9Sstevel@tonic-gate size_t len, 3197c478bd9Sstevel@tonic-gate usb_flags_t flags); 3207c478bd9Sstevel@tonic-gate 3217c478bd9Sstevel@tonic-gate void 3227c478bd9Sstevel@tonic-gate usba10_usb_free_bulk_req(usb_bulk_req_t *reqp); 3237c478bd9Sstevel@tonic-gate 3247c478bd9Sstevel@tonic-gate int 3257c478bd9Sstevel@tonic-gate usba10_usb_pipe_bulk_xfer( 3267c478bd9Sstevel@tonic-gate usb_pipe_handle_t pipe_handle, 3277c478bd9Sstevel@tonic-gate usb_bulk_req_t *reqp, 3287c478bd9Sstevel@tonic-gate usb_flags_t flags); 3297c478bd9Sstevel@tonic-gate 3307c478bd9Sstevel@tonic-gate int 3317c478bd9Sstevel@tonic-gate usba10_usb_pipe_bulk_transfer_size( 3327c478bd9Sstevel@tonic-gate dev_info_t *dip, 3337c478bd9Sstevel@tonic-gate size_t *size); 3347c478bd9Sstevel@tonic-gate 3357c478bd9Sstevel@tonic-gate usb_intr_req_t * 3367c478bd9Sstevel@tonic-gate usba10_usb_alloc_intr_req( 3377c478bd9Sstevel@tonic-gate dev_info_t *dip, 3387c478bd9Sstevel@tonic-gate size_t len, 3397c478bd9Sstevel@tonic-gate usb_flags_t flags); 3407c478bd9Sstevel@tonic-gate 3417c478bd9Sstevel@tonic-gate void 3427c478bd9Sstevel@tonic-gate usba10_usb_free_intr_req(usb_intr_req_t *reqp); 3437c478bd9Sstevel@tonic-gate 3447c478bd9Sstevel@tonic-gate int 3457c478bd9Sstevel@tonic-gate usba10_usb_pipe_intr_xfer( 3467c478bd9Sstevel@tonic-gate usb_pipe_handle_t pipe_handle, 3477c478bd9Sstevel@tonic-gate usb_intr_req_t *req, 3487c478bd9Sstevel@tonic-gate usb_flags_t flags); 3497c478bd9Sstevel@tonic-gate 3507c478bd9Sstevel@tonic-gate void 3517c478bd9Sstevel@tonic-gate usba10_usb_pipe_stop_intr_polling( 3527c478bd9Sstevel@tonic-gate usb_pipe_handle_t pipe_handle, 3537c478bd9Sstevel@tonic-gate usb_flags_t flags); 3547c478bd9Sstevel@tonic-gate 3557c478bd9Sstevel@tonic-gate usb_isoc_req_t * 3567c478bd9Sstevel@tonic-gate usba10_usb_alloc_isoc_req( 3577c478bd9Sstevel@tonic-gate dev_info_t *dip, 3587c478bd9Sstevel@tonic-gate uint_t isoc_pkts_count, 3597c478bd9Sstevel@tonic-gate size_t len, 3607c478bd9Sstevel@tonic-gate usb_flags_t flags); 3617c478bd9Sstevel@tonic-gate 3627c478bd9Sstevel@tonic-gate void 3637c478bd9Sstevel@tonic-gate usba10_usb_free_isoc_req(usb_isoc_req_t *usb_isoc_req); 3647c478bd9Sstevel@tonic-gate 3657c478bd9Sstevel@tonic-gate usb_frame_number_t 3667c478bd9Sstevel@tonic-gate usba10_usb_get_current_frame_number(dev_info_t *dip); 3677c478bd9Sstevel@tonic-gate 3687c478bd9Sstevel@tonic-gate uint_t 3697c478bd9Sstevel@tonic-gate usba10_usb_get_max_isoc_pkts(dev_info_t *dip); 3707c478bd9Sstevel@tonic-gate 3717c478bd9Sstevel@tonic-gate int 3727c478bd9Sstevel@tonic-gate usba10_usb_pipe_isoc_xfer( 3737c478bd9Sstevel@tonic-gate usb_pipe_handle_t pipe_handle, 3747c478bd9Sstevel@tonic-gate usb_isoc_req_t *reqp, 3757c478bd9Sstevel@tonic-gate usb_flags_t flags); 3767c478bd9Sstevel@tonic-gate 3777c478bd9Sstevel@tonic-gate void 3787c478bd9Sstevel@tonic-gate usba10_usb_pipe_stop_isoc_polling( 3797c478bd9Sstevel@tonic-gate usb_pipe_handle_t pipe_handle, 3807c478bd9Sstevel@tonic-gate usb_flags_t flags); 3817c478bd9Sstevel@tonic-gate 3827c478bd9Sstevel@tonic-gate int 3837c478bd9Sstevel@tonic-gate usba10_usb_req_raise_power( 3847c478bd9Sstevel@tonic-gate dev_info_t *dip, 3857c478bd9Sstevel@tonic-gate int comp, 3867c478bd9Sstevel@tonic-gate int level, 3877c478bd9Sstevel@tonic-gate void (*cb)(void *arg, int rval), 3887c478bd9Sstevel@tonic-gate void *arg, 3897c478bd9Sstevel@tonic-gate usb_flags_t flags); 3907c478bd9Sstevel@tonic-gate 3917c478bd9Sstevel@tonic-gate int 3927c478bd9Sstevel@tonic-gate usba10_usb_req_lower_power( 3937c478bd9Sstevel@tonic-gate dev_info_t *dip, 3947c478bd9Sstevel@tonic-gate int comp, 3957c478bd9Sstevel@tonic-gate int level, 3967c478bd9Sstevel@tonic-gate void (*cb)(void *arg, int rval), 3977c478bd9Sstevel@tonic-gate void *arg, 3987c478bd9Sstevel@tonic-gate usb_flags_t flags); 3997c478bd9Sstevel@tonic-gate 4007c478bd9Sstevel@tonic-gate int 4017c478bd9Sstevel@tonic-gate usba10_usb_is_pm_enabled(dev_info_t *dip); 4027c478bd9Sstevel@tonic-gate 4037c478bd9Sstevel@tonic-gate int 4047c478bd9Sstevel@tonic-gate usba10_usb_handle_remote_wakeup( 4057c478bd9Sstevel@tonic-gate dev_info_t *dip, 4067c478bd9Sstevel@tonic-gate int cmd); 4077c478bd9Sstevel@tonic-gate 4087c478bd9Sstevel@tonic-gate int 4097c478bd9Sstevel@tonic-gate usba10_usb_create_pm_components( 4107c478bd9Sstevel@tonic-gate dev_info_t *dip, 4117c478bd9Sstevel@tonic-gate uint_t *pwrstates); 4127c478bd9Sstevel@tonic-gate 4137c478bd9Sstevel@tonic-gate int 4147c478bd9Sstevel@tonic-gate usba10_usb_set_device_pwrlvl0(dev_info_t *dip); 4157c478bd9Sstevel@tonic-gate 4167c478bd9Sstevel@tonic-gate int 4177c478bd9Sstevel@tonic-gate usba10_usb_set_device_pwrlvl1(dev_info_t *dip); 4187c478bd9Sstevel@tonic-gate 4197c478bd9Sstevel@tonic-gate int 4207c478bd9Sstevel@tonic-gate usba10_usb_set_device_pwrlvl2(dev_info_t *dip); 4217c478bd9Sstevel@tonic-gate 4227c478bd9Sstevel@tonic-gate int 4237c478bd9Sstevel@tonic-gate usba10_usb_set_device_pwrlvl3(dev_info_t *dip); 4247c478bd9Sstevel@tonic-gate 4257c478bd9Sstevel@tonic-gate int 4267c478bd9Sstevel@tonic-gate usba10_usb_async_req( 4277c478bd9Sstevel@tonic-gate dev_info_t *dip, 4287c478bd9Sstevel@tonic-gate void (*func)(void *), 4297c478bd9Sstevel@tonic-gate void *arg, 4307c478bd9Sstevel@tonic-gate usb_flags_t flag); 4317c478bd9Sstevel@tonic-gate 4327c478bd9Sstevel@tonic-gate int 4337c478bd9Sstevel@tonic-gate usba10_usb_register_event_cbs( 4347c478bd9Sstevel@tonic-gate dev_info_t *dip, 4357c478bd9Sstevel@tonic-gate usb_event_t *usb_evt_data, 4367c478bd9Sstevel@tonic-gate usb_flags_t flags); 4377c478bd9Sstevel@tonic-gate 4387c478bd9Sstevel@tonic-gate void 4397c478bd9Sstevel@tonic-gate usba10_usb_unregister_event_cbs( 4407c478bd9Sstevel@tonic-gate dev_info_t *dip, 4417c478bd9Sstevel@tonic-gate usb_event_t *usb_evt_data); 4427c478bd9Sstevel@tonic-gate 4437c478bd9Sstevel@tonic-gate void 4447c478bd9Sstevel@tonic-gate usba10_usb_fail_checkpoint( 4457c478bd9Sstevel@tonic-gate dev_info_t *dip, 4467c478bd9Sstevel@tonic-gate usb_flags_t flags); 4477c478bd9Sstevel@tonic-gate 4487c478bd9Sstevel@tonic-gate usb_log_handle_t 4497c478bd9Sstevel@tonic-gate usba10_usb_alloc_log_handle( 4507c478bd9Sstevel@tonic-gate dev_info_t *dip, 4517c478bd9Sstevel@tonic-gate char *name, 4527c478bd9Sstevel@tonic-gate uint_t *errlevel, 4537c478bd9Sstevel@tonic-gate uint_t *mask, 4547c478bd9Sstevel@tonic-gate uint_t *instance_filter, 4557c478bd9Sstevel@tonic-gate uint_t show_label, 4567c478bd9Sstevel@tonic-gate usb_flags_t flags); 4577c478bd9Sstevel@tonic-gate 4587c478bd9Sstevel@tonic-gate int 4597c478bd9Sstevel@tonic-gate usba10_usba_vlog( 4607c478bd9Sstevel@tonic-gate usb_log_handle_t handle, 4617c478bd9Sstevel@tonic-gate uint_t level, 4627c478bd9Sstevel@tonic-gate uint_t mask, 4637c478bd9Sstevel@tonic-gate char *fmt, 4647c478bd9Sstevel@tonic-gate va_list ap); 4657c478bd9Sstevel@tonic-gate 4667c478bd9Sstevel@tonic-gate void 4677c478bd9Sstevel@tonic-gate usba10_usb_free_log_handle(usb_log_handle_t handle); 4687c478bd9Sstevel@tonic-gate 4697c478bd9Sstevel@tonic-gate int 4707c478bd9Sstevel@tonic-gate usba10_usb_log_descr_tree( 4717c478bd9Sstevel@tonic-gate usb_client_dev_data_t *dev_data, 4727c478bd9Sstevel@tonic-gate usb_log_handle_t log_handle, 4737c478bd9Sstevel@tonic-gate uint_t level, 4747c478bd9Sstevel@tonic-gate uint_t mask); 4757c478bd9Sstevel@tonic-gate 4767c478bd9Sstevel@tonic-gate int 4777c478bd9Sstevel@tonic-gate usba10_usb_print_descr_tree( 4787c478bd9Sstevel@tonic-gate dev_info_t *dip, 4797c478bd9Sstevel@tonic-gate usb_client_dev_data_t *dev_data); 4807c478bd9Sstevel@tonic-gate 4817c478bd9Sstevel@tonic-gate int 4827c478bd9Sstevel@tonic-gate usba10_usb_check_same_device( 4837c478bd9Sstevel@tonic-gate dev_info_t *dip, 4847c478bd9Sstevel@tonic-gate usb_log_handle_t log_handle, 4857c478bd9Sstevel@tonic-gate int log_level, 4867c478bd9Sstevel@tonic-gate int log_mask, 4877c478bd9Sstevel@tonic-gate uint_t check_mask, 4887c478bd9Sstevel@tonic-gate char *device_string); 4897c478bd9Sstevel@tonic-gate 4907c478bd9Sstevel@tonic-gate const char * 4917c478bd9Sstevel@tonic-gate usba10_usb_str_cr(usb_cr_t cr); 4927c478bd9Sstevel@tonic-gate 4937c478bd9Sstevel@tonic-gate char * 4947c478bd9Sstevel@tonic-gate usba10_usb_str_cb_flags( 4957c478bd9Sstevel@tonic-gate usb_cb_flags_t cb_flags, 4967c478bd9Sstevel@tonic-gate char *buffer, 4977c478bd9Sstevel@tonic-gate size_t length); 4987c478bd9Sstevel@tonic-gate 4997c478bd9Sstevel@tonic-gate const char * 5007c478bd9Sstevel@tonic-gate usba10_usb_str_pipe_state(usb_pipe_state_t state); 5017c478bd9Sstevel@tonic-gate 5027c478bd9Sstevel@tonic-gate const char * 5037c478bd9Sstevel@tonic-gate usba10_usb_str_dev_state(int state); 5047c478bd9Sstevel@tonic-gate 5057c478bd9Sstevel@tonic-gate const char * 5067c478bd9Sstevel@tonic-gate usba10_usb_str_rval(int rval); 5077c478bd9Sstevel@tonic-gate 5087c478bd9Sstevel@tonic-gate int 5097c478bd9Sstevel@tonic-gate usba10_usb_rval2errno(int rval); 5107c478bd9Sstevel@tonic-gate 5117c478bd9Sstevel@tonic-gate usb_serialization_t 5127c478bd9Sstevel@tonic-gate usba10_usb_init_serialization( 5137c478bd9Sstevel@tonic-gate dev_info_t *s_dip, 5147c478bd9Sstevel@tonic-gate uint_t flag); 5157c478bd9Sstevel@tonic-gate 5167c478bd9Sstevel@tonic-gate void 5177c478bd9Sstevel@tonic-gate usba10_usb_fini_serialization(usb_serialization_t usb_serp); 5187c478bd9Sstevel@tonic-gate 5197c478bd9Sstevel@tonic-gate int 5207c478bd9Sstevel@tonic-gate usba10_usb_serialize_access( 5217c478bd9Sstevel@tonic-gate usb_serialization_t usb_serp, 5227c478bd9Sstevel@tonic-gate uint_t how_to_wait, 5237c478bd9Sstevel@tonic-gate uint_t delta_timeout); 5247c478bd9Sstevel@tonic-gate 5257c478bd9Sstevel@tonic-gate int 5267c478bd9Sstevel@tonic-gate usba10_usb_try_serialize_access( 5277c478bd9Sstevel@tonic-gate usb_serialization_t usb_serp, 5287c478bd9Sstevel@tonic-gate uint_t flag); 5297c478bd9Sstevel@tonic-gate 5307c478bd9Sstevel@tonic-gate void 5317c478bd9Sstevel@tonic-gate usba10_usb_release_access(usb_serialization_t usb_serp); 5327c478bd9Sstevel@tonic-gate 5337c478bd9Sstevel@tonic-gate #ifdef __cplusplus 5347c478bd9Sstevel@tonic-gate } 5357c478bd9Sstevel@tonic-gate #endif 5367c478bd9Sstevel@tonic-gate 5377c478bd9Sstevel@tonic-gate #endif /* _SYS_USB_USBA10_H */ 538