---
name: "usb_ep_set_halt"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/usb_ep_set_halt"
---

# usb\_ep\_set\_halt(9)

sets the endpoint halt feature.

## NAME

usb\_ep\_set\_halt - sets the endpoint halt feature.

## SYNOPSIS

**int usb\_ep\_set\_halt(struct usb\_ep \*** *ep***);**

## ARGUMENTS

*ep*

the non-isochronous endpoint being stalled

## DESCRIPTION

Use this to stall an endpoint, perhaps as an error report. Except for control endpoints, the endpoint stays halted (will not stream any data) until the host clears this feature; drivers may need to empty the endpoint's request queue first, to make sure no inappropriate transfers happen.

Note that while an endpoint CLEAR\_FEATURE will be invisible to the gadget driver, a SET\_INTERFACE will not be. To reset endpoints for the current altsetting, see **usb\_ep\_clear\_halt**. When switching altsettings, it's simplest to use **usb\_ep\_enable** or **usb\_ep\_disable** for the endpoints.

Returns zero, or a negative error code. On success, this call sets underlying hardware state that blocks data transfers. Attempts to halt IN endpoints will fail (returning -EAGAIN) if any transfer requests are still queued, or if the controller hardware (usually a FIFO) still holds bytes that the host hasn't collected.

## AUTHOR

**David Brownell** \<dbrownell@users.sourceforge.net\>

Author.

## COPYRIGHT
