USBA_HCDI_DUP_INTER_REQ(9F) Kernel Functions for Drivers USBA_HCDI_DUP_INTER_REQ(9F)

usba_hcdi_dup_intr_req
duplicate an interrupt request

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

usb_intr_req_t *
usba_hcdi_dup_intr_req(dev_info_t *dip, usb_intr_req_t *irqp, size_t size, usb_flags_t flags);

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.

dip
A pointer to the HCD driver's dev_info structure.
irqp
A pointer to the USB interrupt request which will be duplicated.
size
The number of bytes in the allocated data block mblk_t.
flags
Flags which describe how allocations should be performed. Valid flags are:
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.

The usba_hcdi_dup_intr_req() function is used to duplicate an existing interrupt request, irqp.

The USBA framework initiates interrupt operations through the usba_hcdi_pipe_intr_xfer(9E) entry point. It provides an initial USB interrupt request as an argument. When the HCD driver has interrupt data to return, it needs to duplicate that initial interrupt request each time that it submits data through the usba_hcdi_cb(9F) function. In addition to duplicating the request, callers may also need to increase the pipe handle's request count. For more information, see usba_hcdi_pipe_intr_xfer(9E).

The dip argument should correspond to the HCD driver's dev_info_t structure. The irqp pointer should correspond to the initial interrupt request. The size argument should describe the maximum amount of data needed for this request. The amount of data will be dependent on the endpoint and device. The value of flags should depend on the caller's context. If USB_FLAGS_SLEEP is passed while in interrupt context, then this function will fail.

The usba_hcdi_dup_intr_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.

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

usba_hcdi(9E), usba_hcdi_pipe_intr_xfer(9E), usba_hcdi_cb(9F)
May 10, 2016 OmniOS