[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1358525267-14268-9-git-send-email-jiang.liu@huawei.com>
Date: Sat, 19 Jan 2013 00:07:46 +0800
From: Jiang Liu <liuj97@...il.com>
To: "Rafael J . Wysocki" <rjw@...k.pl>,
Bjorn Helgaas <bhelgaas@...gle.com>
Cc: Jiang Liu <jiang.liu@...wei.com>, Yinghai Lu <yinghai@...nel.org>,
Kenji Kaneshige <kaneshige.kenji@...fujitsu.com>,
Yijing Wang <wangyijing@...wei.com>,
Jiang Liu <liuj97@...il.com>, linux-kernel@...r.kernel.org,
linux-pci@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
Toshi Kani <toshi.kani@...com>,
Myron Stowe <myron.stowe@...hat.com>
Subject: [RFC PATCH v5 8/8] PCI/PCIe: only claim PME from firmware when CONFIG_PCIE_PME is enabled
If CONFIG_PCIE_PME is not defined, system should avoid claiming PME from
firmware so firmware could still manage PME events for those devices.
Also don't create PCIe port device for PME service if CONFIG_PCIE_PME
is not defined.
Signed-off-by: Jiang Liu <jiang.liu@...wei.com>
---
drivers/acpi/pci_root.c | 5 +++--
drivers/pci/pcie/portdrv_core.c | 4 +++-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
index c37eedb..7f7e464 100644
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -550,8 +550,9 @@ static int __devinit acpi_pci_root_add(struct acpi_device *device)
if (!pcie_ports_disabled
&& (flags & ACPI_PCIE_REQ_SUPPORT) == ACPI_PCIE_REQ_SUPPORT) {
- flags = OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL
- | OSC_PCI_EXPRESS_PME_CONTROL;
+ flags = OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL;
+ if (IS_ENABLED(CONFIG_PCIE_PME))
+ flags |= OSC_PCI_EXPRESS_PME_CONTROL;
if (!pcie_native_hotplug_disabled)
flags |= OSC_PCI_EXPRESS_NATIVE_HP_CONTROL;
diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c
index e7e1679..7e6546f 100644
--- a/drivers/pci/pcie/portdrv_core.c
+++ b/drivers/pci/pcie/portdrv_core.c
@@ -263,7 +263,9 @@ static int get_port_device_capability(struct pci_dev *dev)
err = pcie_port_platform_notify(dev, &cap_mask);
if (!pcie_ports_auto) {
- cap_mask = PCIE_PORT_SERVICE_PME | PCIE_PORT_SERVICE_VC;
+ cap_mask = PCIE_PORT_SERVICE_VC;
+ if (IS_ENABLED(CONFIG_PCIE_PME))
+ cap_mask |= PCIE_PORT_SERVICE_PME;
if (!pcie_native_hotplug_disabled)
cap_mask |= PCIE_PORT_SERVICE_HP;
if (pci_aer_available())
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists