diff options
Diffstat (limited to 'drivers/pci/pci.c')
-rw-r--r-- | drivers/pci/pci.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index a4445b7210bf..e4548ab2a93c 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/spinlock.h> | 18 | #include <linux/spinlock.h> |
19 | #include <linux/string.h> | 19 | #include <linux/string.h> |
20 | #include <linux/log2.h> | 20 | #include <linux/log2.h> |
21 | #include <linux/pci-aspm.h> | ||
21 | #include <asm/dma.h> /* isa_dma_bridge_buggy */ | 22 | #include <asm/dma.h> /* isa_dma_bridge_buggy */ |
22 | #include "pci.h" | 23 | #include "pci.h" |
23 | 24 | ||
@@ -424,7 +425,7 @@ pci_set_power_state(struct pci_dev *dev, pci_power_t state) | |||
424 | */ | 425 | */ |
425 | if (state != PCI_D0 && dev->current_state > state) { | 426 | if (state != PCI_D0 && dev->current_state > state) { |
426 | printk(KERN_ERR "%s(): %s: state=%d, current state=%d\n", | 427 | printk(KERN_ERR "%s(): %s: state=%d, current state=%d\n", |
427 | __FUNCTION__, pci_name(dev), state, dev->current_state); | 428 | __func__, pci_name(dev), state, dev->current_state); |
428 | return -EINVAL; | 429 | return -EINVAL; |
429 | } else if (dev->current_state == state) | 430 | } else if (dev->current_state == state) |
430 | return 0; /* we're already there */ | 431 | return 0; /* we're already there */ |
@@ -501,6 +502,9 @@ pci_set_power_state(struct pci_dev *dev, pci_power_t state) | |||
501 | if (need_restore) | 502 | if (need_restore) |
502 | pci_restore_bars(dev); | 503 | pci_restore_bars(dev); |
503 | 504 | ||
505 | if (dev->bus->self) | ||
506 | pcie_aspm_pm_state_change(dev->bus->self); | ||
507 | |||
504 | return 0; | 508 | return 0; |
505 | } | 509 | } |
506 | 510 | ||