Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp18467ybj; Fri, 8 May 2020 05:38:06 -0700 (PDT) X-Google-Smtp-Source: APiQypKScTT7thDruv9tWeGNlSAgPbgyIExf1ENWSNPT8X21b0A6cpHc/Dh/JMG3tYXFUeLr7ky1 X-Received: by 2002:a05:6402:1d15:: with SMTP id dg21mr2028148edb.13.1588941486124; Fri, 08 May 2020 05:38:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588941486; cv=none; d=google.com; s=arc-20160816; b=mWUgTOimlbZtg2LStf71oPfm3ac0Im+Tzma5I9ncSx+lJiMK5IXs67Zuk8RN0Xh2uw VX7fNU6NiCWnTRKv2s5iqQnYw2lQSjxlA9P/xnO7U23RmfHNh2lndYdM2dXZFKLQjcgH qO4fi0Sk5KXjWDFODIgvxTFi01e/HbD3BgyzOErO87LYrdU4kaDk8MWqed6FqF/9wbCM Q0kT0BYUT1mcqIkCyEI8julTqEfKojhQnHu93qFivq0JOpyY6NhLSctWiJxyqqvIOJUH hvvxDT+J+OvQcBihlDw56zUaQHckbmIn3hjXXHwSEqbAxQUW6B1SVfwNDcyEb483jTWi HtFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=71j6PMRO3vVpRcVHQ+g+fJbWnjsKtLz5FDZRpYbeeK8=; b=CDAge2jwGmMTV6Sk0IiQpczGgRJNhUVdLJdNaBjIpsw/PNJBPog0jPuH6gJszTLKC3 Xd6u5W21Dmh0qIkrdK7gHedkjy/P4eYmzzV35TK7CtbGDoeM+5s4d6kqcOJDRkoOZG2W E6Ad0bUwD5vXfQa63G9F3iHRSmlMbav200unizmI/rZLGG2WsoRXVl0TUgQSc6X1JtE6 w9TlKxafwpPN1jF2aViXOWOT0yXrYTKLEe3R9KPbTbMuTvArY9Y7++1cIrPfa/Pzd1fu WpAOVhMsaLUefUEVzuagfk+FSUkIGs/RrSuIUzya77WuA1EffWwK07FKG1cYmcEmS7Lm yjKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=tUWQeYAR; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u30si835506edi.376.2020.05.08.05.37.43; Fri, 08 May 2020 05:38:06 -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=fail header.i=@gmail.com header.s=20161025 header.b=tUWQeYAR; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727083AbgEHMfb (ORCPT + 99 others); Fri, 8 May 2020 08:35:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726616AbgEHMfa (ORCPT ); Fri, 8 May 2020 08:35:30 -0400 Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3DE8AC05BD43; Fri, 8 May 2020 05:35:30 -0700 (PDT) Received: by mail-lj1-x242.google.com with SMTP id o14so429926ljp.4; Fri, 08 May 2020 05:35:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=71j6PMRO3vVpRcVHQ+g+fJbWnjsKtLz5FDZRpYbeeK8=; b=tUWQeYARS4BEfMt1TTgN71TJ1Ksnk5T7uMRPVcYKyhA9yTWNuzH14mt/1ju4/2WgLS b1oGaW517E8BRXHtASVU3CtT4eIw9x7lG5x9+jaSniyfUMtMhv2iocA6ho2nRXTfDqZo Y5Nbb4/q6TBxX4ezIB86poffH9bCEhp3VvgrrwGP/gn9LFNx2jVuQoLfvjOSpWtfUJmJ oup+kMx5pDf0Y86dglBhOEXzfEDaoCGCj3OttCjet8wLmcRZwLt1YYgbGzhxN0OHIluh BkdlcVZpYsUb1Esyuo+pTvjfEMlURRsR1g9GySepXqPoWUE8QL7hhOZNc5lgXvtQkz3g j0EA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:in-reply-to:references :date:message-id:mime-version; bh=71j6PMRO3vVpRcVHQ+g+fJbWnjsKtLz5FDZRpYbeeK8=; b=mS8D8FKGfQmZGfsnmpU2leN3jO/KEMz+dGcEWlMv7CgvBAx/3govULClb6n1/3urbs xUJJ/ZMuXuu612K8p30Q1AGSOj9khDFoAMQiZJF+yeuiX4kS4PmNNk4rnu9bm2oPvV8Z SHtDjW1kBMZLb/stPtrwB3Afp40/5SOwNAkjQyz0qkHxGKWpfESZ2tZgFe7nJecBqeAO aJ3NcSnaH3k1cl0F6Txzq0nLGkU/ScSnBM1ml0TkMYkaExyx1kYunMZjbmlD6PVyjMJd 98cIflgUwiA4QK/e8SoQAVouWn0oU+r+zU976vIazcv8vyTug67rkkXBYDijVH6N1aO5 1suQ== X-Gm-Message-State: AOAM5313GAk8ZE6ZgHLU846zu5G6uvUyqaSoPRBJlo5GWw8oARpQgjO4 sZ0q8PmVBYTsL66iUK7m1vJsWSVl+tA= X-Received: by 2002:a2e:9258:: with SMTP id v24mr1557337ljg.109.1588941328356; Fri, 08 May 2020 05:35:28 -0700 (PDT) Received: from saruman (91-155-214-58.elisa-laajakaista.fi. [91.155.214.58]) by smtp.gmail.com with ESMTPSA id s7sm1107753lfb.40.2020.05.08.05.35.27 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 08 May 2020 05:35:27 -0700 (PDT) From: Felipe Balbi To: Jun Li , John Stultz Cc: 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" Subject: Re: [PATCH v4 3/9] usb: dwc3: Increase timeout for CmdAct cleared by device controller In-Reply-To: References: <20191028215919.83697-1-john.stultz@linaro.org> <20191028215919.83697-4-john.stultz@linaro.org> <87mudjj4rc.fsf@gmail.com> Date: Fri, 08 May 2020 15:35:23 +0300 Message-ID: <87eerumwok.fsf@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, Jun Li writes: > Jun Li =E4=BA=8E2020=E5=B9=B45=E6=9C=887=E6=97= =A5=E5=91=A8=E5=9B=9B =E4=B8=8A=E5=8D=8811:08=E5=86=99=E9=81=93=EF=BC=9A >> >> John Stultz =E4=BA=8E2020=E5=B9=B45=E6=9C=887= =E6=97=A5=E5=91=A8=E5=9B=9B =E4=B8=8A=E5=8D=886:27=E5=86=99=E9=81=93=EF=BC= =9A >> > >> > 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 wr= ote: >> > > > > John Stultz writes: >> > > > > > From: Yu Chen >> > > > > > >> > > > > > It needs more time for the device controller to clear the CmdA= ct 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. >> >> That was fine. >> > >> > 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? >> >> Sure, I will resubmit the patch with my explanation added in commit mess= age. > > Hi John > > A second think of this, I feel use readl_poll_timeout_atomic() to wait by= time > is more proper here, so I create a new patch to address this also other > registers polling, see below patch with you CCed: > > https://patchwork.kernel.org/patch/11536081/ Fixing a bug has nothing to do with using readl_poll_timeout_atomic(). Please don't mix things as it just makes review time consuming. Let's find out what the bug is all about, only then should we consider moving over to readl_poll_timeout_atomic(). =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEElLzh7wn96CXwjh2IzL64meEamQYFAl61UgsACgkQzL64meEa mQbuBA//dEmweQ1Dhcmw8Sut1NUrlcQMQrzZdVo9W36wzV03PjQ8ycIqdiuQ8e+i ZzlTZJkLVkHTICp7ksAcTwma7rJummOyXjuI9niBE7B/zkRB13bYZh7kQ2NgNoPj +vDa5e050OsrpWyzIP1k64jAtz7KReUMRuIQtMxl1xYDuVxjWjXe91Z71R4BDIza QQET0+jPqyinzXEhsC1Gh9yuoyyzfzU+XQjWoa5m70S9RFvH3FPv0Y8LXBWCb9lN 7++e7RUKzlOlGu973kXWgH8sN9dxxFjxZQnY3wELfirDDN0+9/bpJfFg0lYW9mHH UNtPcYD7TPXGfzz2wxM0MO3AOi17HXJ6mdG2DlDcJ9Desw1wn2GXt46mJoRODG3o 7qnrkp7zBs59MnTomBmgAoF3L2eylMCDCKmn9feaJy85FJDB3a0b5hgUpcegwbF6 JG9iff08jmIrfawITlFsbUVhA2hLL9YYj903JxoU7NEyoqdwXZzjY7Jd4Jz3QW4N 9myaG5DiJ+zFglnj83awlH1rBAoPwfKZ1Ojv57zGBDHWpjKT+3LoJ/gtE6eEv0Kk Vzb9Na1D3dCBD0x4SVdiYAf9yocFsQqkjZnjlxu4X8LzZC7eYM7aV9vS7+FpTuxe 58u16XtqKkFuq5EYWcNIZVlJYPyo6KOlMatddTVO+cvzkLDrEsc= =0L/w -----END PGP SIGNATURE----- --=-=-=--