aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-03-26 14:17:39 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-03-26 14:17:39 -0400
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 270481906dc8..6c3c625b7f30 100644
--- a/Documentation/usb/usbmon.txt
+++ b/Documentation/usb/usbmon.txt
@@ -229,16 +229,26 @@ struct usbmon_packet {
229 int status; /* 28: */ 229 int status; /* 28: */
230 unsigned int length; /* 32: Length of data (submitted or actual) */ 230 unsigned int length; /* 32: Length of data (submitted or actual) */
231 unsigned int len_cap; /* 36: Delivered length */ 231 unsigned int len_cap; /* 36: Delivered length */
232 unsigned char setup[8]; /* 40: Only for Control 'S' */ 232 union { /* 40: */
233}; /* 48 bytes total */ 233 unsigned char setup[SETUP_LEN]; /* Only for Control S-type */
234 struct iso_rec { /* Only for ISO */
235 int error_count;
236 int numdesc;
237 } iso;
238 } s;
239 int interval; /* 48: Only for Interrupt and ISO */
240 int start_frame; /* 52: For ISO */
241 unsigned int xfer_flags; /* 56: copy of URB's transfer_flags */
242 unsigned int ndesc; /* 60: Actual number of ISO descriptors */
243}; /* 64 total length */
234 244
235These events can be received from a character device by reading with read(2), 245These events can be received from a character device by reading with read(2),
236with an ioctl(2), or by accessing the buffer with mmap. 246with an ioctl(2), or by accessing the buffer with mmap. However, read(2)
247only returns first 48 bytes for compatibility reasons.
237 248
238The character device is usually called /dev/usbmonN, where N is the USB bus 249The character device is usually called /dev/usbmonN, where N is the USB bus
239number. Number zero (/dev/usbmon0) is special and means "all buses". 250number. Number zero (/dev/usbmon0) is special and means "all buses".
240However, this feature is not implemented yet. Note that specific naming 251Note that specific naming policy is set by your Linux distribution.
241policy is set by your Linux distribution.
242 252
243If you create /dev/usbmon0 by hand, make sure that it is owned by root 253If you create /dev/usbmon0 by hand, make sure that it is owned by root
244and has mode 0600. Otherwise, unpriviledged users will be able to snoop 254and 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
279This call returns the current size of the buffer in bytes. 289This call returns the current size of the buffer in bytes.
280 290
281 MON_IOCX_GET, defined as _IOW(MON_IOC_MAGIC, 6, struct mon_get_arg) 291 MON_IOCX_GET, defined as _IOW(MON_IOC_MAGIC, 6, struct mon_get_arg)
292 MON_IOCX_GETX, defined as _IOW(MON_IOC_MAGIC, 10, struct mon_get_arg)
282 293
283This call waits for events to arrive if none were in the kernel buffer, 294These calls wait for events to arrive if none were in the kernel buffer,
284then returns the first event. Its argument is a pointer to the following 295then return the first event. The argument is a pointer to the following
285structure: 296structure:
286 297
287struct mon_get_arg { 298struct mon_get_arg {
@@ -294,6 +305,8 @@ Before the call, hdr, data, and alloc should be filled. Upon return, the area
294pointed by hdr contains the next event structure, and the data buffer contains 305pointed by hdr contains the next event structure, and the data buffer contains
295the data, if any. The event is removed from the kernel buffer. 306the data, if any. The event is removed from the kernel buffer.
296 307
308The MON_IOCX_GET copies 48 bytes, MON_IOCX_GETX copies 64 bytes.
309
297 MON_IOCX_MFETCH, defined as _IOWR(MON_IOC_MAGIC, 7, struct mon_mfetch_arg) 310 MON_IOCX_MFETCH, defined as _IOWR(MON_IOC_MAGIC, 7, struct mon_mfetch_arg)
298 311
299This ioctl is primarily used when the application accesses the buffer 312This ioctl is primarily used when the application accesses the buffer