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_STOP_INTR_POLLING 9E
18 .Nm usba_hcdi_pipe_stop_intr_polling ,
19 .Nm usba_hcdi_pipe_stop_isoc_polling
20 .Nd stop polling on an interrupt or isochronous pipe
22 .In sys/usb/usba/hcdi.h
24 .Fo prefix_hcdi_pipe_stop_intr_polling
25 .Fa "usba_pipe_handle_data_t *ph"
26 .Fa "usba_flags_t usb_flags"
29 .Fo prefix_hcdi_pipe_stop_isoc_polling
30 .Fa "usba_pipe_handle_data_t *ph"
31 .Fa "usba_flags_t usb_flags"
35 illumos USB HCD private function
37 This is a private function that is not part of the stable DDI.
38 It may be removed or changed at any time.
42 A pointer to a USB pipe handle as defined in
43 .Xr usba_pipe_handle_data 9S .
45 Flags which describe how allocations should be performed.
48 .It Sy USB_FLAGS_NOSLEEP
49 Do not block waiting for memory.
50 If memory is not available the allocation will fail.
51 .It Sy USB_FLAGS_SLEEP
52 Perform a blocking allocation.
53 If memory is not available, the function will wait until memory is made
56 Note, the request may still fail even if
63 .Fn usba_hcdi_pipe_stop_intr_polling
65 .Fn usba_hcdi_pipe_stop_isoc_polling
66 entry points are called when a client driver wishes to cease polling on
67 an interrupt or isochronous pipe as describe by
69 While these functions should only be called on pipes that have
70 outstanding periodic interrupt and isochronous requests started through
72 .Xr usba_hcdi_pipe_intr_xfer 9E
74 .Xr usba_hcdi_pipe_isoc_xfer 9E ,
75 as part of device driver hardening, device drivers should verify that
76 there are outstanding transfers.
78 For interrupt transfers,
80 may refer to the root hub and so the driver may need to cease any
81 synthetic polling it is performing.
82 Isochronous transfers are forbidden on the root hub, so the
83 .Fn usba_hcdi_pipe_stop_isoc_polling
84 will only be called on a pipe that corresponds to an actual device.
89 In all cases, the driver should take the following steps before returning from
93 Quiesce and stop the endpoint.
95 Remove any remaining scheduled transfers.
99 on the original interrupt or isochronous request with the code
100 .Sy USB_CR_STOPPED_POLLING .
102 Optionally, free all associated resources.
103 If resources aren't freed at this time, they must be freed when
104 .Xr usba_hcdi_pipe_close 9E
107 Any other steps needed such that a call to perform one-shot or periodic
108 transfers on this endpoint again may be enabled.
111 It is possible that this function may be called concurrently with a call
113 .Xr usba_hcdi_pipe_reset 9E
115 In such cases, the host controller driver is required to perform synchronization
116 on its data structures.
118 Upon successful completion, the
119 .Fn usba_hcdi_pipe_stop_intr_polling
121 .Fn uba_hcdi_pipe_stop_isoc_polling
122 functions should return
124 Otherwise, it should return the appropriate USB error.
128 .Xr usba_hcdi_pipe_close 9E ,
129 .Xr usba_hcdi_pipe_intr_xfer 9E ,
130 .Xr usba_hcdi_pipe_isoc_xfer 9E ,
131 .Xr usba_hcdi_pipe_reset 9E ,
132 .Xr usba_hcdi_cb 9F ,
133 .Xr usba_pipe_handle_data 9S