summaryrefslogtreecommitdiff
path: root/trace-events
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2012-03-29 16:06:28 +0200
committerGerd Hoffmann <kraxel@redhat.com>2012-04-17 10:23:28 +0200
commit96dd9aac37d30f3425088f81523942e67b2d03ac (patch)
treeb418b8fe0461afceb2f9dcc93cc0d047959189ac /trace-events
parente36a20d329b4cf52ce3b269345527e7ebcc00885 (diff)
usb-host: rewrite usb_linux_update_endp_table
This patch carries a complete rewrite of the usb descriptor parser. Changes / improvements: * We are using the USBDescriptor struct instead of hard-coded offsets now to access descriptor data. * (debug) printfs are all gone, tracepoints have been added instead. * We don't try (and fail) to skip over unneeded descriptors. We parse them all one by one. We keep track of which configuration, interface and altsetting we are looking at and use this information to figure which desciptors are in use and which we can ignore. * On parse errors we clear all endpoint information, which will disallow any communication with the device, except control endpoint messages. This makes sure we don't end up with a silly device state where half of the endpoints got enabled and the other half was left disabled. * Some sanity checks have been added. The new parser is more robust and also leaves complete device information in the trace log if you enable the ush_host_parse_* tracepoints. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'trace-events')
-rw-r--r--trace-events6
1 files changed, 6 insertions, 0 deletions
diff --git a/trace-events b/trace-events
index e7ce5b2cb3..d2e787962f 100644
--- a/trace-events
+++ b/trace-events
@@ -337,6 +337,12 @@ usb_host_reset(int bus, int addr) "dev %d:%d"
usb_host_auto_scan_enabled(void)
usb_host_auto_scan_disabled(void)
usb_host_claim_port(int bus, int hub, int port) "bus %d, hub addr %d, port %d"
+usb_host_parse_device(int bus, int addr, int vendor, int product) "dev %d:%d, id %04x:%04x"
+usb_host_parse_config(int bus, int addr, int value, int active) "dev %d:%d, value %d, active %d"
+usb_host_parse_interface(int bus, int addr, int num, int alt, int active) "dev %d:%d, num %d, alt %d, active %d"
+usb_host_parse_endpoint(int bus, int addr, int ep, const char *dir, const char *type, int active) "dev %d:%d, ep %d, %s, %s, active %d"
+usb_host_parse_unknown(int bus, int addr, int len, int type) "dev %d:%d, len %d, type %d"
+usb_host_parse_error(int bus, int addr, const char *errmsg) "dev %d:%d, msg %s"
# hw/scsi-bus.c
scsi_req_alloc(int target, int lun, int tag) "target %d lun %d tag %d"