aboutsummaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-03-26 11:17:39 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-03-26 11:17:39 -0700
commit61a091827e273650b39eb87c799a6d260913fa0b (patch)
tree19f0a4840fc90da6ca3787ee7efacb5bb0c6c7a2 /Documentation
parent0c93ea4064a209cdc36de8a9a3003d43d08f46f7 (diff)
parentfd8345f8dea93691b0ceba55146088d8c05415f6 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (97 commits) USB: qcserial: add device id for HP devices USB: isp1760: Add a delay before reading the SKIPMAP registers in isp1760-hcd.c USB: allow malformed LANGID descriptors USB: pxa27x_udc: typo fixes and code cleanups USB: gadget: gadget zero uses new suspend/resume hooks USB: gadget: composite device-level suspend/resume hooks USB: r8a66597-hcd: suspend/resume support USB: more u32 conversion after transfer_buffer_length and actual_length USB: Fix cp2101 USB serial device driver termios functions for console use USB: CP2101 New Device ID USB: ipaq: handle 4 endpoint devices USB: S3C: Move usb-control.h to platform include USB: ohci-hcd: Add ARCH_S3C24XX to the ohci-s3c2410.c glue USB: pedantic: spelling correction in comment for ch9.h USB: host: fix sparse warning: Using plain integer as NULL pointer USB: ohci-s3c2410: fix name of bus clock USB: ohci-s3c2410: remove <mach/hardware.h> include USB: serial: rename cp2101 driver to cp210x USB: CP2101 Reduce Error Logging USB: CP2101 Support AN205 baud rates ...
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/usb/usbmon.txt27
1 files changed, 20 insertions, 7 deletions
diff --git a/Documentation/usb/usbmon.txt b/Documentation/usb/usbmon.txt
index 270481906dc..6c3c625b7f3 100644
--- a/Documentation/usb/usbmon.txt
+++ b/Documentation/usb/usbmon.txt
@@ -229,16 +229,26 @@ struct usbmon_packet {
int status; /* 28: */
unsigned int length; /* 32: Length of data (submitted or actual) */
unsigned int len_cap; /* 36: Delivered length */
- unsigned char setup[8]; /* 40: Only for Control 'S' */
-}; /* 48 bytes total */
+ union { /* 40: */
+ unsigned char setup[SETUP_LEN]; /* Only for Control S-type */
+ struct iso_rec { /* Only for ISO */
+ int error_count;
+ int numdesc;
+ } iso;
+ } s;
+ int interval; /* 48: Only for Interrupt and ISO */
+ int start_frame; /* 52: For ISO */
+ unsigned int xfer_flags; /* 56: copy of URB's transfer_flags */
+ unsigned int ndesc; /* 60: Actual number of ISO descriptors */
+}; /* 64 total length */
These events can be received from a character device by reading with read(2),
-with an ioctl(2), or by accessing the buffer with mmap.
+with an ioctl(2), or by accessing the buffer with mmap. However, read(2)
+only returns first 48 bytes for compatibility reasons.
The character device is usually called /dev/usbmonN, where N is the USB bus
number. Number zero (/dev/usbmon0) is special and means "all buses".
-However, this feature is not implemented yet. Note that specific naming
-policy is set by your Linux distribution.
+Note that specific naming policy is set by your Linux distribution.
If you create /dev/usbmon0 by hand, make sure that it is owned by root
and has mode 0600. Otherwise, unpriviledged users will be able to snoop
@@ -279,9 +289,10 @@ size is out of [unspecified] bounds for this kernel, the call fails with
This call returns the current size of the buffer in bytes.
MON_IOCX_GET, defined as _IOW(MON_IOC_MAGIC, 6, struct mon_get_arg)
+ MON_IOCX_GETX, defined as _IOW(MON_IOC_MAGIC, 10, struct mon_get_arg)
-This call waits for events to arrive if none were in the kernel buffer,
-then returns the first event. Its argument is a pointer to the following
+These calls wait for events to arrive if none were in the kernel buffer,
+then return the first event. The argument is a pointer to the following
structure:
struct mon_get_arg {
@@ -294,6 +305,8 @@ Before the call, hdr, data, and alloc should be filled. Upon return, the area
pointed by hdr contains the next event structure, and the data buffer contains
the data, if any. The event is removed from the kernel buffer.
+The MON_IOCX_GET copies 48 bytes, MON_IOCX_GETX copies 64 bytes.
+
MON_IOCX_MFETCH, defined as _IOWR(MON_IOC_MAGIC, 7, struct mon_mfetch_arg)
This ioctl is primarily used when the application accesses the buffer