Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1391674rbb; Mon, 26 Feb 2024 07:55:27 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW8mjIhdfP65KYxfXC7Ih22UA3/VWtUttUgAuyZ7wlUFRVwgFdYeLIwGxI/01kB4wx3vVfRhewHQCjDKpeH+EnlMb7pnfl3x8CaxuNz9Q== X-Google-Smtp-Source: AGHT+IFSL3rt5uJxX0jaERqh4L0XdzfTLn/SVuFbKtUdfkvtb5ge/HkrJMo+v8D43feFHi6AyX5M X-Received: by 2002:a17:90a:c2:b0:29a:9952:67b7 with SMTP id v2-20020a17090a00c200b0029a995267b7mr4287356pjd.48.1708962927115; Mon, 26 Feb 2024 07:55:27 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708962927; cv=pass; d=google.com; s=arc-20160816; b=VIlVQLzGgR02x8mRBEDmbMIQ98EdfRSQOjXWOfoJD1p+5NtbiffjkxX7jhgI6Y1+wZ +rtXjB/MX2WH/yXDYyHuIRTROpQNH9p6xPd3pcMTLWgHBfdeN09NQEK8911ygF5BZE17 MyZosqkxl5mk9YTmrWr9aKMTX9rI3sufnEDD94FuTzWw7U9+CLNcA8Bl93q804Ptda6I LEArDT1qFYbYUY965Vfd0oBvATRMSigc8RKEMa3x9HwAsBQii9qwrGVGEpUfPM3BKnX0 axORBKIoXp8zqjf+xx2tlyOygbZtwbAPb3wHx/GBlO0CcyRxO8VWxzaTvIm8OPtyUpAz yyGA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=+nBVkKUEU1VV5noZ6moMvrYQVjPEZ5C+2vmC/uOqgIU=; fh=oXOLbpze2Hw3iKVk7JOdryidRT4/DVUXZUrkpF2NP5s=; b=JASXwuVuk+bFWIwh0UBDbHqCQcV85zS3z0xvOiw0kREEdudYB4YFhLRofH/u0uVVur BaLxDA/x3N2IgQpVvEBRwRoR2WrzZI/D3CLwCUnv1NnITxqII3XEHVjvqX/VwYfX1LRo 3xffjyHd12ytDcsf0tKsk6DerZ0HzoY7oE1TdPwirh1AmvBLjF4X5xbCFjn8Zu5iiSHd cipRp5Dq3oXu9nyU2FgJKzhYOe7zMcYrfwajes0FFrJJL6mqHulrKnuorURurfxxU7s1 jNcOv1aCKH/bMPf/yHdhJOg+zlkIBvzRdWujrZhVyI6M85RStw0s4mi5YrI0Tsep1fwp ujRQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=x92asZzr; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-81847-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81847-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id st12-20020a17090b1fcc00b0029aa3d57d64si3540672pjb.110.2024.02.26.07.55.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 07:55:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-81847-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=x92asZzr; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-81847-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81847-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 23BB3288BEF for ; Mon, 26 Feb 2024 15:54:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 960CC12C7E2; Mon, 26 Feb 2024 15:53:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="x92asZzr" Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) (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 3441212C54F for ; Mon, 26 Feb 2024 15:53:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708962793; cv=none; b=Kaetg3lRAyoeMuUBsGF3KXenichZ2qPxN4GIMwPPuxu5qfQ+P4tpqzW2QYPmBTVxdvNdB7lUAR4W7ZXloAHWiiznpKUsrjFB+uNIYZKy6QZwVjllBfNw7xtYCBkcC49nKmY1DOfG02mC2COuA6tSHIbozJ9AF7ppulvQRcVDyiA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708962793; c=relaxed/simple; bh=LzSfVYbpwcIiL18jrY1RntgAfMo3GM+npwXu3qQi47E=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=SMCTrV2y5vS6rNChZimC6uTgEb3/iC9MSzbTJfkPTLAbRs8O18dLEXDg6PhwIybpRBsozR5f9WFF5aP8NK3EPhGcwWTGjFZcnu5t5YsgprapE1wk4sCFH7NGFEa0tEmz/dcQw3cTSleDniXarVm3k7/HbyAdja81+EH7ptAf5Yg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=x92asZzr; arc=none smtp.client-ip=209.85.214.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-pl1-f169.google.com with SMTP id d9443c01a7336-1dc13fb0133so23310475ad.3 for ; Mon, 26 Feb 2024 07:53:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708962791; x=1709567591; 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=+nBVkKUEU1VV5noZ6moMvrYQVjPEZ5C+2vmC/uOqgIU=; b=x92asZzrUW+5n//qeklcwltHhx6H2rS5QquHGr8MwTohQtMkP6twG5rJXYLXuE2qsV HrMvYGjAGbBOxH0YsFs98yxTjJjyB9t4o7YcsWUpyrrMfaCJR19WPg9Ms42PLPkIQP9v tGAejLdJI481Y4NhDTiFXbtGyYO3qY02HI/3iiu39ObDJaiLb0D0+U1EzKQNWMBq3toY vS8mEtG6HZJb+PVlpdhg+1UFXplMPk5bUMQK5xitcUnsoCFZ9p+rAzOSq2fmSMBoBuPF l3HQb4u10reDfwEvTOkLFGAAkFV99JrT9acUI3kgdfOw02F8HO18El/NRd6c5taF971R DSLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708962791; x=1709567591; 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=+nBVkKUEU1VV5noZ6moMvrYQVjPEZ5C+2vmC/uOqgIU=; b=ddqaugIrmfPW2/fe3wYgIS7p5Mdbqt/alm4mscj0hW8xRogtJr5Ts2EFG96EH3qQPo nOnqUwJ8E8V4M67DP7UNyX7uIMXIae1WBKYEyw2Wie+lz4DLp09gA7z8/7NOvkpSomu/ MVSSpIAbIPvH9u1U1ANUMGPQn02BCkTAVIv6Xv/qpnlTqFdvO3nrYGu6j5s1/ugOozWR qaFviCYlEtuqLeqKwJ5HPKAzA02Yb3HrtbDzV+4N6rbfM7t2mvqWgacR1G1E7awRMhcI ZszU5lvzNiHtv1ZShm14moNtgLNYomTQsOhsqKurZTu6tZ4zglnpU+O9RhyhI2Mv+tA4 JqTg== X-Forwarded-Encrypted: i=1; AJvYcCWHl/AUZIsATNQ6IYDUWb0YntvQCrSWVijwPIRIto5KgV/zrLQdiuYEb/mE+CfG/5F1q78WBuDaNybl9fG9zmkssjtFQZcd5RorAzeI X-Gm-Message-State: AOJu0YwIAWHKLuulkqlMicKUiwcEOQKxsfOUEcqzmHlTu0ioZTGnVunO huM6xw7UzOX6rCcVc3HNmyWuRBilcI9tAmIBeVod8tGTXYh+InRoesAeRFCKQlla08zhc5jdChc = X-Received: by 2002:a17:902:7295:b0:1dc:af82:98b2 with SMTP id d21-20020a170902729500b001dcaf8298b2mr919854pll.43.1708962791446; Mon, 26 Feb 2024 07:53:11 -0800 (PST) Received: from thinkpad ([117.202.184.81]) by smtp.gmail.com with ESMTPSA id g7-20020a1709026b4700b001dc391cc28fsm4060905plt.121.2024.02.26.07.53.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 07:53:10 -0800 (PST) Date: Mon, 26 Feb 2024 21:23:05 +0530 From: Manivannan Sadhasivam To: Krishna chaitanya chundru Cc: Jingoo Han , Gustavo Pimentel , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, quic_vbadigan@quicinc.com, quic_ramkri@quicinc.com, quic_nitegupt@quicinc.com, quic_skananth@quicinc.com, quic_parass@quicinc.com Subject: Re: [PATCH] PCI: dwc: Enable runtime pm of the host bridge Message-ID: <20240226155305.GJ8422@thinkpad> References: <20240219-runtime_pm_enable-v1-1-d39660310504@quicinc.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: <20240219-runtime_pm_enable-v1-1-d39660310504@quicinc.com> On Mon, Feb 19, 2024 at 06:51:10PM +0530, Krishna chaitanya chundru wrote: > Currently controller driver goes to runtime suspend irrespective > of the child(pci-pci bridge & endpoint driver) runtime state. > This is because the runtime pm is not being enabled for the host > bridge dev which maintains parent child relationship. > You should describe the parent-child topology first. Maybe a simple flow like below will help: PCIe Controller | PCIe Host bridge | PCI-PCI bridge | PCIe endpoint Also explain the fact that since runtime PM is disabled for host bridge, the state of the child devices under the host bridge is not taken into account by PM framework for the top level parent, PCIe controller. So PM framework, allows the controller driver to enter runtime PM irrespective of the state of the devices under the host bridge. And this causes the topology breakage and also possible PM issues. - Mani > So enable pm runtime for the host bridge, so that controller driver > goes to suspend only when all child devices goes to runtime suspend. > > Signed-off-by: Krishna chaitanya chundru > --- > drivers/pci/controller/dwc/pcie-designware-host.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c > index d5fc31f8345f..57756a73df30 100644 > --- a/drivers/pci/controller/dwc/pcie-designware-host.c > +++ b/drivers/pci/controller/dwc/pcie-designware-host.c > @@ -16,6 +16,7 @@ > #include > #include > #include > +#include > > #include "../../pci.h" > #include "pcie-designware.h" > @@ -505,6 +506,9 @@ int dw_pcie_host_init(struct dw_pcie_rp *pp) > if (pp->ops->post_init) > pp->ops->post_init(pp); > > + pm_runtime_set_active(&bridge->dev); > + pm_runtime_enable(&bridge->dev); > + > return 0; > > err_stop_link: > > --- > base-commit: 6613476e225e090cc9aad49be7fa504e290dd33d > change-id: 20240219-runtime_pm_enable-bdc17914bd50 > > Best regards, > -- > Krishna chaitanya chundru > -- மணிவண்ணன் சதாசிவம்