Patchwork [04/11] xhci: fix endpoint interval calculation

login
register
mail settings
Submitter Gerd Hoffmann
Date Sept. 2, 2013, 10:17 a.m.
Message ID <1378117055-29620-5-git-send-email-kraxel@redhat.com>
Download mbox | patch
Permalink /patch/271861/
State New
Headers show

Comments

Gerd Hoffmann - Sept. 2, 2013, 10:17 a.m.
Cc: qemu-stable@nongnu.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/usb/hcd-xhci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index 4d693bc..3826979 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -1274,7 +1274,7 @@  static void xhci_init_epctx(XHCIEPContext *epctx,
         epctx->ring.ccs = ctx[2] & 1;
     }
 
-    epctx->interval = 1 << (ctx[0] >> 16) & 0xff;
+    epctx->interval = 1 << ((ctx[0] >> 16) & 0xff);
 }
 
 static TRBCCode xhci_enable_ep(XHCIState *xhci, unsigned int slotid,