remarkable-linux/drivers/pci
Rafael J. Wysocki e13cdbd71f PCI PM: Read device power state from register after updating it
After attempting to change the power state of a PCI device
pci_raw_set_power_state() doesn't check if the value it wrote into
the device's PCI_PM_CTRL register has been stored in there, but
unconditionally modifies the device's current_state field to reflect
the change.  This may cause problems to happen if the power state of
the device hasn't been changed in fact, because it will make the PCI
PM core make a wrong assumption.

To prevent such situations from happening modify
pci_raw_set_power_state() so that it reads the device's PCI_PM_CTRL
register after writing into it and uses the value read from the
register to update the device's current_state field.  Also make it
print a message saying that the device refused to change its power
state as requested (returning an error code in such cases would cause
suspend regressions to appear on some systems, where device drivers'
suspend routines return error codes if pci_set_power_state() fails).

Reviewed-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-10-06 10:27:51 -07:00
..
hotplug ACPICA: fixup after acpi_get_object_info() change 2009-09-25 14:24:22 -04:00
pcie PCI: PCIe portdrv: remove "-driver" from driver name 2009-10-06 09:41:48 -07:00
.gitignore
access.c
bus.c
dmar.c Merge git://git.infradead.org/iommu-2.6 2009-09-23 10:06:10 -07:00
hotplug-pci.c
hotplug.c
htirq.c
intel-iommu.c Merge git://git.infradead.org/iommu-2.6 2009-09-23 10:06:10 -07:00
intr_remapping.c Merge git://git.infradead.org/iommu-2.6 2009-09-23 10:06:10 -07:00
intr_remapping.h
iov.c PCI SR-IOV: correct broken resource alignment calculations 2009-08-30 08:37:25 -07:00
iova.c
irq.c
Kconfig
legacy.c PCI: disable pci_find_device warnings when deprecated pci functions are enabled 2009-09-09 13:29:25 -07:00
Makefile PCI: disable pci_find_device warnings when deprecated pci functions are enabled 2009-09-09 13:29:25 -07:00
msi.c PCI MSI: Style cleanups 2009-09-09 13:29:35 -07:00
msi.h
pci-acpi.c PCI / ACPI PM: Propagate wake-up enable for devices w/o ACPI support 2009-09-09 14:19:24 -07:00
pci-driver.c Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2009-09-16 07:49:54 -07:00
pci-stub.c PCI: pci-stub: add pci_stub.ids parameter 2009-09-09 13:44:34 -07:00
pci-sysfs.c PCI: expose function reset capability in sysfs 2009-09-09 13:29:24 -07:00
pci.c PCI PM: Read device power state from register after updating it 2009-10-06 10:27:51 -07:00
pci.h PCI: Simplify hotplug mch quirk. 2009-09-09 14:06:49 -07:00
probe.c PCI: Clear saved_state after the state has been restored 2009-09-14 13:41:46 -07:00
proc.c
quirks.c Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2009-09-16 07:49:54 -07:00
remove.c
rom.c
search.c PCI: disable pci_find_device warnings when deprecated pci functions are enabled 2009-09-09 13:29:25 -07:00
setup-bus.c PCI: pcie: Ensure hotplug ports have a minimum number of resources 2009-09-09 14:10:24 -07:00
setup-irq.c
setup-res.c PCI: remove pci_assign_resource_fixed() 2009-10-06 09:42:04 -07:00
slot.c
syscall.c