Message ID | 20161121214526.21036.73271.stgit@bhelgaas-glaptop.roam.corp.google.com (mailing list archive) |
---|---|
State | New, archived |
Delegated to: | Bjorn Helgaas |
Headers | show |
On Monday, November 21, 2016 03:45:26 PM Bjorn Helgaas wrote: > We already log a "Signaling PME" whenever the PME service driver claims a > Root Port. In fact, we also log the same message for every device in the > hierarchy below the Root Port. > > Log the "Signaling PME" once (only for the Root Port, since we can > trivially find out which devices are below the Root Port), and include the > IRQ number in the message to help connect the dots with /proc/interrupts. > > Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> > --- > drivers/pci/pcie/pme.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/drivers/pci/pcie/pme.c b/drivers/pci/pcie/pme.c > index 9e8aa9d..7175293 100644 > --- a/drivers/pci/pcie/pme.c > +++ b/drivers/pci/pcie/pme.c > @@ -300,8 +300,6 @@ static irqreturn_t pcie_pme_irq(int irq, void *context) > */ > static int pcie_pme_set_native(struct pci_dev *dev, void *ign) > { > - dev_info(&dev->dev, "Signaling PME through PCIe PME interrupt\n"); > - > device_set_run_wake(&dev->dev, true); > dev->pme_interrupt = true; > return 0; > @@ -349,12 +347,14 @@ static int pcie_pme_probe(struct pcie_device *srv) > ret = request_irq(srv->irq, pcie_pme_irq, IRQF_SHARED, "PCIe PME", srv); > if (ret) { > kfree(data); > - } else { > - pcie_pme_mark_devices(port); > - pcie_pme_interrupt_enable(port, true); > + return ret; > } > > - return ret; > + dev_info(&port->dev, "Signaling PME with IRQ %d\n", srv->irq); > + > + pcie_pme_mark_devices(port); > + pcie_pme_interrupt_enable(port, true); > + return 0; > } > > static bool pcie_pme_check_wakeup(struct pci_bus *bus) > > -- Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> -- 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
diff --git a/drivers/pci/pcie/pme.c b/drivers/pci/pcie/pme.c index 9e8aa9d..7175293 100644 --- a/drivers/pci/pcie/pme.c +++ b/drivers/pci/pcie/pme.c @@ -300,8 +300,6 @@ static irqreturn_t pcie_pme_irq(int irq, void *context) */ static int pcie_pme_set_native(struct pci_dev *dev, void *ign) { - dev_info(&dev->dev, "Signaling PME through PCIe PME interrupt\n"); - device_set_run_wake(&dev->dev, true); dev->pme_interrupt = true; return 0; @@ -349,12 +347,14 @@ static int pcie_pme_probe(struct pcie_device *srv) ret = request_irq(srv->irq, pcie_pme_irq, IRQF_SHARED, "PCIe PME", srv); if (ret) { kfree(data); - } else { - pcie_pme_mark_devices(port); - pcie_pme_interrupt_enable(port, true); + return ret; } - return ret; + dev_info(&port->dev, "Signaling PME with IRQ %d\n", srv->irq); + + pcie_pme_mark_devices(port); + pcie_pme_interrupt_enable(port, true); + return 0; } static bool pcie_pme_check_wakeup(struct pci_bus *bus)
We already log a "Signaling PME" whenever the PME service driver claims a Root Port. In fact, we also log the same message for every device in the hierarchy below the Root Port. Log the "Signaling PME" once (only for the Root Port, since we can trivially find out which devices are below the Root Port), and include the IRQ number in the message to help connect the dots with /proc/interrupts. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> --- drivers/pci/pcie/pme.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 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