From patchwork Mon Jul 21 01:18:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 4592581 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (unknown [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9124A9F37F for ; Mon, 21 Jul 2014 01:01:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 948E72010B for ; Mon, 21 Jul 2014 01:00:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EE5E320115 for ; Mon, 21 Jul 2014 01:00:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751573AbaGUBAF (ORCPT ); Sun, 20 Jul 2014 21:00:05 -0400 Received: from v094114.home.net.pl ([79.96.170.134]:56206 "HELO v094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1750795AbaGUBAE (ORCPT ); Sun, 20 Jul 2014 21:00:04 -0400 Received: from aerg63.neoplus.adsl.tpnet.pl [79.191.188.63] (HELO vostro.rjw.lan) by serwer1319399.home.pl [79.96.170.134] with SMTP (IdeaSmtpServer v0.80) id 1d2a7e4b841c588d; Mon, 21 Jul 2014 03:00:02 +0200 From: "Rafael J. Wysocki" To: Bjorn Helgaas Cc: Linux PCI , Linux PM list , Linux Kernel Mailing List , Huang Ying Subject: [Update][PATCH] PCI / PM: Allow PCI devices to be put into D3cold during system suspend Date: Mon, 21 Jul 2014 03:18:24 +0200 Message-ID: <2273188.7kGSSgiQeA@vostro.rjw.lan> User-Agent: KMail/4.11.5 (Linux/3.16.0-rc5+; KDE/4.11.5; x86_64; ; ) In-Reply-To: <3331155.XU3LgTaBr4@vostro.rjw.lan> References: <3331155.XU3LgTaBr4@vostro.rjw.lan> MIME-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Rafael J. Wysocki Commit 448bd857d48e (PCI/PM: add PCIe runtime D3cold support) added a check to prevent PCI devices from being put into D3cold during system suspend without giving any particular reason. Also the check isn't really necessary, because acpi_pci_set_power_state() maps PCI_D3hot to ACPI_STATE_D3_COLD anyway. Signed-off-by: Rafael J. Wysocki --- Ying notices that acpi_pci_set_power_state() maps PCI D3hot to ACPI D3cold, so the check actually isn't effective even, but that means that the second part of my original changelog was in fact incorrect. --- drivers/pci/pci.c | 4 ---- 1 file changed, 4 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux-pm/drivers/pci/pci.c =================================================================== --- linux-pm.orig/drivers/pci/pci.c +++ linux-pm/drivers/pci/pci.c @@ -1907,10 +1907,6 @@ int pci_prepare_to_sleep(struct pci_dev if (target_state == PCI_POWER_ERROR) return -EIO; - /* D3cold during system suspend/hibernate is not supported */ - if (target_state > PCI_D3hot) - target_state = PCI_D3hot; - pci_enable_wake(dev, target_state, device_may_wakeup(&dev->dev)); error = pci_set_power_state(dev, target_state);