]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
ehci: update irq on reset
authorGerd Hoffmann <kraxel@redhat.com>
Tue, 19 Jan 2016 11:44:44 +0000 (12:44 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Thu, 17 Mar 2016 21:41:14 +0000 (16:41 -0500)
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 <andrey@xdel.ru>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 1453203884-4125-1-git-send-email-kraxel@redhat.com
(cherry picked from commit 5a8660741a8aa19fbf8a5e8a2b3aac88664f4e66)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/usb/hcd-ehci.c

index d07f228df8c64932dddaaf3d318c2a49f2459320..d2b7fa2ff89448c97c2ecfd283abc6898e079f6e 100644 (file)
@@ -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;