Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

usb_bulk_msg(9) [centos 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. 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. RETURN
If successful, 0. Otherwise a negative error number. The number of actual bytes transferred will be stored in the actual_length paramater. COPYRIGHT
Kernel Hackers Manual 3.10 June 2014 USB_BULK_MSG(9)

Check Out this Related Man Page

USB_INTERRUPT_MSG(9)						   USB Core APIs					      USB_INTERRUPT_MSG(9)

NAME
usb_interrupt_msg - Builds an interrupt urb, sends it off and waits for completion SYNOPSIS
int usb_interrupt_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 interrupt 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. COPYRIGHT
Kernel Hackers Manual 2.6. July 2010 USB_INTERRUPT_MSG(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