Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp856242imw; Fri, 15 Jul 2022 14:18:45 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vz9fLZqp9pRhavuY0t/1FQ4ZSJftaDJr7xVSbVEOpy2j+EK+CKNkoln5HMS06GZ5gPnV/9 X-Received: by 2002:a05:6402:5245:b0:43a:a024:82cc with SMTP id t5-20020a056402524500b0043aa02482ccmr21801877edd.56.1657919925709; Fri, 15 Jul 2022 14:18:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657919925; cv=none; d=google.com; s=arc-20160816; b=YuKvAyCKcZ7t2BZLqqb4G6pkc1x8O/Z6ZMuhbTUIs3zDEsoLDl/Ayrbap/J0ovDg9+ k+zRted5ZWwBSg0qGWCERM9nkY29HfqmRnZn63OSSqAqgPoz684y4TqFdilR140a1hMH h7NLESwjcEfuXfXVzQRY3H5ft9g3PPEyOwnXe7+9QkOkBgthRPDy6K8aMU3NPhWejm+M pWKxFRU2IaqIp0j8wcyqLb9atlCW/EEeYwS6/JYNiC3gvItGgjhFn2Wcoh04PnFZLSsr 9rVuFXPti4w+FRVNbV7mjzXmhwnwC8gJBLb3bEV0nowlljHzI6/JomKwvxEi3Jr7BMYy Wy9g== 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=WtZRDzM8YJ97S/1Li5D/D44YAKcdEwJfblvdKCPMsAc=; b=AioojtQSCNVfPtZ++DcpPeEaybDMiUuBoHqeP2uS2RKe1AsllyrO/t4WcmnkLAu9mG UO3KdnZa9IeRMblwrMfFHsx/rwBfzjV4T2M9MSH39HJFynIeGXA7gtECOFX8oKUTEMv1 HPi239T38+wCJnvd9SdjAbY6BJ1PmPk4GsT0lOtPKqhFt4dSFHwFeoErSiYAsDAjO9nE /yI8ZaB6kc0pyFHIfkIHFnul6b0s2zqfJ0w+0mPaNnuucYm2XgisSVhb8MlMcWJNCnDP RWsNtlhg9m8hQ/b/3mmyGl+/f2EWvo/E5Imb/H9G/980JTnkQv2n7J1+dGhrxOzwJbN0 fOJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=h9mO28BV; 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=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sb36-20020a1709076da400b0070795e99fe3si7061697ejc.984.2022.07.15.14.18.20; Fri, 15 Jul 2022 14:18:45 -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=@chromium.org header.s=google header.b=h9mO28BV; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229821AbiGOUmB (ORCPT + 99 others); Fri, 15 Jul 2022 16:42:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229680AbiGOUmA (ORCPT ); Fri, 15 Jul 2022 16:42:00 -0400 Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 672AF528A6 for ; Fri, 15 Jul 2022 13:41:59 -0700 (PDT) Received: by mail-pf1-x42b.google.com with SMTP id o12so5599320pfp.5 for ; Fri, 15 Jul 2022 13:41:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=WtZRDzM8YJ97S/1Li5D/D44YAKcdEwJfblvdKCPMsAc=; b=h9mO28BVHHbGShv1uBCtq7ZZifV3OOTDANCsGvtddURVoUa57Ouy0cRfb8h/UxuZUn wHWtFVlfeAly/PSS/772SluwtFygGQYZrM+pSzu07xnsKlX06xwKk3lXfQqTnzgpPYgs vG9B137tWetNmkSVx/6ucFo/nv10tm0kBnsjc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=WtZRDzM8YJ97S/1Li5D/D44YAKcdEwJfblvdKCPMsAc=; b=i09bxE8I1IggRqB0T7t1RThBT4AjSOx+kTwdJxxU8Y16/YVw5l+Tz/jMVnI0cP/aIA 1h0/dOS+cMY1ES7tsdMhaNIqajNj/l9sQWMyAZcl+RMeHKWbIBUehJFBUcoyyvHV+aBE IiNe68ftG2swLh/t/i5+wLL28bXV6rGh4p9azcoILz/u6xh3cQ5/YUfCcy+3Z0Xr7lAT 64YSxw5DZkVXtDgB7ii3CNuqbYav4NxXSbrB6exAHkBtqC8AHGIS3FDtBytX1NEJ8Tq1 icVdfkU4H3Xq7ltvt3c81LkxH71+4rUp5rB+4DTr4cnXAYGJmljN/jxXpwcwnX/vZ4HT yCOA== X-Gm-Message-State: AJIora8A/50bbx5/hqbzBo4FLb6kv871+zZRvrGXyOehB1CjEJJUVwGm FjKPsvCgphFP/dDikAcA03PMLQ== X-Received: by 2002:a63:2486:0:b0:412:9de2:eb49 with SMTP id k128-20020a632486000000b004129de2eb49mr13912375pgk.224.1657917718974; Fri, 15 Jul 2022 13:41:58 -0700 (PDT) Received: from localhost ([2620:15c:11a:202:835b:7656:818:a69a]) by smtp.gmail.com with UTF8SMTPSA id 187-20020a6205c4000000b0051c4f6d2d95sm4309705pff.106.2022.07.15.13.41.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 15 Jul 2022 13:41:58 -0700 (PDT) Date: Fri, 15 Jul 2022 13:41:57 -0700 From: Matthias Kaehlcke To: Krishna Kurapati Cc: Andy Gross , Bjorn Andersson , Felipe Balbi , Greg Kroah-Hartman , Philipp Zabel , linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] usb: dwc3: qcom: Defer dwc3-qcom probe if dwc3 isn't probed properly Message-ID: References: <1657891312-21748-1-git-send-email-quic_kriskura@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1657891312-21748-1-git-send-email-quic_kriskura@quicinc.com> X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 Fri, Jul 15, 2022 at 06:51:52PM +0530, Krishna Kurapati wrote: > Subject: usb: dwc3: qcom: Defer dwc3-qcom probe if dwc3 isn't probed properly nit: "isn't probed properly" sounds like a bug or HW issue. In case you re-spin maybe change it to "hasn't probed yet" or similar. > 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. > > Fixes: 649f5c842ba3 ("usb: dwc3: core: Host wake up support from system suspend") > Signed-off-by: Krishna Kurapati Reported-by: Matthias Kaehlcke Tested-by: Matthias Kaehlcke Reviewed-by: Matthias Kaehlcke Please make sure to add reviewers of previous versions or other folks you would like to review your patches in cc. I found v2 accidentally while looking for something else.