1USB_INTERRUPT_MSG(9)             USB Core APIs            USB_INTERRUPT_MSG(9)
2
3
4

NAME

6       usb_interrupt_msg - Builds an interrupt urb, sends it off and waits for
7       completion
8

SYNOPSIS

10       int usb_interrupt_msg(struct usb_device * usb_dev, unsigned int pipe,
11                             void * data, int len, int * actual_length,
12                             int timeout);
13

ARGUMENTS

15       usb_dev
16           pointer to the usb device to send the message to
17
18       pipe
19           endpoint “pipe” to send the message to
20
21       data
22           pointer to the data to send
23
24       len
25           length in bytes of the data to send
26
27       actual_length
28           pointer to a location to put the actual length transferred in bytes
29
30       timeout
31           time in msecs to wait for the message to complete before timing out
32           (if 0 the wait is forever)
33

CONTEXT

35       !in_interrupt ()
36

DESCRIPTION

38       This function sends a simple interrupt message to a specified endpoint
39       and waits for the message to complete, or timeout.
40
41       Don't use this function from within an interrupt context. If you need
42       an asynchronous message, or need to send a message from within
43       interrupt context, use usb_submit_urb If a thread in your driver uses
44       this call, make sure your disconnect method can wait for it to
45       complete. Since you don't have a handle on the URB used, you can't
46       cancel the request.
47

RETURN

49       If successful, 0. Otherwise a negative error number. The number of
50       actual bytes transferred will be stored in the actual_length parameter.
51
53Kernel Hackers Manual 3.10         June 2019              USB_INTERRUPT_MSG(9)
Impressum