From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51607) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ai3dt-0001qa-4J for qemu-devel@nongnu.org; Mon, 21 Mar 2016 13:29:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ai3dn-0000xa-8K for qemu-devel@nongnu.org; Mon, 21 Mar 2016 13:29:25 -0400 Received: from e37.co.us.ibm.com ([32.97.110.158]:45882) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ai3dm-0000vq-W9 for qemu-devel@nongnu.org; Mon, 21 Mar 2016 13:29:19 -0400 Received: from localhost by e37.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 21 Mar 2016 11:29:17 -0600 From: Michael Roth Date: Mon, 21 Mar 2016 12:28:16 -0500 Message-Id: <1458581313-19045-19-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1458581313-19045-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1458581313-19045-1-git-send-email-mdroth@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 18/35] ehci: update irq on reset List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Michael Roth , qemu-stable@nongnu.org, Gerd Hoffmann From: Gerd Hoffmann After clearing the status register we also have to update the irq line status. Otherwise a irq which happends to be pending at reset time causes a interrupt storm. And the guest can't stop as the status register doesn't indicate any pending interrupt. Both NetBSD and FreeBSD hang on shutdown because of that. Cc: qemu-stable@nongnu.org Reported-by: Andrey Korolyov Signed-off-by: Gerd Hoffmann Message-id: 1453203884-4125-1-git-send-email-kraxel@redhat.com (cherry picked from commit 5a8660741a8aa19fbf8a5e8a2b3aac88664f4e66) Signed-off-by: Michael Roth --- hw/usb/hcd-ehci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c index d07f228..d2b7fa2 100644 --- a/hw/usb/hcd-ehci.c +++ b/hw/usb/hcd-ehci.c @@ -865,6 +865,7 @@ void ehci_reset(void *opaque) s->usbsts = USBSTS_HALT; s->usbsts_pending = 0; s->usbsts_frindex = 0; + ehci_update_irq(s); s->astate = EST_INACTIVE; s->pstate = EST_INACTIVE; -- 1.9.1