Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp646965imw; Thu, 14 Jul 2022 08:15:49 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t2s33IdePZeToHk2O8GKoSjyRBVEsWaXQBedCMFDBrgEccyYC74oWuYasCZXf9H7G4OxMJ X-Received: by 2002:aa7:c2d1:0:b0:43a:997:c6d8 with SMTP id m17-20020aa7c2d1000000b0043a0997c6d8mr12663299edp.161.1657811748942; Thu, 14 Jul 2022 08:15:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657811748; cv=none; d=google.com; s=arc-20160816; b=YctUFwqrTXxltNczFIgiSOuBpkQ4GhKLxjX4vytAmdPiIdMeb5ujGuG3eE9xJ+PDrK YXKxA8AbP+hKWTnY5g84m1Z/cKIfqvLLyeJotqTMk8yfPVFrRW+b2bfclQWP5eYFp9WX Gyb1ciqNJK7P5K6XCn1cuQsfVGSrnbTkXQB84fQNAmLd2ARWvccYftbwHIe3GsswJGBW usr5tV3A+C60m1tKrPZ3cVkpx2aFkSFD1ilJrsVXFgH+yD5UZtAeDt0ALh9f4GJgPz2y JnsaZuUjyeh78tBZ6XV2gdl7IHgGNwRDkGcwtxyLY1WpG5bCcjBxFyMMGnPHQ1kYGaiK vskw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=8P/nXnJJnfFVAg/57HDhyGZ0GJqI+b6C3MxeSlkdNGA=; b=j1l36DKG9B1Fez+6bp4F/Z5gexpDd+0ZOUUK/ZrhVtN6X+TNvHMddIvAhSKI0+AvJO 12G2x1zfbBn7V99LSJrklPBk4JhH2vwy6TSFz5yKQeOXLA22U+8YyDXqRkkLbuiQJCfh QQZSZ1TQE/P9/iY0AcXXDpa2OkAfX1MCl6IoqzvLo5KUlLu/XThTF5Wz2IuIfoEkeNS3 MaO/xGisAnTzvFQKaVj1Nmxcv5EnTIIJYKkKxrod8j1hSlQmhXqKMi0IFnug1h/3gvlg 9zi2OwfMJWWw1KRR2vdGve2+uSTi0tgqnQoAreMTdTM1rYjN9AiPSYndCXT5hP8VADJd 26nA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="kab1FRl/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q36-20020a05640224a400b004335d160f73si678682eda.309.2022.07.14.08.15.23; Thu, 14 Jul 2022 08:15:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="kab1FRl/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239882AbiGNPBr (ORCPT + 99 others); Thu, 14 Jul 2022 11:01:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239849AbiGNPBq (ORCPT ); Thu, 14 Jul 2022 11:01:46 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45F8B5F984; Thu, 14 Jul 2022 08:01:45 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D45DA61DE7; Thu, 14 Jul 2022 15:01:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D0107C34114; Thu, 14 Jul 2022 15:01:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1657810904; bh=SI797I+9i5TCoXhWZnsgC7kNquMHOYFwmIi2Q4aJ9wg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kab1FRl/BcqQGRaAmhmEUqPu/uu6QzhrN0Nynl58PLqmfx2+liU8sbe1+BBLDaMao pTb/bKp0r9l7F2mTmEkbUkepwcFeQjZZ5fvRxa/czPdaVZUyB08OSwMj1vSJHMO5ug G8bcaqC1IWDZQRP2++4gBnRhXqt/PrRTBsm1hmGY= Date: Thu, 14 Jul 2022 17:01:41 +0200 From: Greg Kroah-Hartman To: Krishna Kurapati Cc: Andy Gross , Bjorn Andersson , Felipe Balbi , Philipp Zabel , linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] usb: dwc3: qcom: Defer dwc3-qcom probe if dwc3 isn't probed properly Message-ID: References: <1657810516-31143-1-git-send-email-quic_kriskura@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1657810516-31143-1-git-send-email-quic_kriskura@quicinc.com> X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 14, 2022 at 08:25:16PM +0530, Krishna Kurapati wrote: > On SC7180 devices, it is observed that dwc3 probing is deferred > because device_links_check_suppliers() finds that '88e3000.phy' > isn't ready yet. > > As a part of its probe call, dwc3-qcom driver checks if dwc3 core > is wakeup capable or not. If the dwc3 core is wakeup capable, driver > configures dwc-qcom's power domain to be always ON. Also it configures > dp/dm interrupts accordingly to support wakeup from system suspend. > > More info regarding the same can be found at: > commit d9be8d5c5b03 ("usb: dwc3: qcom: Keep power domain on to retain controller status" > commit 6895ea55c385 ("usb: dwc3: qcom: Configure wakeup interrupts during suspend") > > In the event, dwc3 probe gets deferred and is processed after dwc3-qcom > probe, driver ends up reading the wakeup capability of dwc3 core as false > leading to instability in suspend/resume path. > > To avoid this scenario, ensure dwc3_probe is successful by checking > if appropriate driver is assigned to it or not after the of_platform_populate > call. If it isn't then defer dwc3-qcom probe as well. > > Signed-off-by: Krishna Kurapati > --- > drivers/usb/dwc3/dwc3-qcom.c | 3 +++ > 1 file changed, 3 insertions(+) I got 2 different copies of this change, what's the difference? confused, greg k-h