From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BB27BC433F5 for ; Mon, 27 Sep 2021 15:14:21 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C392760F44 for ; Mon, 27 Sep 2021 15:14:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C392760F44 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 563E181BC8; Mon, 27 Sep 2021 17:14:18 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1632755658; bh=UrmVph9z+OqDmGsPc5iQZF6WWB+a8LSLf8yqk+4NpP8=; h=Subject:To:Cc:References:From:Date:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=t/fhLKkSekyl3j/NOm7qfnFz7leJIIxyj6Cwty23GSrdLzeul7aEErVyX3PupL2vB L7RxmcKYn02xWTLVn8S9UXwxObV492RMhUpUpBjhkrBzvTWRoxtaO2cMwWhJZnkAUM eSvPFWvIaH3JjHp38xctzkKEuqj0XhhjUfEs7BhYLW/SYEhsXBgHlRc+rKYQm2P2wt aIIReAPckMDefHi0wEGSnTuVQ55KfGY4CEALq1RVwt9DMLkbMBo1rRvTh01eap/Lrg l7Pz/ukT57mwwIde9NMwgzs/Jqw0LWb89Nijn4A2baGV0GGJmfGKTjU7iAqF4T8cYU Y+lR70eYJaX7w== Received: from [IPv6:::1] (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 95F2880257; Mon, 27 Sep 2021 17:14:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1632755655; bh=UrmVph9z+OqDmGsPc5iQZF6WWB+a8LSLf8yqk+4NpP8=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=g7JUOc7bIojRTwuHUpzVF2GuxMAER2XuRsC6jckYCLqoQQb7eFVewgznv8SR5KpXE lHxF+OekVvOipoo/t+ELyw4LRgfHqBb4PwuFtwZVi9GTrqGRCptA7eu7KLnBlbkUg8 ifJ2V1++mQY0vKuxxPCMdDmyv7uvVdOZJsevYAMsZBnkyn2XDjoz9DizxsRznlipmU zrLzOy/YbhfQdo4ao4ISnx4u9tT/tcEKOKV01oYyHD/twWNxGR4mi1HQA2/EHHqMBc MKL2cLARMBgDzNjRcuH+IcNPY9AhzN9nZXzLJeSRSB/eFw3mtG04ya9aAeJHqS3A2/ MOnTXDrrhndmA== Subject: Re: [PATCH] usb: xhci: reset endpoint on USB stall To: Stefan Agner , u-boot@lists.denx.de, bmeng.cn@gmail.com Cc: mike.hoogstraten@walsumlaan.nl References: From: Marek Vasut Message-ID: <3d4ece94-932a-25dd-ef29-0ddfb4a51465@denx.de> Date: Mon, 27 Sep 2021 17:14:15 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On 9/27/21 2:42 PM, Stefan Agner wrote: > There are devices which cause a USB stall when trying to read strings. > Specifically Arduino Mega R3 stalls when trying to read the product > string. > > The stall currently remains unhandled, and subsequent retries submit new > transfers on a stopped endpoint which ultimately cause a crash in > abort_td(): > WARN halted endpoint, queueing URB anyway. > XHCI control transfer timed out, aborting... > Unexpected XHCI event TRB, skipping... (3affe040 00000000 13000000 02008401) > BUG at drivers/usb/host/xhci-ring.c:505/abort_td()! > BUG! > resetting ... > > Linux seems to be able to recover from the stall by issuing a > TRB_RESET_EP command. > > Introduce reset_ep() which issues a TRB_RESET_EP followed by setting the > transfer ring dequeue pointer via TRB_SET_DEQ. This allows to properly > recover from a USB stall error and continue communicating with the USB > device. > > Signed-off-by: Stefan Agner I hope to get AB/RB from Bin here, then it can go into this release I think.