USB_SG_INIT(9) | USB Core APIs | USB_SG_INIT(9) |
NAME¶
usb_sg_init - initializes scatterlist-based bulk/interrupt I/O request
SYNOPSIS¶
int usb_sg_init(struct usb_sg_request * io, struct usb_device * dev, unsigned pipe, unsigned period, struct scatterlist * sg, int nents, size_t length, gfp_t mem_flags);
ARGUMENTS¶
io
dev
pipe
period
sg
nents
length
mem_flags
DESCRIPTION¶
This initializes a scatter/gather request, allocating resources such as I/O mappings and urb memory (except maybe memory used by USB controller drivers).
The request must be issued using usb_sg_wait, which waits for the I/O to complete (or to be canceled) and then cleans up all resources allocated by usb_sg_init.
The request may be canceled with usb_sg_cancel, either before or after usb_sg_wait is called.
RETURN¶
Zero for success, else a negative errno value.
COPYRIGHT¶
June 2024 | Kernel Hackers Manual 3.10 |