usb-bus: Don't allow speed mismatch while attaching devices
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
e4b1776765
commit
bf5547f536
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user