summaryrefslogtreecommitdiff
path: root/usb-linux.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2011-05-31 11:35:19 +0200
committerGerd Hoffmann <kraxel@redhat.com>2011-06-14 12:56:49 +0200
commitf264cfbf4a010e1be879bf2e62d323443989d72f (patch)
tree7a00de7ee923a743ed2eb39f18df1facae7c0f13 /usb-linux.c
parent3991c35e8586cc42501de1236d0c155e82223540 (diff)
downloadqemu-f264cfbf4a010e1be879bf2e62d323443989d72f.tar.gz
usb-linux: Teach about super speed
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'usb-linux.c')
-rw-r--r--usb-linux.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/usb-linux.c b/usb-linux.c
index e990d3a87f..ed1d56add7 100644
--- a/usb-linux.c
+++ b/usb-linux.c
@@ -1378,7 +1378,9 @@ static int usb_host_scan_dev(void *opaque, USBScanFunc *func)
if (get_tag_value(buf, sizeof(buf), line, "Spd=", " ") < 0) {
goto fail;
}
- if (!strcmp(buf, "480")) {
+ if (!strcmp(buf, "5000")) {
+ speed = USB_SPEED_SUPER;
+ } else if (!strcmp(buf, "480")) {
speed = USB_SPEED_HIGH;
} else if (!strcmp(buf, "1.5")) {
speed = USB_SPEED_LOW;
@@ -1522,7 +1524,9 @@ static int usb_host_scan_sys(void *opaque, USBScanFunc *func)
if (!usb_host_read_file(line, sizeof(line), "speed", de->d_name)) {
goto the_end;
}
- if (!strcmp(line, "480\n")) {
+ if (!strcmp(line, "5000\n")) {
+ speed = USB_SPEED_SUPER;
+ } else if (!strcmp(line, "480\n")) {
speed = USB_SPEED_HIGH;
} else if (!strcmp(line, "1.5\n")) {
speed = USB_SPEED_LOW;
@@ -1799,6 +1803,9 @@ static void usb_info_device(Monitor *mon, int bus_num, int addr, char *port,
case USB_SPEED_HIGH:
speed_str = "480";
break;
+ case USB_SPEED_SUPER:
+ speed_str = "5000";
+ break;
default:
speed_str = "?";
break;