mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
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 <[email protected]>
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: Jesse Barnes <[email protected]>
This commit is contained in:
parent
911e1c9b05
commit
30da552428
5 changed files with 47 additions and 8 deletions
|
|
@ -25,7 +25,7 @@ static int ia64_set_msi_irq_affinity(unsigned int irq,
|
|||
if (irq_prepare_move(irq, cpu))
|
||||
return -1;
|
||||
|
||||
read_msi_msg(irq, &msg);
|
||||
get_cached_msi_msg(irq, &msg);
|
||||
|
||||
addr = msg.address_lo;
|
||||
addr &= MSI_ADDR_DEST_ID_MASK;
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ static int sn_set_msi_irq_affinity(unsigned int irq,
|
|||
* Release XIO resources for the old MSI PCI address
|
||||
*/
|
||||
|
||||
read_msi_msg(irq, &msg);
|
||||
get_cached_msi_msg(irq, &msg);
|
||||
sn_pdev = (struct pcidev_info *)sn_irq_info->irq_pciioinfo;
|
||||
pdev = sn_pdev->pdi_linux_pcidev;
|
||||
provider = SN_PCIDEV_BUSPROVIDER(pdev);
|
||||
|
|
|
|||
Loading…
Reference in a new issue