Skip to contentSkip to conversation

PCI / PM: Add dev_dbg() to print device suspend power states

PATCH In review Rafael J. Wysocki 3 participants 3 messages Sep 29, 2017 – Oct 2, 2017 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI / PM: Add dev_dbg() to print device suspend power states

From: Rafael J. Wysocki <[email protected]>

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.

---
 drivers/pci/pci-driver.c |    3 +++
 1 file changed, 3 insertions(+)
drivers/pci/pci-driver.c +3 -0
Index: 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);
 
 	/*
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Rafael J. Wysocki

From: Rafael J. Wysocki <[email protected]>

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.

I think you have other pending changes in this path, so can you take this one as well?

Quoted 19 lines
---
 drivers/pci/pci-driver.c |    3 +++
 1 file changed, 3 insertions(+)

Index: linux-pm/drivers/pci/pci-driver.c
===================================================================

drivers/pci/pci-driver.c +3 -0
@@ -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);
 
 	/*
#2 lore raw
Quoted 7 lines · Bjorn Helgaas
Quoted 6 lines · Rafael J. Wysocki

From: Rafael J. Wysocki <[email protected]>

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.

Quoted 6 lines
Quoted 1 line

I think you have other pending changes in this path, so can you take this one as well?

Yes, I can, thanks!