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