.\" 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_BULK_MSG" "" "06 October 2005" "" ""
.SH NAME
usb_bulk_msg \- Builds a bulk urb, sends it off and waits for completion
.SH SYNOPSIS
"SYNOPSIS"
.sp
\fB
.sp
int usb_bulk_msg (struct usb_device * \fIusb_dev\fB, unsigned int \fIpipe\fB, void * \fIdata\fB, int \fIlen\fB, int * \fIactual_length\fB, int \fItimeout\fB);
\fR
.SH "ARGUMENTS"
.TP
\fB\fIusb_dev\fB\fR
pointer to the usb device to send the message to
.TP
\fB\fIpipe\fB\fR
endpoint ``pipe'' to send the message to
.TP
\fB\fIdata\fB\fR
pointer to the data to send
.TP
\fB\fIlen\fB\fR
length in bytes of the data to send
.TP
\fB\fIactual_length\fB\fR
pointer to a location to put the actual length transferred in bytes
.TP
\fB\fItimeout\fB\fR
time in jiffies to wait for the message to complete before
timing out (if 0 the wait is forever)
.SH "CONTEXT"
.PP
!in_interrupt ()
.SH "DESCRIPTION"
.PP
This function sends a simple bulk message to a specified endpoint
and waits for the message to complete, or timeout.
.PP
If successful, it returns 0, otherwise a negative error number.
The number of actual bytes transferred will be stored in the
actual_length paramater.
.PP
Don't use this function from within an interrupt context, like a
bottom half handler. If you need an asynchronous message, or need to
send a message from within interrupt context, use \fBusb_submit_urb\fR
If a thread in your driver uses this call, make sure your \fBdisconnect\fR
method can wait for it to complete. Since you don't have a handle on
the URB used, you can't cancel the request.