--- hw/usb-bus.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/hw/usb-bus.c b/hw/usb-bus.c index 2ae2678..1817d5c 100644 --- 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)) { + fprintf(stderr, "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); -- 1.7.5.1