---
name: "usb_hcd_link_urb_to_ep"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/usb_hcd_link_urb_to_ep"
---

# usb\_hcd\_link\_urb\_to\_ep(9)

add an URB to its endpoint queue

## NAME

usb\_hcd\_link\_urb\_to\_ep - add an URB to its endpoint queue

## SYNOPSIS

**int usb\_hcd\_link\_urb\_to\_ep(struct usb\_hcd \*** *hcd***, struct urb \*** *urb***);**

## ARGUMENTS

*hcd*

host controller to which *urb* was submitted

*urb*

URB being submitted

## DESCRIPTION

Host controller drivers should call this routine in their **enqueue** method. The HCD's private spinlock must be held and interrupts must be disabled. The actions carried out here are required for URB submission, as well as for endpoint shutdown and for usb\_kill\_urb.

## RETURN

0 for no error, otherwise a negative error code (in which case the **enqueue** method must fail). If no error occurs but **enqueue** fails anyway, it must call **usb\_hcd\_unlink\_urb\_from\_ep** before releasing the private spinlock and returning.

## COPYRIGHT
