usb-uhci: correctly deal with interrupt in asynchronous completion
This is the result of merging the remaining changes from:
changeset: 12775:
60bbcf799384d779c2a561b9d9ba30f28e31d970
user: kfraser@localhost.localdomain
date: Thu Dec 07 11:52:26 2006 +0000
files: tools/ioemu/hw/usb-hid.c tools/ioemu/hw/usb-uhci.c
description:
[HVM] qemu mouse: Adds support for USB mouse/tablet status check and
restricts Universal Host Controller interrupt generating when received
NAK in interrupt transfer.
According to usb spec, USB mouse/tablet device returns NAK to host
controller if its status does not alter in interrupt transfer.
And UHC should leave a TD active when receiving NAK and execute this
incompleted TD in a subseqent frame. UHC only generates an interrupt
on complete after the TD with ICO bit is completed.
This patch make UHC & USB mouse/tablet behave consistently with spec.
Signed-off-by: Xinmei Huang <xinmei.huang@intel.com>
The tablet NAK support was already done in qemu, but there was still
what Xinmei Huang tell us is a spurious interrupt in the case of
submission for asynchronous completion.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>