android_kernel_motorola_sm6225/drivers/pci
Eric W. Biederman 392ee1e6dd [PATCH] msi: Safer state caching.
There are two ways pci_save_state and pci_restore_state are used.  As
helper functions during suspend/resume, and as helper functions around
a hardware reset event.  When used as helper functions around a hardware
reset event there is no reason to believe the calls will be paired, nor
is there a good reason to believe that if we restore the msi state from
before the reset that it will match the current msi state.  Since arch
code may change the msi message without going through the driver, drivers
currently do not have enough information to even know when to call
pci_save_state to ensure they will have msi state in sync with the other
kernel irq reception data structures.

It turns out the solution is straight forward, cache the state in the
existing msi data structures (not the magic pci saved things) and
have the msi code update the cached state each time we write to the hardware.
This means we never need to read the hardware to figure out what the hardware
state should be.

By modifying the caching in this manner we get to remove our save_state
routines and only need to provide restore_state routines.

The only fields that were at all tricky to regenerate were the msi and msi-x
control registers and the way we regenerate them currently is a bit dependent
upon assumptions on how we use the allow msi registers to be configured and used
making the code a little bit brittle.  If we ever change what cases we allow
or how we configure the msi bits we can address the fragility then.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-12 16:31:50 -07:00
..
hotplug [PATCH] remove many unneeded #includes of sched.h 2007-02-14 08:09:54 -08:00
pcie PCI: aer: fix section mismatch warning 2007-03-09 15:36:30 -08:00
.gitignore Add some basic .gitignore files 2005-10-18 08:26:15 -07:00
access.c [PATCH] severing module.h->sched.h 2006-12-04 02:00:22 -05:00
bus.c PCI: fix __must_check warnings 2006-09-26 17:43:53 -07:00
hotplug.c [PATCH] driver core: replace "hotplug" by "uevent" 2006-01-04 16:18:08 -08:00
htirq.c PCI: Use pci_find_ht_capability() in drivers/pci/htirq.c 2006-12-20 10:54:42 -08:00
Kconfig [SPARC64]: Add PCI MSI support on Niagara. 2007-02-10 23:50:37 -08:00
Makefile [PATCH] htirq: tidy up the htirq code 2006-10-04 07:55:30 -07:00
msi.c [PATCH] msi: Safer state caching. 2007-03-12 16:31:50 -07:00
msi.h PCI: Make some MSI-X #defines generic 2006-12-01 14:36:56 -08:00
pci-acpi.c pci: clear osc support flags if no _OSC method 2006-12-01 14:36:58 -08:00
pci-driver.c PCI/sysfs/kobject kernel-doc fixes 2007-02-16 15:30:10 -08:00
pci-sysfs.c PCI: Make PCI device numa-node attribute visible in sysfs 2007-02-16 15:30:11 -08:00
pci.c [PATCH] msi: Safer state caching. 2007-03-12 16:31:50 -07:00
pci.h [PATCH] msi: Safer state caching. 2007-03-12 16:31:50 -07:00
probe.c adjust legacy IDE resource setting (v2) 2007-03-03 17:48:54 +01:00
proc.c [PATCH] mark struct file_operations const 5 2007-02-12 09:48:45 -08:00
quirks.c [PATCH] msi: sanely support hardware level msi disabling 2007-03-05 07:57:50 -08:00
remove.c PCI: add pci_stop_bus_device 2006-09-26 17:43:54 -07:00
rom.c Altix: Initial ACPI support - ROM shadowing. 2006-12-01 14:36:58 -08:00
search.c pci: fix section mismatch warning 2007-03-09 15:36:30 -08:00
setup-bus.c PCI: Make CARDBUS_MEM_SIZE and CARDBUS_IO_SIZE boot options 2007-02-16 15:30:10 -08:00
setup-irq.c PCI: PCI devices get assigned redundant IRQs 2007-02-16 15:30:10 -08:00
setup-res.c PCI legacy resource fix 2006-12-20 10:54:43 -08:00
syscall.c [PATCH] remove many unneeded #includes of sched.h 2007-02-14 08:09:54 -08:00