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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 2B0F1C001DE for ; Fri, 4 Aug 2023 19:11:44 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3D08786975; Fri, 4 Aug 2023 21:11:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (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=1691176302; bh=1UzvloWFANGlLXX5wlQ3mDHyrKWBhcUKBK/WUoshPXE=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=PpgI7EBNf6+PUQruKkfI8BXrcgx3emfk5eCPQhbLZdGj2QQVngVA9ynYG4miavvbJ 2Ajd8ZVjLrY95f4WJLfW5qyqB2dxV1aS5/SErgM7Km2FWbimZjCeJmPTFTxX4OpkQz 8rH/SlMtijVi7EaGT87vkBhWhr4wVDSf8ePdvQPFzqBDf4ICNBv0LHTpEcI0cAVX13 eK6tYJvH21/MQa40MsM7LPcK/ifVx5UpvpjNAPMTJiDtOemvyNBFp55VWqpByPT7uf fPeR1+zypP6iZaSH+24FUwFvqRVfta8kbn2OeRKWZD98vTVlC8CGjiUlKWD5I2hLdW 7EKSxCqpS1Fpg== Received: from [127.0.0.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 A722986969; Fri, 4 Aug 2023 21:11:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1691176300; bh=1UzvloWFANGlLXX5wlQ3mDHyrKWBhcUKBK/WUoshPXE=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=dvdy7TUS2VswnVDlCRzj0WR883U5QVW3SLNHB6cYOHFEbt91QhhABf/H6kPjHlaPh BL6ObLrmt5D99j4ZhoMW+pOkSmtbdEfgzkZfGTn/7XApw24XNYt3tNY3ZHThvz/Y94 reLKah3qr6mTFkHUO4qeYTTwGKH/9UPF9B/u7M28vSgwp7vJLh9elpXtBAjPnQKjaT wqN6CaGbSR6m+SCXroTCZZBl0TRy/AjoLU+qsUEKjMjQFytaTHJ5TYmlOjbjsYH3pK AgsH1KHX5YkOr488PNBfyOQTrbEWXNJ3+93b6paulK42ngAru88gKSXJjt9yxCs+sd R9BGCxKJQCsug== Message-ID: <89e4d10e-f22b-eaf3-d7fe-e80dc41a8106@denx.de> Date: Fri, 4 Aug 2023 21:11:40 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.1 Subject: Re: [PATCH] usb: xhci: pet watchdog during transfers Content-Language: en-US To: seanedmond@linux.microsoft.com, u-boot@lists.denx.de Cc: bmeng.cn@gmail.com References: <20230804190039.72143-1-seanedmond@linux.microsoft.com> From: Marek Vasut In-Reply-To: <20230804190039.72143-1-seanedmond@linux.microsoft.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean On 8/4/23 21:00, seanedmond@linux.microsoft.com wrote: > From: Godfrey Mwangi > > On some platforms with low USB throughput, tranfers > of huge files take a long time and watchdog timer can > expire resulting in hardware reset. Avoid this by > petting the watchdog as long as we have pending transfers. > > Signed-off-by: Godfrey Mwangi > --- > drivers/usb/host/xhci-ring.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c > index c8260cbdf9..de954314bc 100644 > --- a/drivers/usb/host/xhci-ring.c > +++ b/drivers/usb/host/xhci-ring.c > @@ -18,6 +18,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -758,6 +759,8 @@ int xhci_bulk_tx(struct usb_device *udev, unsigned long pipe, > /* Calculate length for next transfer */ > addr += trb_buff_len; > trb_buff_len = min((length - running_total), TRB_MAX_BUFF_SIZE); > + > + schedule(); > } while (running_total < length); > > giveback_first_trb(udev, ep_index, start_cycle, start_trb); s@pet@ping@ or trigger . With that fixed: Reviewed-by: Marek Vasut Thanks !