diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2012-10-24 09:38:08 +0200 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2012-11-04 15:47:38 +0100 |
commit | 62db40d62044b9901acf6eafcb451fd4421c7ba3 (patch) | |
tree | 9cc55a5b08e82627f32356d2a07a9bf9bbcc9b55 | |
parent | fca28226db86f3ac85e80f42b10417c0a03ddc4f (diff) |
xhci: allow disabling interrupters
For secondary interrupters this is explicitly allowed in the specs.
For the primary interrupter behavior is undefined, lets be friendly
and allow disabling too.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-rw-r--r-- | hw/usb/hcd-xhci.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index c57f474cf..4bb5fc849 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -965,6 +965,12 @@ static void xhci_er_reset(XHCIState *xhci, int v) XHCIInterrupter *intr = &xhci->intr[v]; XHCIEvRingSeg seg; + if (intr->erstsz == 0) { + /* disabled */ + intr->er_start = 0; + intr->er_size = 0; + return; + } /* cache the (sole) event ring segment location */ if (intr->erstsz != 1) { fprintf(stderr, "xhci: invalid value for ERSTSZ: %d\n", intr->erstsz); |