Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

usb_bulk_msg(9) [suse man page]

USB_BULK_MSG(9) 						   USB Core APIs						   USB_BULK_MSG(9)

NAME
usb_bulk_msg - Builds a bulk urb, sends it off and waits for completion SYNOPSIS
int usb_bulk_msg(struct usb_device * usb_dev, unsigned int pipe, void * data, int len, int * actual_length, int timeout); ARGUMENTS
usb_dev pointer to the usb device to send the message to pipe endpoint "pipe" to send the message to data pointer to the data to send len length in bytes of the data to send actual_length pointer to a location to put the actual length transferred in bytes timeout time in msecs to wait for the message to complete before timing out (if 0 the wait is forever) CONTEXT
!in_interrupt () DESCRIPTION
This function sends a simple bulk message to a specified endpoint and waits for the message to complete, or timeout. If successful, it returns 0, otherwise a negative error number. The number of actual bytes transferred will be stored in the actual_length paramater. 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 usb_submit_urb If a thread in your driver uses this call, make sure your disconnect method can wait for it to complete. Since you don't have a handle on the URB used, you can't cancel the request. Because there is no usb_interrupt_msg and no USBDEVFS_INTERRUPT ioctl, users are forced to abuse this routine by using it to submit URBs for interrupt endpoints. We will take the liberty of creating an interrupt URB (with the default interval) if the target is an interrupt endpoint. COPYRIGHT
Kernel Hackers Manual 2.6. July 2010 USB_BULK_MSG(9)

Check Out this Related Man Page

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 request block being initialized. until usb_sg_wait returns, treat this as a pointer to an opaque block of memory, dev the usb device that will send or receive the data pipe endpoint "pipe" used to transfer the data period polling rate for interrupt endpoints, in frames or (for high speed endpoints) microframes; ignored for bulk sg scatterlist entries nents how many entries in the scatterlist length how many bytes to send from the scatterlist, or zero to send every byte identified in the list. mem_flags SLAB_* flags affecting memory allocations in this call DESCRIPTION
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). 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. COPYRIGHT
Kernel Hackers Manual 2.6. July 2010 USB_SG_INIT(9)
Man Page

4 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

NOTICE:u79n:Abnormal interrupt! int_status=FC67C0D0

I am receiving the message of "NOTICE:u79n:Abnormal interrupt! int_status=FC67C0D0" periodically on my server. (version is 5.06) It is not creating a critical problem and my applications are running withouth any problem. What is the reason of that and how can I solve that problem? (1 Reply)
Discussion started by: fadil
1 Replies

2. Shell Programming and Scripting

substr not working

Hi I am trying to run this command in ksh ...its not working $line="123356572867116w1671716" actual_length = 16 cut_line=`awk 'BEGIN{print substr(ARGV,1,actual_length)}' "$line"` the substr is not giving me an output how can i make it done can anyone hwlp me on this cut_line=`awk... (2 Replies)
Discussion started by: pukars4u
2 Replies

3. Programming

please help a problem in client-server ipc message 2 pipes communication simple example

I want to have a message send & receive through 2 half-duplex pipes Flow of data top half pipe stdin--->parent(client) fd1--->pipe1-->child(server) fd1 bottom half pipe child(server) fd2---->pipe2--->parent(client) fd2--->stdout I need to have boundary structed message... (1 Reply)
Discussion started by: ouou
1 Replies

4. Shell Programming and Scripting

How to send data to previous program (pipe)?

Hi, Suppose I have a command:$ cmd1 | cmd2I need to send a message from cmd2 to cmd1 when I receive some a certain message from cmd1. How to do this? I think that I have to know cmd1's PID and then in cmd2 send a message to this PID. How? (24 Replies)
Discussion started by: JackK
24 Replies