.\" 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_WAIT" "9" "17 July 2003" "" ""
.SH NAME
usb_sg_wait \- synchronously execute scatter/gather request
.SH SYNOPSIS
.sp
\fB
.sp
void usb_sg_wait (struct usb_sg_request * \fIio\fB);
\fR
.SH "ARGUMENTS"
.TP
\fB\fIio\fB\fR
request block handle, as initialized with \fBusb_sg_init\fR.
some fields become accessible when this call returns.
.SH "CONTEXT"
.PP
!in_interrupt ()
.SH "DESCRIPTION"
.PP
This function blocks until the specified I/O operation completes. It
leverages the grouping of the related I/O requests to get good transfer
rates, by queueing the requests. At higher speeds, such queuing can
significantly improve USB throughput.
.PP
There are three kinds of completion for this function.
(1) success, where io->status is zero. The number of io->bytes
transferred is as requested.
(2) error, where io->status is a negative errno value. The number
of io->bytes transferred before the error is usually less
than requested, and can be nonzero.
(3) cancelation, a type of error with status -ECONNRESET that
is initiated by \fBusb_sg_cancel\fR.
.PP
When this function returns, all memory allocated through \fBusb_sg_init\fR or
this call will have been freed. The request block parameter may still be
passed to \fBusb_sg_cancel\fR, or it may be freed. It could also be
reinitialized and then reused.
.SH "DATA TRANSFER RATES"
.PP
.PP
Bulk transfers are valid for full or high speed endpoints.
The best full speed data rate is 19 packets of 64 bytes each
per frame, or 1216 bytes per millisecond.
The best high speed data rate is 13 packets of 512 bytes each
per microframe, or 52 KBytes per millisecond.
.PP
The reason to use interrupt transfers through this API would most likely
be to reserve high speed bandwidth, where up to 24 KBytes per millisecond
could be transferred. That capability is less useful for low or full
speed interrupt endpoints, which allow at most one packet per millisecond,
of at most 8 or 64 bytes (respectively).
.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.73.