2 .\" This file and its contents are supplied under the terms of the
3 .\" Common Development and Distribution License ("CDDL"), version 1.0.
4 .\" You may only use this file in accordance with the terms of version
7 .\" A full copy of the text of the CDDL should have accompanied this
8 .\" source. A copy of the CDDL is also available via the Internet at
9 .\" http://www.illumos.org/license/CDDL.
12 .\" Copyright 2016 Joyent, Inc.
15 .Dt USBA_HCDI_PIPE_RESET 9E
18 .Nm usba_hcdi_pipe_rest
19 .Nd reset an open USB pipe
21 .In sys/usb/usba/hcdi.h
23 .Fo prefix_hcdi_pipe_reset
24 .Fa "usba_pipe_handle_data_t *ph"
25 .Fa "usb_flags_t usb_flags"
29 illumos USB HCD private function
31 This is a private function that is not part of the stable DDI.
32 It may be removed or changed at any time.
36 A pointer to a USB pipe handle as defined in
37 .Xr usba_pipe_handle_data 9S .
39 Flags which describe how allocations should be performed.
42 .It Sy USB_FLAGS_NOSLEEP
43 Do not block waiting for memory.
44 If memory is not available the allocation will fail.
45 .It Sy USB_FLAGS_SLEEP
46 Perform a blocking allocation.
47 If memory is not available, the function will wait until memory is made
50 Note, the request may still fail even if
57 .Fn usba_hcdi_pipe_reset
58 entry point is designed to take a pipe in an arbitrary state and return
59 it to the same state it was in after a call to
60 .Xr usba_hcdi_pipe_open 9E .
61 While this entry point does some similar things to the
62 .Xr usba_hcdi_stop_intr_polling 9E
64 .Xr usba_hcdi_stop_isoc_polling 9E
65 entry points, there are some notable differences.
67 This entry point is synchronous.
68 The host controller driver should take the following steps on the pipe before
72 Quiesce and stop the endpoint.
74 If the endpoint has any errors they should be cleared at this time.
76 Remove any remaining, scheduled or queued transfers.
80 .Sy USB_CR_PIPE_RESET .
82 Perform any other necessary steps on the controller to have the endpoint
83 be ready to perform I/O.
86 This entry point is called by the broader USBA framework as part of
87 closing a pipe or in response to a device stall.
89 Upon successful completion, the
90 .Fn usba_hcdi_pipe_reset
91 function should return
93 Otherwise, it should return the appropriate USB error.
97 .Xr usba_hcdi_pipe_open 9E ,
98 .Xr usba_hcdi_stop_intr_polling 9E ,
99 .Xr usba_hcdi_stop_isoc_polling 9E ,
100 .Xr usba_hcdi_cb 9F ,
101 .Xr usba_pipe_handle_data 9S