From patchwork Wed Dec 13 18:26:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 753559 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="L7Tgag+V" Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on2073.outbound.protection.outlook.com [40.107.96.73]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42A74A7; Wed, 13 Dec 2023 10:27:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ShD3zbI9PpZyLKMeUzfzVD+ZwwfoW9HsgK2AklxtypCNNqYCrslJq2JHp8nhOv7iUWnVQ9cXfjRmG4DgDGpC+eBqywWuBOCrVFQMm+ATaDl+F0xsmYQpGYYu+5bbApbRUpm6g+q1H/tKojr39Bm/xWH07gopPbyJS9nfRsO6aZ0sHXVfMz5ZhJ2JvaSvvnfkzvr5G0lecQ8SMecLUxHLoX/IGW9vBqp1hBxp4KzNMLl/5BQGXUJ8OwPcH1R7noKfRxm2buJvIOS8ePRj+fs5XWpkDFageSuz6eK/kfLC+QME4jUbPesyVOr7WJTXvfWH4ZqKJlZ53V5obGaxF+VK0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=edUbeuuX5BsjxuAwGF3ufN/ANXoiMaNzF9x8579BmJw=; b=ZxT+i5tp1diUylp0Dg/YKZXs0F1z7mk6pp9sU5+dJ0IPid16ThfF8pQjkCtEU/Hs0eo4mhmRPh9681yHldcDdKrKAdpzpdBQHLwE58S0ag4ee8+ftSi3ytVhF98nUUdyB38CBOgkAY5Yzc9UNaRfhfJszaHTR3B1eFacpnsTQ+6J3qq5qFnmtPxZWvjCPNR7XadR1Eyn7QzAAVRyKWrQpHZZwJh86Q1X9oEjfdpMgsYiQqRT0ISeXh8/sXqAeHDLL0L+INdAHjEAsmZ9MUPWmsvpoTWiodvqrFQ6qos7Lf3sSzaCeqNpMiJITkhj2ZP925GsXwFsRtZqKTY6GNAt0Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=google.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=edUbeuuX5BsjxuAwGF3ufN/ANXoiMaNzF9x8579BmJw=; b=L7Tgag+VfzgEm5g+ku9X0YKaVOQOBLEVuwwdO13Hsy5zfEBvSNApHwYgYGS47cwxtWih+UssbqgnGnCgayBIYUCeDOuY+eJM6kteoKXxED9mjaqPA26+qgQdr4ZPCraFlfF2tgB4U7yPGhUTqh7xqa/D7CiKmssrfcPRyjDq3UM= Received: from BYAPR01CA0011.prod.exchangelabs.com (2603:10b6:a02:80::24) by SN7PR12MB7936.namprd12.prod.outlook.com (2603:10b6:806:347::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.33; Wed, 13 Dec 2023 18:27:17 +0000 Received: from CO1PEPF000044EF.namprd05.prod.outlook.com (2603:10b6:a02:80:cafe::a) by BYAPR01CA0011.outlook.office365.com (2603:10b6:a02:80::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.26 via Frontend Transport; Wed, 13 Dec 2023 18:27:17 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1PEPF000044EF.mail.protection.outlook.com (10.167.241.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7091.26 via Frontend Transport; Wed, 13 Dec 2023 18:27:17 +0000 Received: from AUS-P9-MLIMONCI.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Wed, 13 Dec 2023 12:27:15 -0600 From: Mario Limonciello To: Bjorn Helgaas , "Rafael J . Wysocki" CC: , , , Mario Limonciello , Subject: [PATCH 1/2] PCI: Avoid runtime resuming devices if system is shutting down Date: Wed, 13 Dec 2023 12:26:55 -0600 Message-ID: <20231213182656.6165-2-mario.limonciello@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231213182656.6165-1-mario.limonciello@amd.com> References: <20231213182656.6165-1-mario.limonciello@amd.com> Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000044EF:EE_|SN7PR12MB7936:EE_ X-MS-Office365-Filtering-Correlation-Id: cf4fa19b-9f3e-4fc2-38de-08dbfc0922dd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 267UzojrTvQd+L4B8HuF6zUmxDEBK5QwYa/TqdrNZvCvMUJt/FVQ1wsU5b9JoOVStyiFAtcjn1duUAOmK2MQwdgtvBVEXfMVSitZUdUJs0AY0enpn2NS2lVP77ZF127Bj1TRpyjeCAFd7qOPaR2abI/tuTh0kdesNgnXh3mowF6r7MW48c1632AgK0Y3lPvDS97tzG7PdlLg4n6Y2WWmYg/0VnOGyGiblP8vlSOKFPrcjIPA2u/kFJkttQB4VTdj/RN2VXQAggWnAb6oRh+fzyWyEGuafig3jfefep2yOgt/Wt+0SO1Say8JGwI83yHIcuRpdZfWazcRws9F+EGpz4Zd1/WUYy2ZyCvGwWbp3F4Vg8ZVKmXpVZuEFQ9mXaim1vhUEQB/twC2DS3Qm51/DkJjIq3gjOBbN86Mod3893QBtIHBDNQJR5v/CvBlI/LR56NMK3WBWUDHBoyXXfL8G16jB+rIvFlSZHINRfqwKTbdXkJV4wU+ytGrKx5+devirLESfiFhQcDBUohnOI9HSA0u+fNCiRZwmUt6FrrT3mLdD9NXj9Fgy1SH4fHjpG08ioHehTZZnKtYrBQK0zTDILnN5qGT3kZnApvtpHhqJ27G1kENFAoDF73UYtbI6VbDVZlbF8CjGXwbG/qig8zwZOTN+256Sd28xY73DVKCTvZ37qdsWSBx+upxvC83Rl8in6LEiozoTiuEqYsSU+XuOMreCzpLBuXQ6tC9uzQ9LYgfZYFVIctts3lx4cOcXpthHEzlnwjG8+DniyGl7zWMOA== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(4636009)(376002)(136003)(396003)(346002)(39860400002)(230922051799003)(1800799012)(186009)(451199024)(82310400011)(64100799003)(40470700004)(46966006)(36840700001)(83380400001)(2906002)(7696005)(81166007)(41300700001)(356005)(86362001)(478600001)(4744005)(54906003)(426003)(40480700001)(70206006)(82740400003)(70586007)(110136005)(316002)(6666004)(8676002)(8936002)(4326008)(40460700003)(44832011)(36756003)(1076003)(5660300002)(47076005)(36860700001)(16526019)(336012)(2616005)(26005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Dec 2023 18:27:17.1323 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cf4fa19b-9f3e-4fc2-38de-08dbfc0922dd X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF000044EF.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB7936 When the system is going to S5 resuming devices is unnecessary at best and may cause problems for power consumption at S5 at worst. Check the target `system_state` in the pci driver shutdown() callback and skip the runtime resume step if the system is being powered off. Cc: mpearson-lenovo@squebb.ca Signed-off-by: Mario Limonciello --- drivers/pci/pci-driver.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index 51ec9e7e784f..5a6f7a786952 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c @@ -507,7 +507,9 @@ static void pci_device_shutdown(struct device *dev) struct pci_dev *pci_dev = to_pci_dev(dev); struct pci_driver *drv = pci_dev->driver; - pm_runtime_resume(dev); + /* If system will go to S5, don't wake up PCI devices for shutdown */ + if (system_state != SYSTEM_POWER_OFF) + pm_runtime_resume(dev); if (drv && drv->shutdown) drv->shutdown(pci_dev); From patchwork Wed Dec 13 18:26:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 754365 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="amwEBJQf" Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2044.outbound.protection.outlook.com [40.107.102.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6BB4CB9; Wed, 13 Dec 2023 10:27:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fqHaIrehZU5VRXwz+PAitJuocjFdakOdpszCciN9R/rPPBJ2Hb36f3lawGOA+eeqKRIDao01Zr6imYmrEQ9yLDnUE7fcVsiqUaEXlhC9TIsQmIVkNl/8Jo9OOm4NS1g/zMNN6CupShJEMm9At9xFKkCH3UHZ5ADLEw/fx6QvRGJ9lUcxQdkNxxGboKCAN0kVeCOiyvBwBE9rm8HdArDRTXPCcvB20zgkuienkDrejpKRWFX4s7yup4OM7KORcaRdB9fBErjE35ncbaCQHoQRFi9g4fX2uy4sjtGZvBQGsuQkE2zg1AN46oLy2us5uP6q1wSWr7So8jKQEg9SjASFXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=te3kowBT+jbDEk4VX+EtZh/khotxt1fF/P+qjIC+yDc=; b=R1mK9tJneQBq/62C8KRRasPIymJKvWO2gxM+Lgk/WVxOca+6MWkGyncJI6Qe9SeMSn++OInw1Ep6NjJDoZzLCCNhEkkR9EbOuxU3uvHD5V9h9//vo0SOYFLAWX869tsHhVjWlcm1sy2/NAy3irQ64pk4RUEnLG3X5c3BMkOvoor0rYk0GWswvGhaMnzzrpI9ZiJxa544gUu1P/rqYzpBoMGRxetvjSu5TmhJNt0IiwbvQgLB21oVUlUteek4KInkh9HGu5dLumudbAuXuixp1TJ8q5Op94KuayO/zTYDODNhdJQf0WK0xcHpnX3ECBkNUAdDwXAx1OojmzQ608g5Vw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=google.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=te3kowBT+jbDEk4VX+EtZh/khotxt1fF/P+qjIC+yDc=; b=amwEBJQfwTFZS96vwJueBKExEEOrIKdx4fGnrw9T9wZJ323p0mH6Aid8SvLlI2qBwCFasw+noaM3lvDwn1oa930+9c4088oYLbZez7R2WLAgqbYkQEcJ1/DfSGjGgVaMvwwy8wiMUpYZ81+aXcghesan+v5mSaxy3rYvNNbQf3Q= Received: from BYAPR01CA0032.prod.exchangelabs.com (2603:10b6:a02:80::45) by SA1PR12MB7245.namprd12.prod.outlook.com (2603:10b6:806:2bf::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.26; Wed, 13 Dec 2023 18:27:18 +0000 Received: from CO1PEPF000044EF.namprd05.prod.outlook.com (2603:10b6:a02:80:cafe::2) by BYAPR01CA0032.outlook.office365.com (2603:10b6:a02:80::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.26 via Frontend Transport; Wed, 13 Dec 2023 18:27:18 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1PEPF000044EF.mail.protection.outlook.com (10.167.241.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7091.26 via Frontend Transport; Wed, 13 Dec 2023 18:27:17 +0000 Received: from AUS-P9-MLIMONCI.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Wed, 13 Dec 2023 12:27:16 -0600 From: Mario Limonciello To: Bjorn Helgaas , "Rafael J . Wysocki" CC: , , , Mario Limonciello , Subject: [PATCH 2/2] PCI/portdrv: Place PCIe port hierarchy into D3cold at shutdown Date: Wed, 13 Dec 2023 12:26:56 -0600 Message-ID: <20231213182656.6165-3-mario.limonciello@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231213182656.6165-1-mario.limonciello@amd.com> References: <20231213182656.6165-1-mario.limonciello@amd.com> Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000044EF:EE_|SA1PR12MB7245:EE_ X-MS-Office365-Filtering-Correlation-Id: 2bd68045-4312-4317-a9c8-08dbfc09234f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KVAOi+hJeynuYf6L6vVSeiLTlOct0HrRqxEYadE94xHq8YUSm+v+6BBYTj4xnfGjcPVK3Ldda9Fk9Sg5/Hie/7pI45CPL2wg+eKgPXbx4piwt5R8BiIKTOfhDG3LBQV3GzYwI0BW5sLrxgPADcrhwoS/03BnPCC5F/LDqWlR0EccXqPgF+D9qcHeORIFqMVajbh/S4H//KeY8jbvtI2Ul8nGJw93y8k1TxCAVmsbPUGzARDtt7q47F6Oh7OtKIwFHsNzGSJNKs9MwqdrDSNJH/A6qw8aELPO2KTaST7xXIuxO/mnn1f0Ac/Xxz9gKZIQYRhGV1brtPxwuzeyWwFAPdhrNV6Lw4+Oyoa04oNVG8prN/cYqBu3LkMs0Qzw9MwfW56xnZ2G/4Xjt4AqGBZ4O9pTHsPNXXRb3W0KOtmOrwbrm/GAYhBHVjnQsspYIPUCvQfKl0S63j70PZOx7qU21RSo1PCgjcE68bE8vXoWGzlYl50mab/3fTWtcNcpY5nseiwlesWgjAqgcN4UMy0J2N34529KqvyWPFxMjtzrjM1E/xTdlG9QeZMccSz9acsmQJTpYv9gbQJ/Y9xiUC6sUETA0GZhqE2rV6oRu4I34ds3YjCbKcSQyXcI9+E6wvhFwu6eIOULBVkoQaFYnbg2ROoKcrJ/CioIQ5qjY0D4NpSo4r9Ou79ufeBicEjPc1EE0exxh7KXcg/OGELZBYh6GtNh7bDxPEg98bUDcBL+daGXl6B1MdO984Vq4uvc0YAr+1uRMgWzocfT4BrFSXT2gLVk31ReROZr8OlhVk2rduw= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(4636009)(136003)(346002)(376002)(39860400002)(396003)(230922051799003)(451199024)(64100799003)(82310400011)(186009)(1800799012)(46966006)(40470700004)(36840700001)(54906003)(70586007)(70206006)(110136005)(1076003)(6666004)(16526019)(2616005)(7696005)(336012)(26005)(36756003)(426003)(86362001)(47076005)(82740400003)(356005)(83380400001)(81166007)(36860700001)(41300700001)(478600001)(44832011)(40480700001)(8936002)(8676002)(2906002)(4326008)(5660300002)(316002)(40460700003)(32563001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Dec 2023 18:27:17.8823 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2bd68045-4312-4317-a9c8-08dbfc09234f X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF000044EF.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB7245 When a system is being powered off it's important that PCIe ports have been put into D3cold as there is no other software to turn off the devices at S5. If PCIe ports are left in D0 then any GPIOs toggled by the ACPI power resources may be left enabled and devices may consume excess power. Cc: mpearson-lenovo@squebb.ca Signed-off-by: Mario Limonciello --- drivers/pci/pcie/portdrv.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/pci/pcie/portdrv.c b/drivers/pci/pcie/portdrv.c index 14a4b89a3b83..08238680c481 100644 --- a/drivers/pci/pcie/portdrv.c +++ b/drivers/pci/pcie/portdrv.c @@ -734,9 +734,14 @@ static void pcie_portdrv_remove(struct pci_dev *dev) static void pcie_portdrv_shutdown(struct pci_dev *dev) { if (pci_bridge_d3_possible(dev)) { - pm_runtime_forbid(&dev->dev); - pm_runtime_get_noresume(&dev->dev); - pm_runtime_dont_use_autosuspend(&dev->dev); + /* whole hierarchy goes into a low power state for S5 */ + if (system_state == SYSTEM_POWER_OFF) { + pci_set_power_state(dev, PCI_D3cold); + } else { + pm_runtime_forbid(&dev->dev); + pm_runtime_get_noresume(&dev->dev); + pm_runtime_dont_use_autosuspend(&dev->dev); + } } pcie_port_device_remove(dev);