From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qt1-f182.google.com (mail-qt1-f182.google.com [209.85.160.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 075C71C5F1B for ; Wed, 27 Aug 2025 14:52:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756306343; cv=none; b=tSR4ffr8K42+IXa3w9Wvntil6V31zKtygjvk1RPdIDYaSIxDH7ljQxTMsjZa0EtgGRzWzxSabUZytPuZ6kYmYRVsgwxGWnDTZzdDx/1z7lFxZuyvXSiSTdmIEsKNWDU4vBc7+bT4ibq3llmKAdh0U8AElMtPfHCoa8agT6k3BgM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756306343; c=relaxed/simple; bh=ThVMa0VjSVebwOgOVvao7s4xw6N5DyuHLHJOViqjIao=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=C8N6xn2RAS35XpZBiw1dfVg7EcgGKTLBWxM1/l3JFeqLcTTgeSUZ23+2HteS7ZHYSnmbNiGLd6YUwfIUIBoexODLjivZgqsbpN2w8i9u+erA6/KDkqSTWNSUVgAnssojLYa/+0j1zjGokiiKUnQHF3nFcipCUax3Wan/DGX8u3Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=rowland.harvard.edu; spf=fail smtp.mailfrom=g.harvard.edu; dkim=pass (2048-bit key) header.d=rowland.harvard.edu header.i=@rowland.harvard.edu header.b=lFrIB6/z; arc=none smtp.client-ip=209.85.160.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=rowland.harvard.edu Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=g.harvard.edu Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rowland.harvard.edu header.i=@rowland.harvard.edu header.b="lFrIB6/z" Received: by mail-qt1-f182.google.com with SMTP id d75a77b69052e-4b2979628f9so75921561cf.2 for ; Wed, 27 Aug 2025 07:52:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rowland.harvard.edu; s=google; t=1756306341; x=1756911141; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=DzCFdrHjD97smBgVN53iARzVNKgmIKQSQPUy52DLyR8=; b=lFrIB6/zV+TnWJS9GUJpgCVnlT0jdVkV4uZ+g1dxzysM0uYvDcbLUtI8Otj8gOInNw wdjEcMax2I7lfVzuniO2409gjlQmgtD1ceSXoUoIErq1CDpSOFuGBVHFbPoLHHdM3dhi TntyKwtuB3aGWxQ4v9ZTUx32bIgQfemFmBp64BAMnZj95zKsJrkB75V2bDek4lYA1es9 kay9Pv+55F5393svhQilKbZDN9bMy7E9F7XH6wf6HWMYvN9PqfBARv4vlVUhQ/Okuzlk DtvZ152suTrL2FXbM4GwComywuSdfVPpe2R9y2fcUXdcf+ky30qv1M49NLs5TKlj8j3h aaIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756306341; x=1756911141; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=DzCFdrHjD97smBgVN53iARzVNKgmIKQSQPUy52DLyR8=; b=vNqtNAWPIq8CIwQjji+v7Ec6Q23sHSDPr6pZchTkHjvVPyIyHOQPphU2pUjFgOwb5I i1ybDHYUyUfHIgc8CWdJyrJm8F1YPu2Ia+4PaDD8vgmiGv4/iJcucmhv7/3Bc31VM8/X cKh5V3atujdXmDjaZYSJj/ku5wiqs2gbv9/k5E3vQi5adB/w7XOBwpBmXquBDLzagfUu 7ffgVUiUJrnd+m1DupJ8DFnOCxAokGbHodZUqVqetQ1kvqpcYYGzvcPjfiJbW+15sot/ AVaVGLc4jAtNXcOsJx7FPAcPslNu/VJVLLAUjOsYv7kzK1ZgsC8fBSNCvj5RP1EJZlSj VFhw== X-Forwarded-Encrypted: i=1; AJvYcCVOzFh71frGkUVouEzwsCA/gQ6nzKOB+oRAhu+2uCoaRyGvhh6GsqxCqw0Y2MBhmsE/s4kzt//y5d1AWpo=@vger.kernel.org X-Gm-Message-State: AOJu0Yw6L+IEKfrLd06XcBX9jk4MC/zFw8Q4OBH0wRU/U5I/UK8yERbK 4knNaEkwhsql6t0YFgPM7zosaFxGnjAEjgCnAJLlw8izVt0WFXWFvVfCVFdKVjqz7g== X-Gm-Gg: ASbGncvlhmxQVLXg2j313O2PvC8E/ni9wtGzGF7luP88uz742rURYs3VQ0V0R5YM1XX HTR49zsKN6/8QL61XE/t3Iz3u2BHUGLvQ5ccPgVXaa0Ip922r3n/lRBUg33AuApbGv28JtQKozM jQSwMOhEccA34l6D1p14wsklwNrsqkSvyw2j+ZgwvI0wgKBzSprJ0KaIWSalrhGLx/IerNGX3W5 XmkcurzUAfMuscCWsAWrAMZgMajXATiTyUE58ji6hoV2GlPOFPgkJx5cgPbEjRgK/JCxVxTa9DI +V4EWr1QsxhhGAjpHUs2jhAfwQW/+To4W3dKOeppPVfeNtKTvTGRHetK2TcpoGI0NldcrwQ+fpc VOfG43k4QpzFM/HKd1bAZx9XzwlFhpo3ktm526tvy/XaGEjW7NoVnJd/nyA== X-Google-Smtp-Source: AGHT+IGI69TxmEa7cNmRHXE8TQb0IknN+13n0MWxeBuaynrVToE2H9keJBWKDhweukHWinjWveqfuQ== X-Received: by 2002:a05:622a:1390:b0:4a9:7a4e:7e93 with SMTP id d75a77b69052e-4b2aaa5618emr235523941cf.8.1756306340567; Wed, 27 Aug 2025 07:52:20 -0700 (PDT) Received: from rowland.harvard.edu ([140.247.181.15]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7ebf41772d8sm872657985a.64.2025.08.27.07.52.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Aug 2025 07:52:20 -0700 (PDT) Date: Wed, 27 Aug 2025 10:52:17 -0400 From: Alan Stern To: ryan zhou , "Rafael J. Wysocki" Cc: Roy Luo , Thinh.Nguyen@synopsys.com, gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: Re: [PATCH] drvier: usb: dwc3: Fix runtime PM trying to activate child device xxx.dwc3 but parent is not active Message-ID: <5d692b81-6f58-4e86-9cb0-ede69a09d799@rowland.harvard.edu> References: <20250826150826.11096-1-ryanzhou54@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Ryan: You should present your questions to the maintainer of the kernel's Power Management subsystem, Rafael Wysocki (added to the To: list for this email). Alan Stern On Wed, Aug 27, 2025 at 10:09:10PM +0800, ryan zhou wrote: > Hi Roy, > Thank you for reviewing my patch. > > > > Wouldn't the parent glue dev already resume before resuming the child dwc3? > > > No, in the following case, the parent device will not be reviewed > before resuming the child device. > Taking the 'imx8mp-dwc3' driver as an example. > Step 1.usb disconnect trigger: the child device dwc3 enter runtime > suspend state firstly, followed by > the parent device imx8mp-dwc3 enters runtime suspend > flow:dwc3_runtime_suspend->dwc3_imx8mp_runtime_suspend > Step2.system deep trigger:consistent with the runtime suspend flow, > child enters pm suspend and followed > by parent > flow: dwc3_pm_suspend->dwc3_imx8mp_pm_suspend > Step3: After dwc3_pm_suspend, and before dwc3_imx8mp_pm_suspend, a > task terminated the system suspend process > . The system will resume from the checkpoint, and resume devices in > the suspended state in the reverse > of pm suspend, but excluding the parent device imx8mp-dwc3 since it > did not execute the suspend process. > > > > >Why would 'runtime PM trying to activate child device xxx.dwc3 but parent is not active' happen in the first place? > > > Following the above analysis, dwc3_resume calls > pm_runtime_set_active(dev), it checks the > parent.power->runtime_status is not RPM_ACTIVE and outputs the error log. > > > > >What is the glue driver that's being used here? Knowing what's being done in the glue driver pm callbacks > >would help in understanding the issue. > > > Refer to the driver 'dwc3-imx8mp.c' please, maybe you could help me > find a better solution. > > > Thanks, > ryan > > Roy Luo 于2025年8月27日周三 02:38写道: > > > > On Tue, Aug 26, 2025 at 8:12 AM Ryan Zhou wrote: > > > > > > Issue description: > > > The parent device dwc3_glue has runtime PM enabled and is in the > > > runtime suspended state. The system enters the deep sleep process > > > but is interrupted by another task. When resuming dwc3, > > > console outputs the log 'runtime PM trying to activate child device > > > xxx.dwc3 but parent is not active'. > > > > > > > Wouldn't the parent glue dev already resume before resuming the child dwc3? > > Why would 'runtime PM trying to activate child device xxx.dwc3 but parent is > > not active' happen in the first place? > > What is the glue driver that's being used here? Knowing what's being done in > > the glue driver pm callbacks would help in understanding the issue. > > > > Regards, > > Roy >