From patchwork Mon May 1 12:06:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Wunner X-Patchwork-Id: 757150 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3wGjtX39G0z9s2G for ; Mon, 1 May 2017 22:10:44 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423986AbdEAMKn (ORCPT ); Mon, 1 May 2017 08:10:43 -0400 Received: from mailout1.hostsharing.net ([83.223.95.204]:40463 "EHLO mailout1.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1165096AbdEAMKn (ORCPT ); Mon, 1 May 2017 08:10:43 -0400 Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mailout1.hostsharing.net (Postfix) with ESMTPS id 42D851019265C; Mon, 1 May 2017 14:09:31 +0200 (CEST) Received: from localhost (5-38-90-81.adsl.cmo.de [81.90.38.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by h08.hostsharing.net (Postfix) with ESMTPSA id A2BFD603E214; Mon, 1 May 2017 14:10:40 +0200 (CEST) X-Mailbox-Line: From f8ddb6ebb9a5d78b5cbbadc12a25b359052c7d03 Mon Sep 17 00:00:00 2001 Message-Id: In-Reply-To: References: From: Lukas Wunner Date: Mon, 1 May 2017 14:06:39 +0200 Subject: [PATCH 5/5] PCI: Whitelist native hotplug ports for runtime PM To: Bjorn Helgaas , linux-pci@vger.kernel.org, Ashok Raj , Yinghai Lu Cc: "Rafael J. Wysocki" , Mika Westerberg , Erik Veijola , Keith Busch , Krishna Dhulipala , Wei Zhang Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Previously we blacklisted PCIe hotplug ports for runtime PM because: (a) Ports handled by the firmware must not be transitioned to D3hot by OSPM behind the firmware's back: https://bugzilla.kernel.org/show_bug.cgi?id=53811 (b) For ports handled natively by OSPM we lacked proper runtime PM support in the pciehp driver. We've just rectified the latter, so stop blacklisting those. Cc: Rafael J. Wysocki Cc: Mika Westerberg Cc: Erik Veijola Cc: Ashok Raj Cc: Keith Busch Cc: Yinghai Lu Cc: Krishna Dhulipala Cc: Wei Zhang Signed-off-by: Lukas Wunner --- drivers/pci/pci.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index b01bd5bba8e6..7567e575d536 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -2244,13 +2244,10 @@ bool pci_bridge_d3_possible(struct pci_dev *bridge) return false; /* - * Hotplug interrupts cannot be delivered if the link is down, - * so parents of a hotplug port must stay awake. In addition, - * hotplug ports handled by firmware in System Management Mode + * Hotplug ports handled by firmware in System Management Mode * may not be put into D3 by the OS (Thunderbolt on non-Macs). - * For simplicity, disallow in general for now. */ - if (bridge->is_hotplug_bridge) + if (bridge->is_hotplug_bridge && !pciehp_is_native(bridge)) return false; if (pci_bridge_d3_force)