Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3354490pxf; Mon, 15 Mar 2021 07:50:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzvlH9zTveu4pvXRZVMa+qj8797ix8d8W937v6pDdUNwZ9mpIALAD4dN7I8Z354E/Z5BSXo X-Received: by 2002:a17:906:ae8d:: with SMTP id md13mr24025931ejb.275.1615819823922; Mon, 15 Mar 2021 07:50:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615819823; cv=none; d=google.com; s=arc-20160816; b=YS90Mx5QhbTF2E0GH0PYCGGoK6a08P2e1iuuMYOO0eiSVB3bWTpI5agOE7Nj5suAw/ jBU7RfJEAO/NhaRqUHf0QAjFvAzAvUfCnK3kUpgPqRwBXi7KMCA1hO61qbzKdivwcwco V7MnK8Dg8d2XW5QhBzPuC9+n9YMK0hxznzJpBPIjJJPV1ehM0+4XiLVl9Q117ErSBrSs eF1EdoxAPZGPfo6oj3+bTQ+LzoQoNeoSFK7KKGdigUwBX/Sf6tSUcVTLGtcVeswQTMn8 axK0ZQvAr45sJD7fqkNBeEsxXRrx2su+7s4u4bPKIeBqRONiLZIBwO44dHDA/GJvcZ1J tePQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=NlEhZDN7zu3EqN6puWNJdLVw1h9qSwfIwAuQm5sAQT8=; b=wKAWATCDk20GxO3AO4I7DRZEFjSt773OykkOf3hTT7JznQ+i58IC9hq06KGIEYkAOn dWAMqPX8T+f2eOnTdSe/oOyQ5+vUJc+rZtd1ZeRcjHs3XfLbBuTnjNw36rdC8Cx2A9bj wL8M2/sAV3JN3o76RdKqohBuZEzR0GWAc15xk5OJKXhjIOwImyJhgnYR62f/GJXefKyn iUg/jFd0VreTDI/e98y5NXCOzu/dlykw12Hav/Tmyf/9wskmsSMyGQw1NxjV2/Aq2vCa OpuTDnJ7nt282bfjfvULxKT8I+Qn++9dc9IcsfCu/EVcsJri03qRssbjGi9zmkjVBYP0 0q7Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k5si11164369ejc.134.2021.03.15.07.50.01; Mon, 15 Mar 2021 07:50:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241141AbhCOOsb (ORCPT + 99 others); Mon, 15 Mar 2021 10:48:31 -0400 Received: from netrider.rowland.org ([192.131.102.5]:44385 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S232348AbhCOONl (ORCPT ); Mon, 15 Mar 2021 10:13:41 -0400 Received: (qmail 403655 invoked by uid 1000); 15 Mar 2021 10:13:35 -0400 Date: Mon, 15 Mar 2021 10:13:35 -0400 From: Alan Stern To: taehyun cho Cc: balbi@kernel.org, Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] usb: dwc3: remove 'pm_runtime_set_active' in resume callback Message-ID: <20210315141335.GA402778@rowland.harvard.edu> References: <20210315074317.7736-1-taehyun.cho@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210315074317.7736-1-taehyun.cho@samsung.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 15, 2021 at 04:43:17PM +0900, taehyun cho wrote: > 'pm_runtime_set_active' sets a flag to describe rumtime status. > This flag is automatically set in pm_runtime_get_sync/put_sync API. > 'pm_runtime_set_active' checks the runtime status of parent device. > As a result, the below error message is printed. > dwc3 11110000.dwc3: runtime PM trying to activate child device > 11110000.dwc3 but parent (11110000.usb) is not active. This is very suspicious. That error message indicates a real error is present; removing these pm_runtime_set_active calls won't fix the error. You need to determine why the parent platform device 11110000.usb isn't active when the dwc3 probe and resume routines are called. It seems likely that there is a bug in the platform device's driver. Alan Stern > Signed-off-by: taehyun cho > --- > drivers/usb/dwc3/core.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c > index 94fdbe502ce9..e7c0e390f885 100644 > --- a/drivers/usb/dwc3/core.c > +++ b/drivers/usb/dwc3/core.c > @@ -1553,7 +1553,6 @@ static int dwc3_probe(struct platform_device *pdev) > > spin_lock_init(&dwc->lock); > > - pm_runtime_set_active(dev); > pm_runtime_use_autosuspend(dev); > pm_runtime_set_autosuspend_delay(dev, DWC3_DEFAULT_AUTOSUSPEND_DELAY); > pm_runtime_enable(dev); > @@ -1920,7 +1919,6 @@ static int dwc3_resume(struct device *dev) > return ret; > > pm_runtime_disable(dev); > - pm_runtime_set_active(dev); > pm_runtime_enable(dev); > > return 0; > -- > 2.26.0