---
name: "usb_hcd_giveback_urb"
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_giveback_urb"
---

# usb\_hcd\_giveback\_urb(9)

return URB from HCD to device driver

## NAME

usb\_hcd\_giveback\_urb - return URB from HCD to device driver

## SYNOPSIS

**void usb\_hcd\_giveback\_urb(struct usb\_hcd \*** *hcd***, struct urb \*** *urb***, int** *status***);**

## ARGUMENTS

*hcd*

host controller returning the URB

*urb*

urb being returned to the USB device driver.

*status*

completion status code for the URB.

## CONTEXT

**in\_interrupt**

## DESCRIPTION

This hands the URB from HCD to its USB device driver, using its completion function. The HCD has freed all per-urb resources (and is done using urb-\>hcpriv). It also released all HCD locks; the device driver won't cause problems if it frees, modifies, or resubmits this URB.

If *urb* was unlinked, the value of *status* will be overridden by *urb*-\>unlinked. Erroneous short transfers are detected in case the HCD hasn't checked for them.

## COPYRIGHT
