Received: by 10.223.185.111 with SMTP id b44csp85518wrg; Fri, 9 Mar 2018 01:24:58 -0800 (PST) X-Google-Smtp-Source: AG47ELuq1ckJn3Bb5vqM/kWRxygKqCZTXCzCEhl2Ici0CV1EhZuHUN6tMeUs2v/WbiTKCMAoA8ay X-Received: by 2002:a17:902:8f97:: with SMTP id z23-v6mr27078833plo.162.1520587498191; Fri, 09 Mar 2018 01:24:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520587498; cv=none; d=google.com; s=arc-20160816; b=nIzHAYhDYP5/IrGl2oJvMDsJjsvrXBCi0wprCYxVa9+WZPm06wbPFCf6vIOTieVfRY Ac4Y/HAWOY0zepU1k6f+u5Ne4JBz1sNaWVKepzJw5riURgjgDjHfKJqx3RsSFLP9l90K pEkzihcoT2pLpcu/SxG/TF33DaLP9ci0BbwWToSqQFmr9+Jma0NbqHbVfqyf7qvwrL3D OtgBIHWDE4g6Ox+yJEf5qk4A/EavmTJCn8qwPs5GnTDECzxfT9giqizSBE01dWqDNd3T AVFn8m5CW0EavhCC6JdE5Y+XcTtLhmyeQcZ12ZzW5s64uJB3BtRiICkU9alRXBQT18ht pw0w== 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:arc-authentication-results; bh=8sfCfYEnmGx8qNcOvtXl3+/Qvo12nHjGhjpCZv5atEc=; b=UPFyHiEAlbPMYKFyCNbIddSLIbgh6xnvz9sHiz/pA7wW/sT/UfigMt44Qbv9x3M4nq HAyVIXXVeg1bI3bT6yCmAVMz0YwhnT6JcuLrOoGpd3mZR40gGvi4KeExYacF6ICSitaK d97XxFAkz7HSIBhUWHH+TPLb2Q307KfEocw0ZgAbsTDLw+7Vr9HE6x3yWC0yJppiwypE lociGTSGpqcLImKo9GBLVkZEIRR9ODpaoGikdVnN0MqJ4HkEZjrgcPBgClEozLoLU7rD qGvr8RnIyMT+tw3yHVvjT8ZzpyCicE3Xh7ZTYM77fMW9mL9n3QuJul8ctH2K09aHY3JU qftA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w9-v6si530444plp.425.2018.03.09.01.24.43; Fri, 09 Mar 2018 01:24:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750993AbeCIJXa (ORCPT + 99 others); Fri, 9 Mar 2018 04:23:30 -0500 Received: from mga05.intel.com ([192.55.52.43]:50851 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750869AbeCIJX3 (ORCPT ); Fri, 9 Mar 2018 04:23:29 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Mar 2018 01:23:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,444,1515484800"; d="asc'?scan'208";a="24232001" Received: from pipin.fi.intel.com (HELO localhost) ([10.237.68.37]) by orsmga006.jf.intel.com with ESMTP; 09 Mar 2018 01:23:27 -0800 From: Felipe Balbi To: Roger Quadros , Baolin Wang Cc: USB , LKML Subject: Re: [PATCH] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume In-Reply-To: <5bc56ef5-66b1-d40c-1639-e748fe18cdbd@ti.com> References: <1519730526-22274-1-git-send-email-rogerq@ti.com> <87sh9l5z4l.fsf@linux.intel.com> <94cd6377-1327-2309-8d69-6ab0de2bdfd4@ti.com> <87po4i3o1v.fsf@linux.intel.com> <87k1uq3ho6.fsf@linux.intel.com> <8ec0485e-89af-568b-e34a-b0cd490817d0@ti.com> <87h8puwyn5.fsf@linux.intel.com> <5bc56ef5-66b1-d40c-1639-e748fe18cdbd@ti.com> Date: Fri, 09 Mar 2018 11:23:19 +0200 Message-ID: <87muzha9h4.fsf@linux.intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; 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 Content-Transfer-Encoding: quoted-printable Hi, Roger Quadros writes: >>> When we set up the DWC3_DEPCMD_ENDTRANSFER command in >>> dwc3_stop_active_transfer(), we can do not set DWC3_DEPCMD_CMDIOC, >>> then there will no endpoint command complete interrupts I think. >>> >>> cmd |=3D DWC3_DEPCMD_CMDIOC; >>=20 >> I remember some part of the databook mandating CMDIOC to be set. We >> could test it out without and see if anything blows up. I would, >> however, require a lengthy comment explaining that we're deviating from >> databook revision x.yya, section foobar because $reasons. :-) >>=20 > > This is what the v3.10 databook says > > "When issuing an End Transfer command, software must set the CmdIOC > bit (field 8) so that an Endpoint Command Complete event is generated > after the transfer ends. This is necessary to synchronize the > conclusion of system bus traffic before the End Transfer command is > completed." > > with a note > > "If GUCTL2[Rst_actbitlater] is set, Software can poll the completion > of the End Transfer command by polling the command active bit to be > cleared to 0." > > fyi. > > Rst_actbitlater - "Enable clearing of the command active bit for the > ENDXFER command after the command execution is completed. This bit is > valid in device mode only." > > So I'd prefer not to clear CMDIOC for all cases. > > Could we some how just tackle the dwc3_gadget_exit case like I did in > this patch? if you can send a version that doesn't iterate over all endpoints twice, sure. We still need a comment somewhere, and I fear we may get interrupts later in some cases. How would we deal with that? =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEElLzh7wn96CXwjh2IzL64meEamQYFAlqiUocACgkQzL64meEa mQbDNRAAlQAftJ6UAfjPtOiHl04ULWtantMA+aTybY9FVEVs7XHuL/a4DQU3BrFa KTceNsZLgTlYO5d9sn3dXiBc2U5qsj7mwLS1Tne4HdizFCiLB/nQFz5xLOQLckRM xeScvVRDRa05HeaJhipnVUyH9/eKV4rXgXcW6bOEtSIzU5Be49GxZR2rOyZShuI4 Xc9Ab7D0idZZ3KkxZFu9cEXB/lzvmrNPYcW9wL8ZvpagEzTJE4vr0bqWXIbT7acY tTgAQA1AtVOFOfcIe6+q1Ek5M+hEmuvzxsvEAhgG4pLmzHtFNr2d7RiU0A6pvEG9 kakaWsO8IoC+m1tyAdsAMDYVOnC5fuvfAQ0NS+7eo1Fp5Q3gvT6WCCvuaRgvFMeA dNMgdSZYoFoe1UFSLk81qp2VNkThJSHmY9z+zYnoISiEsU+ORqPP4C4Owq6F5i1m rDbBNgq7bTTfcsex7E+S1FDJ7ahFa9MWxc89HiccH9aNlS3z4+HoMhWxAcieO8qB 26mOAKN9jL9Ok8OfB5bnUQ0Cx0/qyYzFOKrOfDn7V4nzY1xYcn5CzYCLrRWri/Sa CWAJQ7s7EBw10V0hnbq/dKJPe+hFKJFuPw97qZqkj1KJ+MpEwjLH/7ZHxJgGH7YO aG0MU5A9cm66AOn011Dit6mHmgFLuv8WRCetfRmw1Yasp14pAhA= =yZpY -----END PGP SIGNATURE----- --=-=-=--