diff options
author | Hans de Goede <hdegoede@redhat.com> | 2013-09-16 17:03:03 +0200 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2013-09-17 18:56:22 +0200 |
commit | 777faad62bd53d9a7319dbd517edec2e80325b6b (patch) | |
tree | 8ce69f6d1bb29616c0e93a0cfcea0b23d727173d | |
parent | 6acdf1ddb58a6d6c235e19119f7f5ed6f9541824 (diff) |
xhci: Fix number of streams allocated when using streams
According to the xhci spec the total number of streams is
2 ^ (MaxPStreams + 1), and this is also how the Linux xhci driver
uses this field.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
-rw-r--r-- | hw/usb/hcd-xhci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index 2f0f8110b..6e73cede8 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -1122,7 +1122,7 @@ static void xhci_reset_streams(XHCIEPContext *epctx) static void xhci_alloc_streams(XHCIEPContext *epctx, dma_addr_t base) { assert(epctx->pstreams == NULL); - epctx->nr_pstreams = 2 << epctx->max_pstreams; + epctx->nr_pstreams = 2 << (epctx->max_pstreams + 1); epctx->pstreams = xhci_alloc_stream_contexts(epctx->nr_pstreams, base); } |