From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:47839) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QkEPx-0001eG-Ok for qemu-devel@nongnu.org; Fri, 22 Jul 2011 08:01:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QkEPu-0005ow-HS for qemu-devel@nongnu.org; Fri, 22 Jul 2011 08:01:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:22051) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QkEPt-0005od-Vm for qemu-devel@nongnu.org; Fri, 22 Jul 2011 08:01:18 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p6MC1EtT004399 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 22 Jul 2011 08:01:14 -0400 From: Gerd Hoffmann Date: Fri, 22 Jul 2011 14:01:04 +0200 Message-Id: <1311336066-31205-3-git-send-email-kraxel@redhat.com> In-Reply-To: <1311336066-31205-1-git-send-email-kraxel@redhat.com> References: <1311336066-31205-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 2/4] usb-uhci: fix irq handling on error. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann Spec on UHCI_STS_USBERR: "If the TD on which the error interrupt occurred also had its IOC bit set, both this bit and Bit 0 are set." Make UHCI emulation do that. Signed-off-by: Gerd Hoffmann --- hw/usb-uhci.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/hw/usb-uhci.c b/hw/usb-uhci.c index 2ef4c5b..da74c57 100644 --- a/hw/usb-uhci.c +++ b/hw/usb-uhci.c @@ -730,6 +730,9 @@ out: td->ctrl |= TD_CTRL_STALL; td->ctrl &= ~TD_CTRL_ACTIVE; s->status |= UHCI_STS_USBERR; + if (td->ctrl & TD_CTRL_IOC) { + *int_mask |= 0x01; + } uhci_update_irq(s); return 1; @@ -737,6 +740,9 @@ out: td->ctrl |= TD_CTRL_BABBLE | TD_CTRL_STALL; td->ctrl &= ~TD_CTRL_ACTIVE; s->status |= UHCI_STS_USBERR; + if (td->ctrl & TD_CTRL_IOC) { + *int_mask |= 0x01; + } uhci_update_irq(s); /* frame interrupted */ return -1; -- 1.7.1