Received: by 10.213.65.68 with SMTP id h4csp3564096imn; Tue, 10 Apr 2018 00:36:31 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/IOiclwiuBQA0TgYPqz0haUXAeJTOL3Gj0dR+0FLXt4aJHVwOM9BJBgfd3BiARMZHhS5Lb X-Received: by 10.99.191.12 with SMTP id v12mr4982744pgf.54.1523345791639; Tue, 10 Apr 2018 00:36:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523345791; cv=none; d=google.com; s=arc-20160816; b=h9kTSlbSzntsMAqL5/Qkeu3TciOSDnsMmT9BkJhhSRUndG1U7KT96D0P4F9mkt4P4N g7Sc4jipjGxCiaPHadJJWsZJnzI1YmxI79J8sCM34r/NvM9bL9/FoTFbBZQf19MnmJoc bZUUe2YcydRQHFf9Rqorx/nmveSDlavLHMPCXwVcmJeUcJBqoHoc2X3f6xxBJDMnOPEM 57JvGh5+WuKe7K8JtO6r/izzAhkupBYx4DiNGVAut2rh69deBMiQTPyQAf0Pqe4Ymrcj 8JWMeZK58AO5iMnO/IG0QCdYLQXwji0IdBrW+HRfotryxiw0zaipu4pB+OXPi6La716l 06QA== 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=wdxipwEyD0eURXENTKKOwBk9x2T+E8F2GqqRyx0/e7o=; b=M+j+dHP8BKkahqoFziGlpem6sTMnijobBV/3a5X5MA+ZIrVDLDatAgUzvKaEE0MVYv Ue2twcLuQSqbbgylW+4D2IllAE85hryU5Ng1Cb0Pa2yyL7lHV3NUN5MrJj0ULErjFmXb JdXjNYaOBajMBEL1BIUUasBPM+It/etjFI5x+EZB9oqXkZCAPjGHS0aKnMjOpvTQiouV +hDY6azSPs/bR0IMcsYxAV5j5TFm36pWMF50m2SkWuq8dUrf/9ygQtpd3YsHojTAe4KW tCYtfsHsCjNuNPjNwB/or+Oqk1c2NgOc3xwqiyTf69ivQaZ95HXkAE/qv96Akn3LP+J5 qgvA== 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 k2si1405632pgf.691.2018.04.10.00.35.54; Tue, 10 Apr 2018 00:36:31 -0700 (PDT) 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 S1752521AbeDJHcH (ORCPT + 99 others); Tue, 10 Apr 2018 03:32:07 -0400 Received: from mga09.intel.com ([134.134.136.24]:16805 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752469AbeDJHcF (ORCPT ); Tue, 10 Apr 2018 03:32:05 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Apr 2018 00:32:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,431,1517904000"; d="asc'?scan'208";a="46585091" Received: from pipin.fi.intel.com (HELO localhost) ([10.237.68.37]) by orsmga001.jf.intel.com with ESMTP; 10 Apr 2018 00:32:02 -0700 From: Felipe Balbi To: Minas Harutyunyan , Minas Harutyunyan , Roger Quadros Cc: "linux-usb\@vger.kernel.org" , "linux-kernel\@vger.kernel.org" Subject: Re: [PATCH v2] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume In-Reply-To: <410670D7E743164D87FA6160E7907A560113AE789A@am04wembxb.internal.synopsys.com> References: <1519730526-22274-1-git-send-email-rogerq@ti.com> <69517684-bd39-e945-0c9e-ccd52b8050d5@ti.com> <87y3isffog.fsf@linux.intel.com> <5ea0ad17-d538-72ec-ed59-004242c4cd26@ti.com> <410670D7E743164D87FA6160E7907A560113ABB478@am04wembxa.internal.synopsys.com> <87zi38438h.fsf@linux.intel.com> <410670D7E743164D87FA6160E7907A560113ABBA4B@am04wembxa.internal.synopsys.com> <87d100qwc5.fsf@linux.intel.com> <410670D7E743164D87FA6160E7907A560113ABC945@am04wembxa.internal.synopsys.com> <410670D7E743164D87FA6160E7907A560113ABCA0A@am04wembxa.internal.synopsys.com> <410670D7E743164D87FA6160E7907A560113AE789A@am04wembxb.internal.synopsys.com> Date: Tue, 10 Apr 2018 10:31:13 +0300 Message-ID: <87r2nnldq6.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, Minas Harutyunyan writes: >>>>>>> Actually to fix this issue I updated condition of wait function >>>>>>> from: >>>>>>> !(dep->flags & DWC3_EP_END_TRANSFER_PENDING) >>>>>>> to: >>>>>>> !(dep->flags & DWC3_EP_END_TRANSFER_PENDING & DWC3_EP_ENABLED) >>>>>> >>>>>> you're not fixing anything. You're, essentially, removing the entire >>>>>> end transfer pending logic. >>>>> yes, you are right, but how to overcome this infinite loop? Replace >>>>> wait_event_lock_irq() by wait_event_interruptible_lock_irq_timeout()? >>>> >>>> The best way here would be to figure why we're missing command complete >>>> IRQ in those cases. According to documentation, we *should* receive th= at >>>> interrupt, so why is it missing? >>>> >>> >>> Additional info on test. Core configuration is HS only mode, test speed >>> HS, core version v2.90a. Maybe it will help to understand cause of issu= e. >>> BTW, currently to pass above describe ISOC OUT test we just commented >>> wait_event_lock_irq() in dwc3_gadget_ep_dequeue() function and >>> successfully received request completion in function driver. >>> Thanks, >>> Minas >>> >>=20 >> One more info: while function driver call dequeue, host periodically >> send control read command to get status of test from function - test In >> Progress or Finished. >> Thanks, >> Minas >>=20 > > Your last dwc3 patch series allow us to successfully dequeuing remaining= =20 > requests without falling in to infinite loop. that's cool, thanks :-) I'll just fix the documentation bug I introduced heh :-) =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEElLzh7wn96CXwjh2IzL64meEamQYFAlrMaEEACgkQzL64meEa mQbvnA/8CBNEQFELdDhKM52NnWdqdhpXAXtNPB2xvWMPhXMXyT10H8aM5S6y1S5I VNIAk3GcZqWf2Y9aVO362zVhXk0G6MCwtr9oOtd7s2QN/WV6MSPzlRmeyjvT7he2 LN2jOp//hmd1dLhPQfWddB81DQ3ghw2RVXPvo6J7A+ImKnRyAFMQ/3U3/oGUOJMG 6/tPviQ7goLpdg4aQE3n9wCfFPx1IOBWNdduOUq1to6pcseWNGIk0DFS/WcXLz5u BgtguW8NXbP7XbwThoBpxAC0j1YzD7w8d7l9VfgEM8j8OtUjK2Q0EtlGtVahWqlF OESUhPUO0Nic87r8FCPPe20hN6T2MZLZJdHLc7EacVSPnYKSLB9PfjhJ7Vx1169f ufSt0WaPyZDmMM8FyO/7SuxR1a+I5+uVgk+8y/Zkl3vqnbNBetjZSQrQELxJV6dr W4dzmXfr4WDdN6D++VOTmPGENwcxKOR+LPG+3smfjVIiZIAiNCrGGqSGWfB9PIVP 0hzOMinhjpLpEjFfL6rjjPWI6RN/amDXtLtq4gfXr7Cc24MSHf/x9FHBZm+0djlU aVN2jS4+C3Ls1fEQz7Ka5ixQf3kAFcVCQB+apvZHK7/5+2im23AoQC9/PPtIkf/J EH43bpX5M6soi1jnarF4lu8lPPIvwhX4XIXmRj1eNHc6ZTpG4OM= =l7az -----END PGP SIGNATURE----- --=-=-=--