From patchwork Fri Mar 2 18:32:28 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 144298 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 7ADB11007D4 for ; Sat, 3 Mar 2012 05:32:22 +1100 (EST) Received: from localhost ([::1]:49045 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S3XHA-00036s-B8 for incoming@patchwork.ozlabs.org; Fri, 02 Mar 2012 13:32:20 -0500 Received: from eggs.gnu.org ([208.118.235.92]:49061) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S3XG2-0000OX-On for qemu-devel@nongnu.org; Fri, 02 Mar 2012 13:31:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S3XFu-0006Ad-Fk for qemu-devel@nongnu.org; Fri, 02 Mar 2012 13:31:10 -0500 Received: from mx1.redhat.com ([209.132.183.28]:62223) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S3XFu-0006A1-7n for qemu-devel@nongnu.org; Fri, 02 Mar 2012 13:31:02 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q22IUwL9029489 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 2 Mar 2012 13:31:00 -0500 Received: from shalem.localdomain.com (vpn1-7-1.ams2.redhat.com [10.36.7.1]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q22IUltA003764; Fri, 2 Mar 2012 13:30:57 -0500 From: Hans de Goede To: Gerd Hoffmann Date: Fri, 2 Mar 2012 19:32:28 +0100 Message-Id: <1330713154-3229-8-git-send-email-hdegoede@redhat.com> In-Reply-To: <1330713154-3229-1-git-send-email-hdegoede@redhat.com> References: <1330713154-3229-1-git-send-email-hdegoede@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: Hans de Goede , qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH 07/13] usb-ehci: Any packet completion except for NAK should set the interrupt X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 --- hw/usb-ehci.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/usb-ehci.c b/hw/usb-ehci.c index d386b84..507e4a8 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); } }