USBA_HCDI_DUP_ISOC_REQ(9F) Kernel Functions for Drivers

NAME


usba_hcdi_dup_isoc_req - duplicate an isochronous request

SYNOPSIS


#include <sys/usb/usba/hcdi.h>

usb_isoc_req_t *
usba_hcdi_dup_isoc_req(dev_info_t *dip, usb_isoc_req_t *usrp,
usb_flags_t flags);

INTERFACE LEVEL


Volatile - illumos USB HCD private function

This is a private function that is not part of the stable DDI. It may
be removed or changed at any time.

PARAMETERS


dip A pointer to the HCD driver's dev_info structure.

usrp A pointer to the USB isochronous request which will be
duplicated.

flags

USB_FLAGS_NOSLEEP
Do not block waiting for memory. If memory is
not available the allocation will fail.

USB_FLAGS_SLEEP
Perform a blocking allocation. If memory is not
available, the function will wait until memory is
made available.

Note, the request may still fail even if
USB_FLAGS_SLEEP is specified.

DESCRIPTION


The usba_hcdi_dup_isoc_req() function is used to duplicate an existing
isochronous request, usrp.

When the USBA framework initiates an isochronous in transfer with the
usba_hcdi_pipe_isoc_xfer(9E) entry point, it is the HCD driver's
responsibility to receive the periodic data from the pipe. When there
is data available, the HCD must duplicate the original isochronous
request and copy the available data into the request structure's
isoc_data member, before handing over the request structure to the USBA
framework by calling the usba_hcdi_cb(9F) function.

In addition to duplicating the request, it is the callers
responsibility to increase the pipe handle's request count. For more
information, see usba_hcdi_pipe_isoc_xfer(9E).

The dip argument should correspond to the HCD driver's dev_info_t
structure. The usrp pointer should correspond to the initial
isochronous request. The flags member must be appropriate for the
context. If USB_FLAGS_SLEEP is passed while in interrupt context, then
this function may fail.

CONTEXT


The usba_hcdi_dup_isoc_req() function may be called from user, kernel,
or interrupt context; however, when in interrupt context, the value of
flags must be USB_FLAGS_NOSLEEP.

RETURN VALUES


Upon successful completion, the usba_hcdi_dup_isoc_req() function
returns a pointer to a duplicate isochronous request. Otherwise, NULL
is returned to indicate that the request could not be duplicated.

SEE ALSO


usba_hcdi(9E), usba_hcdi_pipe_isoc_xfer(9E), usba_hcdi_cb(9F)

illumos September 16, 2016 illumos

tribblix@gmail.com :: GitHub :: Privacy