Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1135721rdb; Mon, 19 Feb 2024 05:35:29 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUzcEGu9W9B9Ex8lG6qRBDKRGst8l4r2gFwBOSkICQ4z6rJpi1emu+783QmBqwAyJ9n+y+XJ/nMIUGowv9FKCvcydvhjsYrToMtpj2uJQ== X-Google-Smtp-Source: AGHT+IHDtqpl3Az5tYNUfZR04HCmLBH/d84m4N8qfqklGKQ3hZ9SpBJIsOeLjlp2+nA2laLaOSV0 X-Received: by 2002:a17:902:d34b:b0:1db:ceb0:2022 with SMTP id l11-20020a170902d34b00b001dbceb02022mr5594424plk.27.1708349729405; Mon, 19 Feb 2024 05:35:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708349729; cv=pass; d=google.com; s=arc-20160816; b=ALTFxRcPsb1L7LluHJo66YO910hTU4/Li4ZVc9TYIrzDQBcnWMSzdJvQMpBdDvCN+M zEr5m4Lq/Vakq6mlR/ZI4XEmLBKDIqmwDNwRcnuq3RzuvdQHM4/ioSvajX5ajVcBQVg3 SIn2+VMxWon0lMhpHTSLWkWkq60BnpMcmZUjfatdsMtPonJj1ZRT6t6mSPCdp4JAcnjo P73Qv/6klNOEco1IKLalyFPwE2WFw+f92jK2Cjjqb8EFtkso3R/E/iEK1b3ix7S+JHPl NZp/7saVpf9HkeKQo00QY1syK9x/8FDEdt9IJCqFwXrx5xWHdEbMGaw8eo9KLCRfMEZO vsag== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:message-id:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:subject:date :from:dkim-signature; bh=F7iD/VqgEIiLKlYBQdbtCp2S7O7L8FqKjuOYcPetuLs=; fh=Y45W6gNqcLJQ20Kkv5RbmoHaySKcJQw1vc3n52ecCq0=; b=dq/C8dUNmxfPpkcZya3DfXCJwRL0Lnp5xu+Mber2ojlGqGvwexpGPvVqKucrXkJmMq fepo+gWgBjcY9PS6cA18klYr6t5AtAd7Kl1qqIZMuiMZq4cyM+9hWzGmMNhrF6VtJltG r1asbKjuCBUSadYWbr/58XvXUENIITWMTPWcLA1XKuzgl3r7X0r6ioJh8YZwzk2EVdLe ybnfcPkz1DZaM6eE6zhZcoPRhuqj9eT4/I7rSQ0hLjWJd5NP9IyheMaG8I7N/zcdXp37 q1hCWbfpA3s4pUbIJOJIbQuW7lUEvx04XGEqoI8CED9fpUxvkHilugIY/CnXj04+Acum VUVA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=B5QVJHKv; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-71397-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71397-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id je20-20020a170903265400b001db61ef0514si4361258plb.85.2024.02.19.05.35.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 05:35:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-71397-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=B5QVJHKv; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-71397-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71397-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 4A8DDB232BD for ; Mon, 19 Feb 2024 13:21:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7017F36136; Mon, 19 Feb 2024 13:21:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="B5QVJHKv" Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 37BFF2E834; Mon, 19 Feb 2024 13:21:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708348900; cv=none; b=Lzbd3c9OHoyROggHBBH/aBSm71o4Z6QB01snM+rjWsktQZ3tpfWYIz37Up2kTNIjrDeuREe7FSdhN43BiJjpFZHwoh9/Cmxl7A5ug5jSvDkWQAl55MtddjG8Tpv5z8JSItFcHFYycsPkqb6L7HZ7iC4SaIvYSr7t98IW1ZF29s0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708348900; c=relaxed/simple; bh=lC+Va8VKJJRnjPL1NP5hZ/mWgsIad/xDcJU8KKEla+E=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:To:CC; b=JFFpnWpwyhOYvMcBpiBFf+VQw/ZnZBxw+G15eQY1RTWWMwYJ+O07A0Tfn+u/iTuI/4CLu2kTLkWfEigIj0IwI+4dGITBjSFqOXhvYoAD1w1mJrQRuossB4n021itcTI2jbsRzLVJqqsK+ofqxAv9DL8HNPqgKU/4rVmaDuYQa60= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=B5QVJHKv; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41JCiNFU018209; Mon, 19 Feb 2024 13:21:28 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:date:subject:mime-version:content-type :content-transfer-encoding:message-id:to:cc; s=qcppdkim1; bh=F7i D/VqgEIiLKlYBQdbtCp2S7O7L8FqKjuOYcPetuLs=; b=B5QVJHKv8YU0U2gA/Dr Ek18Kx8ENx8SUHM8/c3QrlzhXlWF2baE5BpvaDCQwOGaKSUz31EFTaY5SUb9cb2V ALNkGi1BWXNNyy+cDdJYKjXCElDRNKJ0tQ4HJYm5frBBtyfa/5BXByIOtn5A+pVn pCYjQEhnrxPD0MswXlRQf+R9+wHtB/xloHz35IfNLQzLWgfZhhEatGUx3odu1316 xWbgYh9enM/VXhPHF7ZPurgf7xEU5kw/3ps23fK0P3GUtdbtjoOSeXGjmL+jOPVh dzNxZTEsNh/XTH3T9Wrkxs7MPFS/n2bLaCx7LEiSmGZW7gbRNd0WXLZDx0MosMM/ muQ== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3wc78qr24j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 19 Feb 2024 13:21:28 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 41JDLRWW015729 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 19 Feb 2024 13:21:27 GMT Received: from hu-krichai-hyd.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Mon, 19 Feb 2024 05:21:23 -0800 From: Krishna chaitanya chundru Date: Mon, 19 Feb 2024 18:51:10 +0530 Subject: [PATCH] PCI: dwc: Enable runtime pm of the host bridge 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-Transfer-Encoding: 7bit Message-ID: <20240219-runtime_pm_enable-v1-1-d39660310504@quicinc.com> X-B4-Tracking: v=1; b=H4sIAMZV02UC/x3MQQqAIBBA0avIrBNUiqirRITmVANpohWBdPek5 Vv8nyFhJEzQswwRb0p0+AJZMZg37VfkZItBCVULJTseL3+Swym4Cb02O3JjZ9l2sja2EVC6EHG h538O4/t+PxSkQWMAAAA= To: Jingoo Han , Gustavo Pimentel , Manivannan Sadhasivam , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas CC: , , , , , , , Krishna chaitanya chundru X-Mailer: b4 0.13-dev-83828 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708348882; l=1466; i=quic_krichai@quicinc.com; s=20230907; h=from:subject:message-id; bh=lC+Va8VKJJRnjPL1NP5hZ/mWgsIad/xDcJU8KKEla+E=; b=uItbQ0PRyWCOqJ4GM6tXMhioNvyuGlpf0qLZwqb0FVXGXoQYKMkFJHVBAc37WwDCbpYKHRX7x UJ461EQdg1YDr+nAnerFDyH+ncy8TJhTaA+qCHcnls78GuO+vvzG6FQ X-Developer-Key: i=quic_krichai@quicinc.com; a=ed25519; pk=10CL2pdAKFyzyOHbfSWHCD0X0my7CXxj8gJScmn1FAg= X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: rIGyQEr32HOD5ThTKYpcNVhD5kBNqavq X-Proofpoint-ORIG-GUID: rIGyQEr32HOD5ThTKYpcNVhD5kBNqavq X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-19_09,2024-02-19_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 lowpriorityscore=0 adultscore=0 spamscore=0 mlxscore=0 priorityscore=1501 mlxlogscore=785 phishscore=0 malwarescore=0 suspectscore=0 impostorscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401310000 definitions=main-2402190099 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. 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