From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:41155) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SpJ8T-0005vV-AB for qemu-devel@nongnu.org; Thu, 12 Jul 2012 09:08:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SpJ8M-0007iV-ED for qemu-devel@nongnu.org; Thu, 12 Jul 2012 09:08:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34525) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SpJ8M-0007hg-4r for qemu-devel@nongnu.org; Thu, 12 Jul 2012 09:08:42 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q6CD8eHj021372 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 12 Jul 2012 09:08:41 -0400 From: Gerd Hoffmann Date: Thu, 12 Jul 2012 15:08:37 +0200 Message-Id: <1342098519-23261-5-git-send-email-kraxel@redhat.com> In-Reply-To: <1342098519-23261-1-git-send-email-kraxel@redhat.com> References: <1342098519-23261-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 4/6] ehci: raise irq in the frame timer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann With the async schedule being kicked from other places than the frame timer (commit 0f588df8b3688b00e77aabaa32e26ece5f19bd39) it may happen that we call ehci_commit_interrupt() more than once per frame. Move the call from the async schedule handler to the frame timer to restore old irq behavior, which is more correct. Fixes regressions with some linux kernel versions. TODO: implement full Interrupt Threshold Control support. Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-ehci.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c index 080f62c..7c5f398 100644 --- a/hw/usb/hcd-ehci.c +++ b/hw/usb/hcd-ehci.c @@ -2208,8 +2208,6 @@ static void ehci_advance_state(EHCIState *ehci, int async) } } while (again); - - ehci_commit_interrupt(ehci); } static void ehci_advance_async_state(EHCIState *ehci) @@ -2389,6 +2387,8 @@ static void ehci_frame_timer(void *opaque) if (schedules) { qemu_mod_timer(ehci->frame_timer, expire_time); } + + ehci_commit_interrupt(ehci); } static void ehci_async_bh(void *opaque) -- 1.7.1