[{"id":1773272,"web_url":"http://patchwork.ozlabs.org/comment/1773272/","msgid":"<50969736-7508-f297-d7b3-bb5fbb99cdac@denx.de>","list_archive_url":null,"date":"2017-09-22T05:12:24","subject":"Re: [U-Boot] [PATCH 13/14] usb: xhci: Set 'Error Count' to 0 for\n\tisoch endpoints","submitter":{"id":13,"url":"http://patchwork.ozlabs.org/api/people/13/","name":"Stefan Roese","email":"sr@denx.de"},"content":"On 18.09.2017 15:40, Bin Meng wrote:\n> Per xHCI spec, 'Error Count' should be set to 0 for isoch endpoints.\n> \n> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>\n> ---\n> \n>   drivers/usb/host/xhci.c | 6 +++++-\n>   1 file changed, 5 insertions(+), 1 deletion(-)\n> \n> diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c\n> index dfb188d..93737b0 100644\n> --- a/drivers/usb/host/xhci.c\n> +++ b/drivers/usb/host/xhci.c\n> @@ -511,6 +511,7 @@ static int xhci_set_configuration(struct usb_device *udev)\n>   \tunsigned int mult;\n>   \tunsigned int max_burst;\n>   \tunsigned int avg_trb_len;\n> +\tunsigned int err_count = 0;\n>   \n>   \tout_ctx = virt_dev->out_ctx;\n>   \tin_ctx = virt_dev->in_ctx;\n> @@ -588,9 +589,12 @@ static int xhci_set_configuration(struct usb_device *udev)\n>   \t\t\tcpu_to_le32(MAX_PACKET\n>   \t\t\t(get_unaligned(&endpt_desc->wMaxPacketSize)));\n>   \n> +\t\t/* Allow 3 retries for everything but isoc, set CErr = 3 */\n> +\t\tif (!usb_endpoint_xfer_isoc(endpt_desc))\n> +\t\t\terr_count = 3;\n>   \t\tep_ctx[ep_index]->ep_info2 |=\n>   \t\t\tcpu_to_le32(MAX_BURST(max_burst) |\n> -\t\t\t((3 & ERROR_COUNT_MASK) << ERROR_COUNT_SHIFT));\n> +\t\t\tERROR_COUNT(err_count));\n>   \n>   \t\ttrb_64 = (uintptr_t)\n>   \t\t\t\tvirt_dev->eps[ep_index].ring->enqueue;\n> \n\nReviewed-by: Stefan Roese <sr@denx.de>\nTested-by: Stefan Roese <sr@denx.de>\n\nThanks,\nStefan","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xz1nY3m7wz9ryr\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 22 Sep 2017 15:12:33 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid 386D8C21F69; Fri, 22 Sep 2017 05:12:30 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 094C8C21D55;\n\tFri, 22 Sep 2017 05:12:29 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid 06B55C21D55; Fri, 22 Sep 2017 05:12:27 +0000 (UTC)","from mx1.mailbox.org (mx1.mailbox.org [80.241.60.212])\n\tby lists.denx.de (Postfix) with ESMTPS id B9AF1C21C29\n\tfor <u-boot@lists.denx.de>; Fri, 22 Sep 2017 05:12:27 +0000 (UTC)","from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby mx1.mailbox.org (Postfix) with ESMTPS id C2E2445932;\n\tFri, 22 Sep 2017 07:12:26 +0200 (CEST)","from smtp1.mailbox.org ([80.241.60.240])\n\tby hefe.heinlein-support.de (hefe.heinlein-support.de\n\t[91.198.250.172]) (amavisd-new, port 10030)\n\twith ESMTP id c5hP_oNv6KaI; Fri, 22 Sep 2017 07:12:25 +0200 (CEST)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW\n\tautolearn=unavailable autolearn_force=no version=3.4.0","X-Virus-Scanned":"amavisd-new at heinlein-support.de","To":"Bin Meng <bmeng.cn@gmail.com>, Marek Vasut <marex@denx.de>,\n\tU-Boot Mailing List <u-boot@lists.denx.de>","References":"<1505742050-5697-1-git-send-email-bmeng.cn@gmail.com>\n\t<1505742050-5697-14-git-send-email-bmeng.cn@gmail.com>","From":"Stefan Roese <sr@denx.de>","Message-ID":"<50969736-7508-f297-d7b3-bb5fbb99cdac@denx.de>","Date":"Fri, 22 Sep 2017 07:12:24 +0200","MIME-Version":"1.0","In-Reply-To":"<1505742050-5697-14-git-send-email-bmeng.cn@gmail.com>","Content-Language":"en-US","Subject":"Re: [U-Boot] [PATCH 13/14] usb: xhci: Set 'Error Count' to 0 for\n\tisoch endpoints","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","Content-Transfer-Encoding":"base64","Content-Type":"text/plain; charset=\"utf-8\"; Format=\"flowed\"","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"}}]