From patchwork Wed Jun 28 13:38:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vignesh Raghavendra X-Patchwork-Id: 9814335 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 344A6603F2 for ; Wed, 28 Jun 2017 13:39:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2652028511 for ; Wed, 28 Jun 2017 13:39:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1B0C628549; Wed, 28 Jun 2017 13:39:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5610328511 for ; Wed, 28 Jun 2017 13:39:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751874AbdF1NjM (ORCPT ); Wed, 28 Jun 2017 09:39:12 -0400 Received: from fllnx209.ext.ti.com ([198.47.19.16]:61888 "EHLO fllnx209.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751559AbdF1NjL (ORCPT ); Wed, 28 Jun 2017 09:39:11 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllnx209.ext.ti.com (8.15.1/8.15.1) with ESMTP id v5SDcSgq009038; Wed, 28 Jun 2017 08:38:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1498657108; bh=7FUiJd9YnLG2AYG2rpMuw8S9J6zWJ82tLf/I0SgonYM=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=pnpnHTGjn5prk0JNELuuzZW41AbuOcMKT4/x9aaKQ08I6c5ylCsMfm/XmR3opNFfR Sjb3yRs77GH8wMsIoJq5tL7i0rI6aKUNM7MXpyhfi0k8WpEsd28D5X1Fz1PXheQP/y vzXPxgsM6o4IZ2AtUGEW17oCC51naGwpwJC9SR7E= Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v5SDcNO5001250; Wed, 28 Jun 2017 08:38:23 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.294.0; Wed, 28 Jun 2017 08:38:22 -0500 Received: from [172.24.190.89] (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id v5SDcJGx022168; Wed, 28 Jun 2017 08:38:20 -0500 Subject: Re: usb-related linux-next boot failures To: Felipe Balbi , Tony Lindgren CC: Greg KH , Carlos Hernandez , , References: <0d1a491c-41c4-a02d-cdf8-e1a95a1fe989@ti.com> <20170628045543.GA28759@kroah.com> <87r2y45x97.fsf@linux.intel.com> <20170628103014.GC3730@atomide.com> <34a37d06-1929-814b-3476-6eaa5a45cd39@ti.com> <87k23w5qn2.fsf@linux.intel.com> From: Vignesh R Message-ID: <71bae311-f85b-4fe1-06c2-d43bfee42b88@ti.com> Date: Wed, 28 Jun 2017 19:08:32 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <87k23w5qn2.fsf@linux.intel.com> Content-Language: en-US Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Felipe, On Wednesday 28 June 2017 04:24 PM, Felipe Balbi wrote: > > Hi, > > Vignesh R writes: >> On Wednesday 28 June 2017 04:00 PM, Tony Lindgren wrote: >>> Felipe Balbi [170628 01:32]: >>>> Greg KH writes: >>>>> On Tue, Jun 27, 2017 at 02:28:56PM -0400, Carlos Hernandez wrote: >>>>>> Still seeing AM57xx/DRA72/DRA7x usb-related boot failures on linux-next... >>>>> >>>>> Is this a regression? If so, any specific commit that caused it? >>>> >>>> I did ask for a bisection last time but nobody from TI replied ;-) >>>> >>>> https://marc.info/?i=87h8zi4gmx.fsf@linux.intel.com >>>> >>>> Can't really help without bisection logs :-) >>> >>> Seems this warning got add with 04c848d39879 ("genirq: Warn when >>> IRQ_NOAUTOEN is used with shared interrupts"). The fix is to get >>> rid of IRQ_NOAUTOEN and enable_irq for a shared interrupt. Hard >>> to say as the warning line does not match the version of next I >>> have so this should be verified. >>> >> >> There seems to be two different problems here. >> One is what Tony is pointing to above that throws a first warn dump >> during dwc3_omap_probe(). >> >> Second one is the imprecise external abort that happens later: >> [ 24.809939] Unhandled fault: imprecise external abort (0x1406) at >> 0x00000000 >> >> Bisecting the second issue lead to the first bad commit as: >> commit f54edb539c1167e7a96073848d0afad100df4580 >> Author: Felipe Balbi >> Date: Mon Jun 5 17:03:18 2017 +0300 >> >> usb: dwc3: core: initialize ULPI before trying to get the PHY >> >> If don't reorder initialization like this, we will never be able to >> get a reference to ULPI PHYs. >> >> Signed-off-by: Felipe Balbi >> >> >> >> Reverting above commit from -next seems to help. > > reverting will break other things. Seems like we should move > pm_runtime_* operations a little earlier to ensure clocks are enabled > early enough. > Looking at the above commit, I see that call to dwc3_core_get_phy() is now moved from dwc3_probe() to dwc3_core_init() after dwc3_core_soft_reset(). But dwc3_core_soft_reset() calls phy_init(), therefore dwc3_core_get_phy() needs to be called before dwc3_core_soft_reset(). Below diff fixes the issue on DRA7xx platforms. I can submit a formal patch, if it looks fine. diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 326b302fc440..03474d3575ab 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -766,15 +766,15 @@ static int dwc3_core_init(struct dwc3 *dwc) dwc->maximum_speed = USB_SPEED_HIGH; } - ret = dwc3_core_soft_reset(dwc); + ret = dwc3_core_get_phy(dwc); if (ret) goto err0; - ret = dwc3_phy_setup(dwc); + ret = dwc3_core_soft_reset(dwc); if (ret) goto err0; - ret = dwc3_core_get_phy(dwc); + ret = dwc3_phy_setup(dwc); if (ret) goto err0;