diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2010-07-23 09:56:28 -0400 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2010-07-30 12:41:39 -0400 |
commit | 30da55242818a8ca08583188ebcbaccd283ad4d9 (patch) | |
tree | eaa39565cf37a2fbc739e1af02b569107aeee447 /include/linux/msi.h | |
parent | 911e1c9b05a8e3559a7aa89083930700a0b9e7ee (diff) |
PCI: MSI: Restore read_msi_msg_desc(); add get_cached_msi_msg_desc()
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>
Diffstat (limited to 'include/linux/msi.h')
-rw-r--r-- | include/linux/msi.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/msi.h b/include/linux/msi.h index 6991ab5b24d1..91b05c171854 100644 --- a/include/linux/msi.h +++ b/include/linux/msi.h | |||
@@ -14,8 +14,10 @@ struct irq_desc; | |||
14 | extern void mask_msi_irq(unsigned int irq); | 14 | extern void mask_msi_irq(unsigned int irq); |
15 | extern void unmask_msi_irq(unsigned int irq); | 15 | extern void unmask_msi_irq(unsigned int irq); |
16 | extern void read_msi_msg_desc(struct irq_desc *desc, struct msi_msg *msg); | 16 | extern void read_msi_msg_desc(struct irq_desc *desc, struct msi_msg *msg); |
17 | extern void get_cached_msi_msg_desc(struct irq_desc *desc, struct msi_msg *msg); | ||
17 | extern void write_msi_msg_desc(struct irq_desc *desc, struct msi_msg *msg); | 18 | extern void write_msi_msg_desc(struct irq_desc *desc, struct msi_msg *msg); |
18 | extern void read_msi_msg(unsigned int irq, struct msi_msg *msg); | 19 | extern void read_msi_msg(unsigned int irq, struct msi_msg *msg); |
20 | extern void get_cached_msi_msg(unsigned int irq, struct msi_msg *msg); | ||
19 | extern void write_msi_msg(unsigned int irq, struct msi_msg *msg); | 21 | extern void write_msi_msg(unsigned int irq, struct msi_msg *msg); |
20 | 22 | ||
21 | struct msi_desc { | 23 | struct msi_desc { |