From: Hans de Goede Date: Fri, 2 Mar 2012 20:27:14 +0000 (+0100) Subject: usb-ehci: Any packet completion except for NAK should set the interrupt X-Git-Tag: v1.1-rc0~262^2~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2763cbc751c494dd2f58f902ad80a8048f9cfd7b;p=thirdparty%2Fqemu.git usb-ehci: Any packet completion except for NAK should set the interrupt As clearly stated in the 2.3.2 of the EHCI spec, any time USBERRINT get sets then if the td has its IOC bit set USBINT should be set as well. This means that for any status except for USB_RET_NAK we should set USBINT if the IOC bit is set. Signed-off-by: Hans de Goede Signed-off-by: Gerd Hoffmann --- diff --git a/hw/usb-ehci.c b/hw/usb-ehci.c index d386b8407dd..507e4a81488 100644 --- a/hw/usb-ehci.c +++ b/hw/usb-ehci.c @@ -1360,7 +1360,7 @@ err: q->qh.token ^= QTD_TOKEN_DTOGGLE; q->qh.token &= ~QTD_TOKEN_ACTIVE; - if ((q->usb_status >= 0) && (q->qh.token & QTD_TOKEN_IOC)) { + if ((q->usb_status != USB_RET_NAK) && (q->qh.token & QTD_TOKEN_IOC)) { ehci_record_interrupt(q->ehci, USBSTS_INT); } }