---
name: "usb_alloc_streams"
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_alloc_streams"
---

# usb\_alloc\_streams(9)

allocate bulk endpoint stream IDs.

## NAME

usb\_alloc\_streams - allocate bulk endpoint stream IDs.

## SYNOPSIS

**int usb\_alloc\_streams(struct usb\_interface \*** *interface***, struct usb\_host\_endpoint \*\*** *eps***, unsigned int** *num\_eps***, unsigned int** *num\_streams***, gfp\_t** *mem\_flags***);**

## ARGUMENTS

*interface*

alternate setting that includes all endpoints.

*eps*

array of endpoints that need streams.

*num\_eps*

number of endpoints in the array.

*num\_streams*

number of streams to allocate.

*mem\_flags*

flags hcd should use to allocate memory.

## DESCRIPTION

Sets up a group of bulk endpoints to have *num\_streams* stream IDs available. Drivers may queue multiple transfers to different stream IDs, which may complete in a different order than they were queued.

## RETURN

On success, the number of allocated streams. On failure, a negative error code.

## COPYRIGHT
