Commit:     1db3e890aed3ac39cded30d6e94618bda086f7ce
Parent:     bdd71eec9b24fb6f7e83148f73c2312a42b2aed5
Author:     Michael Ellerman <[EMAIL PROTECTED]>
AuthorDate: Tue Oct 23 14:23:44 2007 +1000
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Thu Nov 8 14:15:29 2007 +1100

    [POWERPC] Read back MSI message in rtas_setup_msi_irqs() so restore works
    There are plans afoot to use pci_restore_msi_state() to restore MSI
    state after a device reset.  In order for this to work for the RTAS MSI
    backend, we need to read back the MSI message from config space after
    it has been setup by firmware.
    This should be sufficient for restoring the MSI state after a device
    reset, however we will need to revisit this for suspend to disk if that
    is ever implemented on pseries.
    Signed-off-by: Michael Ellerman <[EMAIL PROTECTED]>
    Acked-by: Linas Vepstas <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
 arch/powerpc/platforms/pseries/msi.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/platforms/pseries/msi.c 
index 2793a1b..f15222b 100644
--- a/arch/powerpc/platforms/pseries/msi.c
+++ b/arch/powerpc/platforms/pseries/msi.c
@@ -171,6 +171,7 @@ static int rtas_setup_msi_irqs(struct pci_dev *pdev, int 
nvec, int type)
        struct pci_dn *pdn;
        int hwirq, virq, i, rc;
        struct msi_desc *entry;
+       struct msi_msg msg;
        pdn = get_pdn(pdev);
        if (!pdn)
@@ -213,6 +214,11 @@ static int rtas_setup_msi_irqs(struct pci_dev *pdev, int 
nvec, int type)
                dev_dbg(&pdev->dev, "rtas_msi: allocated virq %d\n", virq);
                set_irq_msi(virq, entry);
+               /* Read config space back so we can restore after reset */
+               read_msi_msg(virq, &msg);
+               entry->msg = msg;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to