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*fffe0b30Sqz * Common Development and Distribution License (the "License"). 6*fffe0b30Sqz * 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*fffe0b30Sqz * 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_UHCITGT_H 277c478bd9Sstevel@tonic-gate #define _SYS_USB_UHCITGT_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 * Shared function declarations 367c478bd9Sstevel@tonic-gate */ 377c478bd9Sstevel@tonic-gate queue_head_t *uhci_alloc_queue_head(uhci_state_t *uhcip); 387c478bd9Sstevel@tonic-gate uhci_state_t *uhci_obtain_state(dev_info_t *dip); 397c478bd9Sstevel@tonic-gate 407c478bd9Sstevel@tonic-gate int uhci_insert_ctrl_td(uhci_state_t *uhcip, 417c478bd9Sstevel@tonic-gate usba_pipe_handle_data_t *pipe_handle, 427c478bd9Sstevel@tonic-gate usb_ctrl_req_t *req, 437c478bd9Sstevel@tonic-gate usb_flags_t flags); 447c478bd9Sstevel@tonic-gate int uhci_insert_bulk_td(uhci_state_t *uhcip, 457c478bd9Sstevel@tonic-gate usba_pipe_handle_data_t *pipe_handle, 467c478bd9Sstevel@tonic-gate usb_bulk_req_t *req, 477c478bd9Sstevel@tonic-gate usb_flags_t flags); 487c478bd9Sstevel@tonic-gate int uhci_insert_intr_td(uhci_state_t *uhcip, 497c478bd9Sstevel@tonic-gate usba_pipe_handle_data_t *pipe_handle, 507c478bd9Sstevel@tonic-gate usb_intr_req_t *req, 517c478bd9Sstevel@tonic-gate usb_flags_t flags); 527c478bd9Sstevel@tonic-gate int uhci_insert_isoc_td( 537c478bd9Sstevel@tonic-gate uhci_state_t *uhcip, 547c478bd9Sstevel@tonic-gate usba_pipe_handle_data_t *ph, 557c478bd9Sstevel@tonic-gate usb_isoc_req_t *isoc_req, 567c478bd9Sstevel@tonic-gate size_t length, 577c478bd9Sstevel@tonic-gate usb_flags_t usb_flags); 587c478bd9Sstevel@tonic-gate 597c478bd9Sstevel@tonic-gate void uhci_remove_qh(uhci_state_t *uhcip, uhci_pipe_private_t *pp); 607c478bd9Sstevel@tonic-gate void uhci_insert_qh(uhci_state_t *uhcip, 617c478bd9Sstevel@tonic-gate usba_pipe_handle_data_t *pipe_handle); 627c478bd9Sstevel@tonic-gate void uhci_modify_td_active_bits( 637c478bd9Sstevel@tonic-gate uhci_state_t *uhcip, 647c478bd9Sstevel@tonic-gate uhci_pipe_private_t *pp); 657c478bd9Sstevel@tonic-gate 667c478bd9Sstevel@tonic-gate int uhci_allocate_bandwidth(uhci_state_t *uhcip, 677c478bd9Sstevel@tonic-gate usba_pipe_handle_data_t *pipe_handle, uint_t *node); 687c478bd9Sstevel@tonic-gate void uhci_deallocate_bandwidth(uhci_state_t *uhcip, 697c478bd9Sstevel@tonic-gate usba_pipe_handle_data_t *pipe_handle); 707c478bd9Sstevel@tonic-gate void uhci_remove_tds_tws(uhci_state_t *uhcip, 717c478bd9Sstevel@tonic-gate usba_pipe_handle_data_t *ph); 727c478bd9Sstevel@tonic-gate void uhci_remove_isoc_tds_tws(uhci_state_t *uhcip, 737c478bd9Sstevel@tonic-gate uhci_pipe_private_t *ph); 747c478bd9Sstevel@tonic-gate int uhci_start_isoc_receive_polling( 757c478bd9Sstevel@tonic-gate uhci_state_t *uhcip, 767c478bd9Sstevel@tonic-gate usba_pipe_handle_data_t *ph, 777c478bd9Sstevel@tonic-gate usb_isoc_req_t *req, 787c478bd9Sstevel@tonic-gate usb_flags_t usb_flags); 797c478bd9Sstevel@tonic-gate 807c478bd9Sstevel@tonic-gate 817c478bd9Sstevel@tonic-gate void uhci_save_data_toggle(uhci_pipe_private_t *pp); 827c478bd9Sstevel@tonic-gate int uhci_handle_root_hub_request( 837c478bd9Sstevel@tonic-gate uhci_state_t *uhcip, 847c478bd9Sstevel@tonic-gate usba_pipe_handle_data_t *pipe_handle, 857c478bd9Sstevel@tonic-gate usb_ctrl_req_t *req); 867c478bd9Sstevel@tonic-gate 877c478bd9Sstevel@tonic-gate void uhci_remove_bulk_tds_tws(uhci_state_t *uhcip, 887c478bd9Sstevel@tonic-gate uhci_pipe_private_t *pp, 897c478bd9Sstevel@tonic-gate int what); 907c478bd9Sstevel@tonic-gate void uhci_root_hub_reset_occurred(uhci_state_t *uhcip, 917c478bd9Sstevel@tonic-gate usb_port_t port); 927c478bd9Sstevel@tonic-gate int uhci_root_hub_allocate_intr_pipe_resource( 937c478bd9Sstevel@tonic-gate uhci_state_t *uhcip, 947c478bd9Sstevel@tonic-gate usb_flags_t flags); 957c478bd9Sstevel@tonic-gate void uhci_root_hub_intr_pipe_cleanup(uhci_state_t *uhcip, 967c478bd9Sstevel@tonic-gate usb_cr_t cr); 977c478bd9Sstevel@tonic-gate void uhci_hcdi_callback(uhci_state_t *uhcip, 987c478bd9Sstevel@tonic-gate uhci_pipe_private_t *pp, 997c478bd9Sstevel@tonic-gate usba_pipe_handle_data_t *ph, 1007c478bd9Sstevel@tonic-gate uhci_trans_wrapper_t *tw, 1017c478bd9Sstevel@tonic-gate usb_cr_t cr); 1027c478bd9Sstevel@tonic-gate int uhci_allocate_periodic_in_resource(uhci_state_t *uhcip, 1037c478bd9Sstevel@tonic-gate uhci_pipe_private_t *pp, 1047c478bd9Sstevel@tonic-gate uhci_trans_wrapper_t *tw, usb_flags_t flags); 1057c478bd9Sstevel@tonic-gate 1067c478bd9Sstevel@tonic-gate #ifdef __cplusplus 1077c478bd9Sstevel@tonic-gate } 1087c478bd9Sstevel@tonic-gate #endif 1097c478bd9Sstevel@tonic-gate 1107c478bd9Sstevel@tonic-gate #endif /* _SYS_USB_UHCITGT_H */ 111