Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756016AbcCaIx2 (ORCPT ); Thu, 31 Mar 2016 04:53:28 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:58606 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755600AbcCaIxY (ORCPT ); Thu, 31 Mar 2016 04:53:24 -0400 Subject: Re: [RFT PATCH 0/4] usb: dwc2: Fix core reset and force mode delay problems To: John Youn , linux-usb@vger.kernel.org, Doug Anderson References: Cc: Felipe Balbi , Michael Niewoehner , Tao Huang , Julius Werner , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Caesar Wang , Heiko Stuebner , Felipe Balbi , Remi Pommarel , Kever Yang , Przemek Rudy From: Stefan Wahren Message-ID: <56FCE567.1050004@i2se.com> Date: Thu, 31 Mar 2016 10:52:55 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:SyH5CA6OabWRaTzZ2iZHUffNGBDzNXBNOyyH+bt2aev8o4B3FSb l8BDLaIO2DoIS3lau6Ftca5hxeia+hTGjPREmp0k0QdGJIzI/oDt3jpI+a6YxJnMc0QEnKI i1+rfuMR2jUXmVEhumjZ6rP5IrYNX+aOHn0slTEjSloq1p4wV/cZLbVGoD5GTekgMaoWLAV IRSxx4Eza8B7/EiVcr2Hw== X-UI-Out-Filterresults: notjunk:1;V01:K0:dqQ+X23hliE=:mmHXG4qS/x6sidLr6FhtYF 4mgjX1Za65TWS/X8aO972ZxTh2iRbV8YtsCUPaDZQeQ/OWEC0UU5TJIecWVP0DS6DAFJpctKN WXtSx1AnxtolIRgDpRp1QxUE5YzBZ2blVTqPdNQxwQjIWFQrJXd9Bfb60fEgl4RIPWz9FoEvA VzplbmkrC0Z2u6mKrmG4gmicCplumqmwfPGQeM0gnIvMS5eJlz0FQSD6Dgh4uk1PzkyRC/wes fI2qUff5FuigRfspSzatkOJOaH3Rf8ITaEEJRpomXwM3OyUtykk+ZBe/FekOTx75Kiy6sYzET KqBfYbmkm1D8fd7KtXo0NZ45JIS/KOFyL2M/STKOYnlNuQ4bk0g04KPIVBoycy1sfJ6jVC97e JPcComGyaUWxotgCwRsy5bbAdPoso78PvyKVYV0xO68T10IqJZ1v8ex8PlAGHGBTbJjw2LQdY LcT/TWMtgjyh+JA/mBi/DMBWqEVtyONRpITMTluUAjPHCMrp17H71HgPJmw0Gf/fItpQxG3Zj JDmGdf0KVAXOXXpBozU0eeAF3jgGaYgDDHxW20ZbRjTHT9dDlX5yfA8sxdp9Lfa86xobr2alc H24+1R7e0A+In620V9eM5JxclCxjV6kojC+BupGbHV+pLsXSFpHZP29sQQ2ozOLZzkhvTNkAC yyYZQiDg++e1I9zbWwGNv87cq50Wdtyd3d/2WvWhOX3IW14pHtOpVQ3u+mf4hnyn83yX9Y++V CR0jZqVr0wIFOLYP Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1854 Lines: 57 Hi John, Am 29.03.2016 um 04:36 schrieb John Youn: > Hi, > > The following patch series addresses the core reset and force mode > delay problems we have been seeing on dwc2 for some platforms. > > I think I have identified the source of the inconsistencies between > platforms and this series attempts to address them. > > Basically everything stems from the IDDIG debounce filter delay, which > is a function of the PHY clock speed and can range from 5-50 ms if > enabled. This delay must be taken into account on core reset and force > modes. A full explanation is provided in the patch commit log and code > comments. > > The first two patches are prerequisites to the force mode fixes, > including one patch that was sent separately by Przemek Rudy. I have > resubmitted it with this series for convenience. > > Please help by reviewing and testing on your platforms. > > Patches were tested on: > * Synopsys HAPS platform IP 3.20a OTG, dr_mode=OTG,HOST,PERIPHERAL i applied the complete patch series on 4.6rc-1 and successfully tested it with my Raspberry Pi B (IP 2.80a, dr_mode=HOST). Probing and usual USB devices (network, keyboard) still works fine. Do you need any other specific tests? Regards Stefan > > Regards, > John > > John Youn (3): > usb: dwc2: gadget: Only initialize device if in device mode > usb: dwc2: Add delay to core soft reset > usb: dwc2: Properly account for the force mode delays > > Przemek Rudy (1): > usb: dwc2: do not override forced dr_mode in gadget setup > > drivers/usb/dwc2/core.c | 195 ++++++++++++++++++++++++++++---------------- > drivers/usb/dwc2/core.h | 2 +- > drivers/usb/dwc2/gadget.c | 30 +++++-- > drivers/usb/dwc2/hcd.c | 6 +- > drivers/usb/dwc2/hw.h | 1 + > drivers/usb/dwc2/platform.c | 9 +- > 6 files changed, 161 insertions(+), 82 deletions(-) >