Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'pci/pm' into next

* pci/pm:
PCI: Freeze PME scan before suspending devices
PCI/PM: Don't sleep at all when d3_delay or d3cold_delay is zero

+9 -6
+9 -6
drivers/pci/pci.c
··· 66 66 if (delay < pci_pm_d3_delay) 67 67 delay = pci_pm_d3_delay; 68 68 69 - msleep(delay); 69 + if (delay) 70 + msleep(delay); 70 71 } 71 72 72 73 #ifdef CONFIG_PCI_DOMAINS ··· 828 827 * because have already delayed for the bridge. 829 828 */ 830 829 if (dev->runtime_d3cold) { 831 - msleep(dev->d3cold_delay); 830 + if (dev->d3cold_delay) 831 + msleep(dev->d3cold_delay); 832 832 /* 833 833 * When powering on a bridge from D3cold, the 834 834 * whole hierarchy may be powered on into ··· 1784 1782 } 1785 1783 } 1786 1784 if (!list_empty(&pci_pme_list)) 1787 - schedule_delayed_work(&pci_pme_work, 1788 - msecs_to_jiffies(PME_TIMEOUT)); 1785 + queue_delayed_work(system_freezable_wq, &pci_pme_work, 1786 + msecs_to_jiffies(PME_TIMEOUT)); 1789 1787 mutex_unlock(&pci_pme_list_mutex); 1790 1788 } 1791 1789 ··· 1850 1848 mutex_lock(&pci_pme_list_mutex); 1851 1849 list_add(&pme_dev->list, &pci_pme_list); 1852 1850 if (list_is_singular(&pci_pme_list)) 1853 - schedule_delayed_work(&pci_pme_work, 1854 - msecs_to_jiffies(PME_TIMEOUT)); 1851 + queue_delayed_work(system_freezable_wq, 1852 + &pci_pme_work, 1853 + msecs_to_jiffies(PME_TIMEOUT)); 1855 1854 mutex_unlock(&pci_pme_list_mutex); 1856 1855 } else { 1857 1856 mutex_lock(&pci_pme_list_mutex);