From patchwork Fri Sep 29 23:31:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 9978825 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 433876034B for ; Fri, 29 Sep 2017 23:40:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 352102981E for ; Fri, 29 Sep 2017 23:40:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 28A72298D3; Fri, 29 Sep 2017 23:40:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5C5562981E for ; Fri, 29 Sep 2017 23:40:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752510AbdI2Xke (ORCPT ); Fri, 29 Sep 2017 19:40:34 -0400 Received: from cloudserver094114.home.net.pl ([79.96.170.134]:49530 "EHLO cloudserver094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752505AbdI2Xkd (ORCPT ); Fri, 29 Sep 2017 19:40:33 -0400 Received: from 79.184.252.54.ipv4.supernova.orange.pl (79.184.252.54) (HELO aspire.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.82) id 739c0447b68cae48; Sat, 30 Sep 2017 01:40:30 +0200 From: "Rafael J. Wysocki" To: Bjorn Helgaas , Linux PCI Cc: Linux PM , LKML , Srinivas Pandruvada Subject: [PATCH] PCI / PM: Add dev_dbg() to print device suspend power states Date: Sat, 30 Sep 2017 01:31:15 +0200 Message-ID: <8776535.A6PtrVU7Ea@aspire.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-Virus-Scanned: ClamAV using ClamSMTP From: Rafael J. Wysocki It sometimes is useful to know what power states the kernel thinks it puts PCI devices into during system suspend, so add a dev_dbg() statement for that. Signed-off-by: Rafael J. Wysocki Acked-by: Bjorn Helgaas --- drivers/pci/pci-driver.c | 3 +++ 1 file changed, 3 insertions(+) Index: linux-pm/drivers/pci/pci-driver.c =================================================================== --- linux-pm.orig/drivers/pci/pci-driver.c +++ linux-pm/drivers/pci/pci-driver.c @@ -798,6 +798,9 @@ static int pci_pm_suspend_noirq(struct d pci_prepare_to_sleep(pci_dev); } + dev_dbg(dev, "PCI PM: Suspend power state: %s\n", + pci_power_name(pci_dev->current_state)); + pci_pm_set_unknown_state(pci_dev); /*