diff options
author | Hans de Goede <hdegoede@redhat.com> | 2012-10-24 18:14:00 +0200 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2012-11-04 15:47:35 +0100 |
commit | 773df978c0f25bdb445612ca16e0140cf6be6cb8 (patch) | |
tree | cb34d10987ec46b93db071ebb6ca179f4cbf0ecd | |
parent | d63d488baf9f2db7632ee9c7570e864b5da03366 (diff) |
ehci: Set int flag on a short input packet
According to 4.15.1.2 an interrupt must be raised when a short packet
is received. If we don't do this it may take a significant time for
the guest to notice a short trasnfer has completed, since only the last td
will have its IOC flag set, and a short transfer may complete in an earlier
packet.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-rw-r--r-- | hw/usb/hcd-ehci.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c index 1a2f7ad54..e701518c4 100644 --- a/hw/usb/hcd-ehci.c +++ b/hw/usb/hcd-ehci.c @@ -1508,6 +1508,10 @@ static void ehci_execute_complete(EHCIQueue *q) if (tbytes && p->pid == USB_TOKEN_IN) { tbytes -= p->usb_status; + if (tbytes) { + /* 4.15.1.2 must raise int on a short input packet */ + ehci_raise_irq(q->ehci, USBSTS_INT); + } } else { tbytes = 0; } |