Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp365166imn; Thu, 4 Aug 2022 08:56:49 -0700 (PDT) X-Google-Smtp-Source: AA6agR78et512EaHySWtR9472ZQ3muhlyKIWw3BmZ0NfjJDlQ0IYyjiJYMV7OyKeTmvoPeHg18aD X-Received: by 2002:a65:6b96:0:b0:41a:617f:e193 with SMTP id d22-20020a656b96000000b0041a617fe193mr2137770pgw.85.1659628608805; Thu, 04 Aug 2022 08:56:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659628608; cv=none; d=google.com; s=arc-20160816; b=IgVmfH8inT97FKB9fEcE/DqbqNMV6wrkuYSGcUx9q+8knWXai1sGK8gzAKivSX4DnB f9tlwVs2KA+hMQyUTK1UFKQBCnGR+T8ajg95hkobKXQUAJ6TrEmn4n/wonX8TO4E/jzm pAHR3B2rIl4jnoUM8xbVH70JqsFlY2p03vHQpDE5MZjna4Uan5w2NmzMGkML2k4tSTIM Wol8G2ULQjVECwbJJmdNg3dRiqSg+cDWeyicjO6ttnGA/29DfijpbLLqk96mRnbu6FRm G1GflCNIejJaHtjo3B9PZab2dsKK02nrjiOXQBLs76+7ixVj/wSEZRies+b6Kat9IOuy tbVA== 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=YMwmJ3SYguFGWEp4hAm2rBYWGtLtJTCvpovU/AIVn0A=; b=MFE+9/WvFJ8dLrQrtbOYOu0J5dLa6GfNwFO87lrUsYNGlNGYMIP65lEXm1NtJ8Yq// hCy1TTXPe7vBpWRF/kdQEvNlqCiPjDeWasXRmwk9MvXkMdgmNsN4WuIfC1kcXWOAlZFK Ybuvvw+lhCMgIYElxWmg0iCzGTvqkhsHD/Z5KliIWhJAtR8We/ayNuzh7GlMk9YuKOR3 /xHbMByqrcgWvuOKdKYuOB+tgE1KcUEYfBPlKP82UBDMMsDYYJlGcqzYVkPx52kRkmom UBblccl81hW6wM/ueH5YMRMbh0IlYgSy3irbvQWXzNqbESJkd5T/+hOMdxwk+f6fLZQC hXFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Qtnq39uH; 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 u5-20020a170903124500b0016d018cc597si1432366plh.416.2022.08.04.08.56.34; Thu, 04 Aug 2022 08:56: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=@chromium.org header.s=google header.b=Qtnq39uH; 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 S239595AbiHDPfY (ORCPT + 99 others); Thu, 4 Aug 2022 11:35:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234837AbiHDPfQ (ORCPT ); Thu, 4 Aug 2022 11:35:16 -0400 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ABA283A6 for ; Thu, 4 Aug 2022 08:35:14 -0700 (PDT) Received: by mail-pj1-x102b.google.com with SMTP id t2-20020a17090a4e4200b001f21572f3a4so161745pjl.0 for ; Thu, 04 Aug 2022 08:35:14 -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=YMwmJ3SYguFGWEp4hAm2rBYWGtLtJTCvpovU/AIVn0A=; b=Qtnq39uHyzvlwnd38DbC3LwcEUpjMXF+hgHHimscG103l15xTzdeAhdQsEhHrCXXc6 jZmcYvbCNSHRH02uVnFirKaBpXJB1Nt7yHmZSmHLABRrEcxUe/GNWK5CbueaHG9IMAfR 6mm9ZApgk6ZbXDRVcrk6xsfiBn9g5yH+QxTSw= 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=YMwmJ3SYguFGWEp4hAm2rBYWGtLtJTCvpovU/AIVn0A=; b=nVziDRXD1WhoUwV2PqPcYKvbDFhc8uHBvhOPw/Hy6ni/T/q+0TmwUBuzy12CjEIEdi YqnZmM+qk3yuU4HJdkS1/HoTD81yJp0LQMwMljQ7v+zhwKodSKLWfNSNM3vBfYXiCv54 PFvpa+N1RcIk4pjPZW1nLY+UjwD1mn298OVEAs3qRutH+4aTMXJdQ6W6Y3hwb3oG4LF7 fOsiOer1k27fhYHauwKidU/Xi8Vd+wtoqqH4rJeuHEdUr29XH024RPgo2Vky6m8jrsCC xfgEp3KdpYcFZ4iF63cBKE6O70lqgN/Ra3hDKivgO4iwCXsgNDSUKbfDTTccjMHm2k83 boeA== X-Gm-Message-State: ACgBeo0AXHW7kirXNf60l2JNs9yhtUtmwOu5hceXd4NAGFhkNQCZahmR WK7Tpjb8p0cKLg+vIAKxLQsnGHGUoIguZA== X-Received: by 2002:a17:902:a418:b0:16c:9ee2:8a02 with SMTP id p24-20020a170902a41800b0016c9ee28a02mr2453212plq.46.1659627313991; Thu, 04 Aug 2022 08:35:13 -0700 (PDT) Received: from localhost ([2620:15c:11a:202:87c4:32ca:84b6:e942]) by smtp.gmail.com with UTF8SMTPSA id j9-20020a17090a31c900b001ef7c7564fdsm3870037pjf.21.2022.08.04.08.35.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 04 Aug 2022 08:35:13 -0700 (PDT) Date: Thu, 4 Aug 2022 08:35:10 -0700 From: Matthias Kaehlcke To: Johan Hovold Cc: Johan Hovold , Greg Kroah-Hartman , Felipe Balbi , Rob Herring , Krzysztof Kozlowski , Andy Gross , Bjorn Andersson , Manivannan Sadhasivam , Konrad Dybcio , Krishna Kurapati , Stephen Boyd , Doug Anderson , Pavankumar Kondeti , quic_ppratap@quicinc.com, quic_vpulyala@quicinc.com, linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 4/8] usb: dwc3: qcom: fix runtime PM wakeup Message-ID: References: <20220802151404.1797-1-johan+linaro@kernel.org> <20220802151404.1797-5-johan+linaro@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: 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=unavailable 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, Aug 04, 2022 at 09:35:16AM +0200, Johan Hovold wrote: > On Wed, Aug 03, 2022 at 02:58:33PM -0700, Matthias Kaehlcke wrote: > > On Tue, Aug 02, 2022 at 05:14:00PM +0200, Johan Hovold wrote: > > > A device must enable wakeups during runtime suspend regardless of > > > whether it is capable and allowed to wake the system up from system > > > suspend. > > > > > > Fixes: 2664deb09306 ("usb: dwc3: qcom: Honor wakeup enabled/disabled state") > > > Signed-off-by: Johan Hovold > > > > Ah, I wasn't aware that the same wakeup mechanism is used in runtime suspend. > > > > In how far is runtime PM actually supported/used by this driver? The device is > > set 'active' in _probe(), and there are no other pm_runtime_* calls, except > > in dwc3_qcom_remove() and qcom_dwc3_resume_irq(). How does the device get from > > 'active' into 'suspended'? > > It will be runtime suspended when the child (core) device suspends, but > you need to enable runtime PM through sysfs first. Thanks for the clarification. After enabling runtime suspend for the dwc3 core, dwc3 glue and the xHCI the dwc3-qcom enters autosuspend when the delay expires. > And the controller is resumed in the wakeup-interrupt handler for the > runtime PM case. > > It seems to work ok, and it looks like the driver has supported this > since it was first merged. With and without your patch dwc3-qcom enters autosuspend and stays there. USB devices like a mouse or a USB to Ethernet adapter keep working while the glue is suspended. How is the runtime resume triggered for the dwc3 glue? Sorry if my questions are very basic, so far I haven't dealt much with autosuspend and I'm trying to get a better understanding in the context of the dwc3 and why it is currently broken.