]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
PCI: MSI: Restore read_msi_msg_desc(); add get_cached_msi_msg_desc()
authorBen Hutchings <bhutchings@solarflare.com>
Fri, 23 Jul 2010 13:56:28 +0000 (14:56 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 20 Sep 2010 20:36:09 +0000 (13:36 -0700)
commit339cdb0406b8faae3a8250478059360f32e6a1bf
tree89641eeeccb515940691c4b26b1ef2ece32de1a0
parentfa4dc90c63ad8bd633a082f848c937d0d967d162
PCI: MSI: Restore read_msi_msg_desc(); add get_cached_msi_msg_desc()

commit 30da55242818a8ca08583188ebcbaccd283ad4d9 upstream.

commit 2ca1af9aa3285c6a5f103ed31ad09f7399fc65d7 "PCI: MSI: Remove
unsafe and unnecessary hardware access" changed read_msi_msg_desc() to
return the last MSI message written instead of reading it from the
device, since it may be called while the device is in a reduced
power state.

However, the pSeries platform code really does need to read messages
from the device, since they are initially written by firmware.
Therefore:
- Restore the previous behaviour of read_msi_msg_desc()
- Add new functions get_cached_msi_msg{,_desc}() which return the
  last MSI message written
- Use the new functions where appropriate

Acked-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/ia64/kernel/msi_ia64.c
arch/ia64/sn/kernel/msi_sn.c
arch/x86/kernel/apic/io_apic.c
drivers/pci/msi.c
include/linux/msi.h