From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54774) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNLZ9-0006sg-Ll for qemu-devel@nongnu.org; Fri, 29 Aug 2014 08:46:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XNLZ3-00086C-CQ for qemu-devel@nongnu.org; Fri, 29 Aug 2014 08:46:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40071) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNLZ3-000863-4A for qemu-devel@nongnu.org; Fri, 29 Aug 2014 08:46:01 -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 s7TCjwpa022547 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 29 Aug 2014 08:45:58 -0400 Message-ID: <54007603.8030503@redhat.com> Date: Fri, 29 Aug 2014 14:45:55 +0200 From: Hans de Goede MIME-Version: 1.0 References: <1409309106-21147-1-git-send-email-kraxel@redhat.com> In-Reply-To: <1409309106-21147-1-git-send-email-kraxel@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [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: Gerd Hoffmann , qemu-devel@nongnu.org Hi, On 08/29/2014 12:45 PM, Gerd Hoffmann wrote: > 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); > } > > Right, my bad. Acked-by: Hans de Goede Regards, Hans