1USB_EP_SET_HALT(9) Kernel Mode Gadget API USB_EP_SET_HALT(9)
2
3
4
6 usb_ep_set_halt - sets the endpoint halt feature.
7
9 int usb_ep_set_halt(struct usb_ep * ep);
10
12 ep
13 the non-isochronous endpoint being stalled
14
16 Use this to stall an endpoint, perhaps as an error report. Except for
17 control endpoints, the endpoint stays halted (will not stream any data)
18 until the host clears this feature; drivers may need to empty the
19 endpoint´s request queue first, to make sure no inappropriate transfers
20 happen.
21
22 Note that while an endpoint CLEAR_FEATURE will be invisible to the
23 gadget driver, a SET_INTERFACE will not be. To reset endpoints for the
24 current altsetting, see usb_ep_clear_halt. When switching altsettings,
25 it´s simplest to use usb_ep_enable or usb_ep_disable for the endpoints.
26
27 Returns zero, or a negative error code. On success, this call sets
28 underlying hardware state that blocks data transfers. Attempts to halt
29 IN endpoints will fail (returning -EAGAIN) if any transfer requests are
30 still queued, or if the controller hardware (usually a FIFO) still
31 holds bytes that the host hasn´t collected.
32
34 David Brownell <dbrownell@users.sourceforge.net>
35 Author.
36
38Kernel Hackers Manual 2.6. June 2019 USB_EP_SET_HALT(9)