projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e4b1776
)
usb-bus: Don't allow speed mismatch while attaching devices
author
Hans de Goede
<hdegoede@redhat.com>
Fri, 27 May 2011 12:50:39 +0000
(14:50 +0200)
committer
Gerd Hoffmann
<kraxel@redhat.com>
Thu, 23 Jun 2011 09:28:07 +0000
(11:28 +0200)
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/usb-bus.c
patch
|
blob
|
history
diff --git
a/hw/usb-bus.c
b/hw/usb-bus.c
index fc720185b713032364e94adda29d898d939487cb..2abce12de5b0ece6d78d46b0c2b6451b3680283c 100644
(file)
--- a/
hw/usb-bus.c
+++ b/
hw/usb-bus.c
@@
-200,6
+200,11
@@
static int do_attach(USBDevice *dev)
} else {
port = QTAILQ_FIRST(&bus->free);
}
+ if (!(port->speedmask & dev->speedmask)) {
+ error_report("Warning: speed mismatch trying to attach usb device %s to bus %s\n",
+ dev->product_desc, bus->qbus.name);
+ return -1;
+ }
dev->attached++;
QTAILQ_REMOVE(&bus->free, port, next);