diff options
author | Hans de Goede <hdegoede@redhat.com> | 2012-08-17 11:39:16 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2012-09-11 07:42:58 +0200 |
commit | 45b339b18c660eb85af2ba25bfcaed5469660d77 (patch) | |
tree | ec30543725e2de4891e524e931e0c35a92f4642a /hw/usb/hcd-uhci.c | |
parent | 4b1c11fd20e8901f04a2d9c225cd10fc05a762ff (diff) |
usb: controllers do not need to check for babble themselves
If an (emulated) usb-device tries to write more data to a packet then
its iov len, this will trigger an assert in usb_packet_copy(), and if
a driver somehow circumvents that check and writes more data to the
iov then there is space, we have a much bigger problem then not correctly
reporting babble to the guest.
In practice babble will only happen with (real) redirected devices, and there
both the usb-host os and the qemu usb-device code already check for it.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb/hcd-uhci.c')
-rw-r--r-- | hw/usb/hcd-uhci.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c index b0db92145a..c7c878635a 100644 --- a/hw/usb/hcd-uhci.c +++ b/hw/usb/hcd-uhci.c @@ -729,11 +729,6 @@ static int uhci_complete_td(UHCIState *s, UHCI_TD *td, UHCIAsync *async, uint32_ *int_mask |= 0x01; if (pid == USB_TOKEN_IN) { - if (len > max_len) { - ret = USB_RET_BABBLE; - goto out; - } - if ((td->ctrl & TD_CTRL_SPD) && len < max_len) { *int_mask |= 0x02; /* short packet: do not update QH */ |