Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp317090ybj; Wed, 6 May 2020 18:38:24 -0700 (PDT) X-Google-Smtp-Source: APiQypKw0sZO6wiZbGJiK4P3cS63czhBCUHckvbRKHUBtpvHC92ehidhiEx7zPXO8Gs2XX9ZzgBf X-Received: by 2002:a17:906:6a48:: with SMTP id n8mr9654387ejs.315.1588815504800; Wed, 06 May 2020 18:38:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588815504; cv=none; d=google.com; s=arc-20160816; b=pmw0OOSYCmxYsvEBBsAOFPggpxvHfbccQekLXuEB9h9g0J0nrtp+y/YNd8GxAf/BZE pCXeVHpmRoyr6kdh3TjiLPzJ40ZqoxOGv8e5tupBn3u4lsKAgkO+fehWhNzEq2AyPbyI BCb19C0a7hKTSJ8Hw5Um9BG5jgchWGNhHXgPhnFn/sE8NNRDVgX1Nr7H9Jz1PctiGOeD cJrqDVSh3MWfO9CSowdXLd0hQzHYkAW/vYjcM+n/JF9Nsnr0RGrHAJO7Wb2SklCb4Kfn rAYuQmwiaP7ChSx8Hes1yAe8OoePF78uUutrK4s95HbAFQDu3tAEsjCelLrmcFFMDFbJ MXJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=Wh9X0viLAqBaCyOgkq5YZkPRFay/niTUsTksW/b9xjc=; b=pfqOTK6lHc57fFu1VTuj1p7aesWUpBjtjEPYdFxeScsqjAmZm1RfG2pGAPeaVKpfa6 R7QGMqupNeY1TtLUOsbayN9++1ta7WdClrYkJsKgj2cGIqvBKBlqbadvIr7XDyHlpDDZ jnIkOfhpm/F6U+n5EHohR99c6y9O3Iiv3styndRarIg4/EzK5Zr8eR1qNHHodNOpZNS/ Ymd5e+Yj5v+SB2tkUWxH/khhdSLM8Z6RNdERFbgjZENt4R1HWMLOx1xWFka3yteRzMzI lobs8wbuQUKJg09FHChBISHGP0wP+y5JiWWOdeviE3wjQXb4EY7ZBlfMQPjG0G1egKKM nUEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CAKq1HaI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l18si2280786edf.202.2020.05.06.18.38.02; Wed, 06 May 2020 18:38:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CAKq1HaI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730162AbgEFW1z (ORCPT + 99 others); Wed, 6 May 2020 18:27:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729875AbgEFW1y (ORCPT ); Wed, 6 May 2020 18:27:54 -0400 Received: from mail-ot1-x343.google.com (mail-ot1-x343.google.com [IPv6:2607:f8b0:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5259AC061A41 for ; Wed, 6 May 2020 15:27:53 -0700 (PDT) Received: by mail-ot1-x343.google.com with SMTP id m18so2791527otq.9 for ; Wed, 06 May 2020 15:27:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=Wh9X0viLAqBaCyOgkq5YZkPRFay/niTUsTksW/b9xjc=; b=CAKq1HaIvs35k+7NyjoxmcRuziq+i6ov82ilXW4wZMUrNej7UtuwNVQkHNOAAco+1a /J3br1yYIYX9Km9PQxhLbZpUvZ/GqUlB3+M+8J9JbMZjxzl0G2OjtqJtB5FaBfgaoaZn UryVxJEI2uuCRYFnpd/5B2GsjBEVaXH1rfs3eoq8ysS464Ra+2ZrJhZ/gC5Vnlu6+kQY bQcTHmZfYWxG0eIqV8XgfJzNYhI0tR0jvpAAkUfkxnHlVYWptgMRtH6WKJHpe5Z5xAct 43LCYejXAM+DK03Qq7PKwjxh0eNyHgAnaNWFOPysYGKRgP17kqZQhn/jVllhC+UlScTB ZulQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=Wh9X0viLAqBaCyOgkq5YZkPRFay/niTUsTksW/b9xjc=; b=I6X3yTNKhKTEWUODh6Eq/KhXjvRHbMhjkwnquwPYDyM5fNIv2t2A29vMFVP2e7SC0/ Dtd2Ez4PnxoaKf2OiHY+bsW85Y8vXiVlt4A4QbMNcLJlqmnellOKSZb0c65vxB3Ox63U NS+A6JmjhXTmpgY+AH90L9WiDKqTvityWyt0D+YjeCPvHRcJO69eHZNo2QVWqama/rFy CBiRwXwFOks6WBR9N02pEJxpBeMjebb9AA0ciy9IwrfSFa4Xla+ztuMWJv/C+tcq/B/8 TjKb7kILeF6tJFVgMrfRtRVSvMlkr1psipYc7cMZEvnnFKHuHDK3EUSwkEfkBuvzeKs5 FokA== X-Gm-Message-State: AGi0PuY/+QIUT7ux6kJgXlpdxGcx/H3wnmRNAU4/HAHDQVDSv9Z4tM/r RVX5oN9i4XDZQHYXR8f9vVUGXHpFeBlLmC0SRZTlHg== X-Received: by 2002:a05:6830:1589:: with SMTP id i9mr8813654otr.102.1588804072594; Wed, 06 May 2020 15:27:52 -0700 (PDT) MIME-Version: 1.0 References: <20191028215919.83697-1-john.stultz@linaro.org> <20191028215919.83697-4-john.stultz@linaro.org> <87mudjj4rc.fsf@gmail.com> In-Reply-To: From: John Stultz Date: Wed, 6 May 2020 15:27:40 -0700 Message-ID: Subject: Re: [PATCH v4 3/9] usb: dwc3: Increase timeout for CmdAct cleared by device controller To: Jun Li Cc: Felipe Balbi , lkml , Yu Chen , Greg Kroah-Hartman , Rob Herring , Mark Rutland , ShuFan Lee , Heikki Krogerus , Suzuki K Poulose , Chunfeng Yun , Hans de Goede , Andy Shevchenko , Valentin Schneider , Jack Pham , Linux USB List , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 6, 2020 at 2:00 AM Jun Li wrote: > John Stultz =E4=BA=8E2019=E5=B9=B410=E6=9C=8830= =E6=97=A5=E5=91=A8=E4=B8=89 =E4=B8=8A=E5=8D=885:18=E5=86=99=E9=81=93=EF=BC= =9A > > On Tue, Oct 29, 2019 at 2:11 AM Felipe Balbi wrote: > > > John Stultz writes: > > > > From: Yu Chen > > > > > > > > It needs more time for the device controller to clear the CmdAct of > > > > DEPCMD on Hisilicon Kirin Soc. > > > > > > Why does it need more time? Why is it so that no other platform needs > > > more time, only this one? And which command, specifically, causes > > > problem? > > Sorry for my back to this so late. > > This change is required on my dwc3 based HW too, I gave a check > and the reason is suspend_clk is used in case the PIPE phy is at P3, > this slow clock makes my EP command below timeout. > > dwc3_gadget_ep_cmd: ep0out: cmd 'Set Endpoint Configuration' [401] > params 00001000 00000500 00000000 --> status: Timed Out > > Success case takes about 400us to complete, see below trace(44.286278 > - 44.285897 =3D 0.000381): > > configfs_acm.sh-822 [000] d..1 44.285896: dwc3_writel: addr > 000000006d59aae1 value 00000401 > configfs_acm.sh-822 [000] d..1 44.285897: dwc3_readl: addr > 000000006d59aae1 value 00000401 > ... ... > configfs_acm.sh-822 [000] d..1 44.286278: dwc3_readl: addr > 000000006d59aae1 value 00000001 > configfs_acm.sh-822 [000] d..1 44.286279: dwc3_gadget_ep_cmd: > ep0out: cmd 'Set Endpoint Configuration' [401] params 00001000 > 00000500 00000000 --> status: Successful > > Hi John, > > Do you still have this problem? if yes, What's the value of > USBLNKST[21:18] when the timeout happens? Sorry. As I mentioned, I was working to upstream a patchset that I hadn't created, so the context I had was limited. As I couldn't reproduce an issue without the change on the device I had, I figured it would be best to drop it. However, as you have some analysis and rational for why such a change would be needed, I don't have an objection to it. Do you want to resubmit the patch with your explanation and detailed log above in the commit message? thanks -john