From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59646) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNJgG-0007Ut-1e for qemu-devel@nongnu.org; Fri, 29 Aug 2014 06:45:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XNJg7-0003d2-9l for qemu-devel@nongnu.org; Fri, 29 Aug 2014 06:45:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:61180) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNJg7-0003cu-2A for qemu-devel@nongnu.org; Fri, 29 Aug 2014 06:45:11 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s7TAjAFS007185 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 29 Aug 2014 06:45:10 -0400 From: Gerd Hoffmann Date: Fri, 29 Aug 2014 12:45:06 +0200 Message-Id: <1409309106-21147-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH] Revert "xhci: Fix number of streams allocated when using streams" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann This reverts commit d063c3112c4cd23a479ee18720c2bd119da2d315. "2 << x" is the same as "2 ^ (x + 1)", so the old code is correct. Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-xhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index 2c5c6f3..c63cadc 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -1151,7 +1151,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 + 1); + epctx->nr_pstreams = 2 << epctx->max_pstreams; epctx->pstreams = xhci_alloc_stream_contexts(epctx->nr_pstreams, base); } -- 1.8.3.1