From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46581) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNKuZ-0007re-Fy for qemu-devel@nongnu.org; Fri, 29 Aug 2014 08:04:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XNKuT-0003Xt-7h for qemu-devel@nongnu.org; Fri, 29 Aug 2014 08:04:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36105) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNKuT-0003Xc-1E for qemu-devel@nongnu.org; Fri, 29 Aug 2014 08:04:05 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s7TC44hO011143 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 29 Aug 2014 08:04:04 -0400 From: Gerd Hoffmann Date: Fri, 29 Aug 2014 14:03:40 +0200 Message-Id: <1409313832-2514-6-git-send-email-kraxel@redhat.com> In-Reply-To: <1409313832-2514-1-git-send-email-kraxel@redhat.com> References: <1409313832-2514-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PULL 05/17] 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 f7f9fed..88660e8 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