.\" This manpage has been automatically generated by docbook2man .\" from a DocBook document. This tool can be found at: .\" .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . .TH "USB_SG_INIT" "9" "17 July 2003" "" "" .SH NAME usb_sg_init \- initializes scatterlist-based bulk/interrupt I/O request .SH SYNOPSIS .sp \fB .sp int usb_sg_init (struct usb_sg_request * \fIio\fB, struct usb_device * \fIdev\fB, unsigned \fIpipe\fB, unsigned \fIperiod\fB, struct scatterlist * \fIsg\fB, int \fInents\fB, size_t \fIlength\fB, int \fImem_flags\fB); \fR .SH "ARGUMENTS" .TP \fB\fIio\fB\fR request block being initialized. until \fBusb_sg_wait\fR returns, treat this as a pointer to an opaque block of memory, .TP \fB\fIdev\fB\fR the usb device that will send or receive the data .TP \fB\fIpipe\fB\fR endpoint ``pipe'' used to transfer the data .TP \fB\fIperiod\fB\fR polling rate for interrupt endpoints, in frames or (for high speed endpoints) microframes; ignored for bulk .TP \fB\fIsg\fB\fR scatterlist entries .TP \fB\fInents\fB\fR how many entries in the scatterlist .TP \fB\fIlength\fB\fR how many bytes to send from the scatterlist, or zero to send every byte identified in the list. .TP \fB\fImem_flags\fB\fR SLAB_* flags affecting memory allocations in this call .SH "DESCRIPTION" .PP Returns zero for success, else a negative errno value. This initializes a scatter/gather request, allocating resources such as I/O mappings and urb memory (except maybe memory used by USB controller drivers). .PP The request must be issued using \fBusb_sg_wait\fR, which waits for the I/O to complete (or to be canceled) and then cleans up all resources allocated by \fBusb_sg_init\fR. .PP The request may be canceled with \fBusb_sg_cancel\fR, either before or after \fBusb_sg_wait\fR is called. .SH "ABOUT THIS DOCUMENT" .PP This documentation is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. .PP This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. .PP You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA .PP For more details see the file COPYING in the source distribution of Linux. .PP If you have comments on the formatting of this manpage, then please contact Michael Still (mikal@stillhq.com). .PP This documentation was generated with kernel version 2.5.75.