Received: by 10.223.185.116 with SMTP id b49csp4873541wrg; Wed, 7 Mar 2018 02:29:58 -0800 (PST) X-Google-Smtp-Source: AG47ELsBJjaH1S4x8ptsa8WcsQoyNLvyf1IaWJrarw3mSZtbKb67uonN2d/IUtk0m18bglSOS3qx X-Received: by 10.101.97.72 with SMTP id o8mr18039373pgv.119.1520418598049; Wed, 07 Mar 2018 02:29:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520418598; cv=none; d=google.com; s=arc-20160816; b=ba8jizPW8iqBWzRCK0PcMgTh9RJyhSZw/gFiiEBIoS6vH4JBYFEh5cKWXmeNCdZXQW 90i7x3TnFzPv7ocZbCnw6BsI7RtnQCscQvo6qMOj/pkjqPKR826sjPzOYeQbaY1qr7f3 eAurBoUSwX/pCGvOETV2fIndmOMt86YkVyAMH9tEr96tlgydB2wqcnljWPwlh/Fyeu8K W8Txuy+qp2LV3QhB1s/IRCseM/Hsbv2gDess9BM8tzYYn9Zwj0w+mvEZYkMn7KzLls8B hvtYRaN1pX2qTRyFrXmmodp9KwO74JKdu28KOmoTRGILdFgx1f98A/3szpEU1tgimi63 mN1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=Xly6JAxX+S2LNm+L5fM/PQ78O0UlasTF6RrYyuN00Fk=; b=pdqOossgRHG/uej4aWI9mfpfjoqexN++FwKZ0/GGxkzgvRYLuSwkw/7inFetu+zyCX jpiYYgjinNxXgvdpp8asLGKKYvVc+ujEkVCWgs9U8ZBUePhsIvINJhVn+KX6pt3YYrBP QUXTcT9/iyIzY7nFZfYxyY9viE5WkhkHgoST/dTd9O/Z61TtmCq2rf4kmDbG7J6EnrOB CORQwI2KWUR5vAJtKHIEqAsw8RgTPlTbjuDnWh5OoqCn+f8TzJbMXOeEtWM7BoFzbBDj u89FTJjejE969At77V13lSONEWvMcw6nwrpWoUBNqg+2a6Q+1wXX+X/vX/mX8gcHLA8h SNUg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v35si11268312pgn.284.2018.03.07.02.29.43; Wed, 07 Mar 2018 02:29:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754275AbeCGK2f (ORCPT + 99 others); Wed, 7 Mar 2018 05:28:35 -0500 Received: from cloudserver094114.home.pl ([79.96.170.134]:49636 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751142AbeCGK2d (ORCPT ); Wed, 7 Mar 2018 05:28:33 -0500 Received: from 79.184.254.228.ipv4.supernova.orange.pl (79.184.254.228) (HELO aspire.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83) id f325a23b61c8fb1b; Wed, 7 Mar 2018 11:28:31 +0100 From: "Rafael J. Wysocki" To: Bjorn Helgaas Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Keith Busch , Sinan Kaya , Lukas Wunner Subject: Re: [PATCH v1 4/9] PCI/portdrv: Disable port driver in compat mode Date: Wed, 07 Mar 2018 11:29:15 +0100 Message-ID: <38992036.3QHJjk5T7c@aspire.rjw.lan> In-Reply-To: <152040322576.240786.3375466676254382935.stgit@bhelgaas-glaptop.roam.corp.google.com> References: <152040297576.240786.1532465558381209070.stgit@bhelgaas-glaptop.roam.corp.google.com> <152040322576.240786.3375466676254382935.stgit@bhelgaas-glaptop.roam.corp.google.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday, March 7, 2018 7:13:45 AM CET Bjorn Helgaas wrote: > From: Bjorn Helgaas > > The "pcie_ports=compat" kernel parameter sets pcie_ports_disabled, which is > intended to disable the PCIe port driver. But even when it was disabled, > we registered pcie_portdriver so we could work around a BIOS PME issue (see > fe31e69740ed ("PCI/PCIe: Clear Root PME Status bits early during system > resume")). > > Registering the driver meant that the pcie_portdrv_probe() path called > pci_enable_device(), pci_save_state(), pm_runtime_set_autosuspend_delay(), > pm_runtime_use_autosuspend(), etc., even when the driver was disabled. > > We've since moved the BIOS PME workaround from the port driver to the core, > so stop registering the PCIe port driver in compat mode. > > This means "pcie_ports=compat" will now be basically the same as turning > off CONFIG_PCIEPORTBUS completely. > > Signed-off-by: Bjorn Helgaas > --- > drivers/pci/pcie/portdrv_core.c | 3 --- > drivers/pci/pcie/portdrv_pci.c | 2 +- > 2 files changed, 1 insertion(+), 4 deletions(-) > > diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c > index ef3bad4ad010..9db77c683732 100644 > --- a/drivers/pci/pcie/portdrv_core.c > +++ b/drivers/pci/pcie/portdrv_core.c > @@ -212,9 +212,6 @@ static int get_port_device_capability(struct pci_dev *dev) > int services = 0; > int cap_mask = 0; > > - if (pcie_ports_disabled) > - return 0; > - > cap_mask = PCIE_PORT_SERVICE_PME | PCIE_PORT_SERVICE_HP > | PCIE_PORT_SERVICE_VC; > if (pci_aer_available()) > diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c > index f91afd09e356..c08ebd237242 100644 > --- a/drivers/pci/pcie/portdrv_pci.c > +++ b/drivers/pci/pcie/portdrv_pci.c > @@ -262,7 +262,7 @@ static int __init pcie_portdrv_init(void) > int retval; > > if (pcie_ports_disabled) > - return pci_register_driver(&pcie_portdriver); > + return -EACCES; > > dmi_check_system(pcie_portdrv_dmi_table); > > > Reviewed-by: Rafael J. Wysocki