The patch titled pci pm: follow PCI_PM_CTRL_NO_SOFT_RESET during transitions from D3 has been added to the -mm tree. Its filename is pci-pm-follow-pci_pm_ctrl_no_soft_reset-during-transitions-from-d3.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: pci pm: follow PCI_PM_CTRL_NO_SOFT_RESET during transitions from D3 From: Rafael J. Wysocki <rjw@xxxxxxx> According to the PCI PM specification (PCI Bus Power Management Interface Specification, Rev. 1.2, Section 5.4.1) we are supposed to reinitialize devices that have PCI_PM_CTRL_NO_SOFT_RESET clear during all transitions from PCI_D3hot to PCI_D0, but we only do it if the device's current_state field is equal to PCI_UNKNOWN. This may lead to problems if a device with PCI_PM_CTRL_NO_SOFT_RESET unset is put into PCI_D3hot at run time by its driver and pci_set_power_state() is used to put it back into PCI_D0, because in that case the device will remain uninitialized after pci_set_power_state() has returned. Prevent that from happening by modifying pci_raw_set_power_state() to reinitialize devices with PCI_PM_CTRL_NO_SOFT_RESET unset during all transitions from D3 to D0. Signed-off-by: Rafael J. Wysocki <rjw@xxxxxxx> Cc: Jesse Barnes <jbarnes@xxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/pci/pci.c | 2 ++ 1 file changed, 2 insertions(+) diff -puN drivers/pci/pci.c~pci-pm-follow-pci_pm_ctrl_no_soft_reset-during-transitions-from-d3 drivers/pci/pci.c --- a/drivers/pci/pci.c~pci-pm-follow-pci_pm_ctrl_no_soft_reset-during-transitions-from-d3 +++ a/drivers/pci/pci.c @@ -485,6 +485,8 @@ static int pci_raw_set_power_state(struc pmcsr &= ~PCI_PM_CTRL_STATE_MASK; pmcsr |= state; break; + case PCI_D3hot: + case PCI_D3cold: case PCI_UNKNOWN: /* Boot-up */ if ((pmcsr & PCI_PM_CTRL_STATE_MASK) == PCI_D3hot && !(pmcsr & PCI_PM_CTRL_NO_SOFT_RESET)) _ Patches currently in -mm which might be from rjw@xxxxxxx are origin.patch linux-next.patch drivers-net-macvlanc-fix-cloning-of-tagged-vlan-interfaces.patch pci-pm-follow-pci_pm_ctrl_no_soft_reset-during-transitions-from-d3.patch pci-pm-read-device-power-state-from-register-after-updating-it.patch drivers-rtc-rtc-cmosc-cmos_init-dont-ignore-pnp_register_driver-return-value.patch mm-pm-freezer-disable-oom-killer-when-tasks-are-frozen.patch pm-hibernate-rework-shrinking-of-memory.patch pm-hibernate-do-not-release-preallocated-memory-unnecessarily-rev-2.patch pm-hibernate-do-not-try-to-allocate-too-much-memory-too-hard.patch shrink_slab-handle-bad-shrinkers.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html