diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2012-03-29 16:06:28 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2012-04-17 10:23:28 +0200 |
commit | 96dd9aac37d30f3425088f81523942e67b2d03ac (patch) | |
tree | b418b8fe0461afceb2f9dcc93cc0d047959189ac /hw/apm.h | |
parent | e36a20d329b4cf52ce3b269345527e7ebcc00885 (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 'hw/apm.h')
0 files changed, 0 insertions, 0 deletions