Skip to content

Commit

Permalink
ehci: update irq on reset
Browse files Browse the repository at this point in the history
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
  • Loading branch information
kraxel committed Feb 2, 2016
1 parent 49d925c commit 5a86607
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions hw/usb/hcd-ehci.c
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,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;
Expand Down

0 comments on commit 5a86607

Please sign in to comment.