OSDN Git Service

xhci: fix endpoint interval calculation
authorGerd Hoffmann <kraxel@redhat.com>
Wed, 28 Aug 2013 09:39:02 +0000 (11:39 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 2 Sep 2013 09:06:19 +0000 (11:06 +0200)
Cc: qemu-stable@nongnu.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/usb/hcd-xhci.c

index 4d693bc..3826979 100644 (file)
@@ -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,