Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=94688cf2454986309fbcd495233ba2423786a14a
Commit:     94688cf2454986309fbcd495233ba2423786a14a
Parent:     1b7c9fcaa147662628078c83ecaf1ef2c5c9c9d0
Author:     Linas Vepstas <[EMAIL PROTECTED]>
AuthorDate: Wed Nov 7 15:43:59 2007 -0600
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Fri Feb 1 15:04:22 2008 -0800

    PCI: export pci_restore_msi_state()
    
    PCI error recovery usually involves the PCI adapter being reset.
    If the device is using MSI, the reset will cause the MSI state
    to be lost; the device driver needs to restore the MSI state.
    
    The pci_restore_msi_state() routine is currently protected
    by CONFIG_PM; remove this, and also export the symbol, so
    that it can be used in a modle.
    
    Signed-off-by: Linas Vepstas <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/pci/msi.c   |    3 +--
 drivers/pci/pci.h   |    6 ------
 include/linux/pci.h |    2 ++
 3 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index 07c9f09..30de51f 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -230,7 +230,6 @@ static void pci_intx_for_msi(struct pci_dev *dev, int 
enable)
                pci_intx(dev, enable);
 }
 
-#ifdef CONFIG_PM
 static void __pci_restore_msi_state(struct pci_dev *dev)
 {
        int pos;
@@ -288,7 +287,7 @@ void pci_restore_msi_state(struct pci_dev *dev)
        __pci_restore_msi_state(dev);
        __pci_restore_msix_state(dev);
 }
-#endif /* CONFIG_PM */
+EXPORT_SYMBOL_GPL(pci_restore_msi_state);
 
 /**
  * msi_capability_init - configure device's MSI capability structure
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index fc87e14..4c46133 100644
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@ -45,12 +45,6 @@ static inline void pci_no_msi(void) { }
 static inline void pci_msi_init_pci_dev(struct pci_dev *dev) { }
 #endif
 
-#if defined(CONFIG_PCI_MSI) && defined(CONFIG_PM)
-void pci_restore_msi_state(struct pci_dev *dev);
-#else
-static inline void pci_restore_msi_state(struct pci_dev *dev) {}
-#endif
-
 #ifdef CONFIG_PCIEAER
 void pci_no_aer(void);
 #else
diff --git a/include/linux/pci.h b/include/linux/pci.h
index c53d6cf..87aab07 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -668,6 +668,7 @@ static inline int pci_enable_msix(struct pci_dev* dev,
        struct msix_entry *entries, int nvec) {return -1;}
 static inline void pci_disable_msix(struct pci_dev *dev) {}
 static inline void msi_remove_pci_irq_vectors(struct pci_dev *dev) {}
+static inline void pci_restore_msi_state(struct pci_dev *dev) {}
 #else
 extern int pci_enable_msi(struct pci_dev *dev);
 extern void pci_disable_msi(struct pci_dev *dev);
@@ -675,6 +676,7 @@ extern int pci_enable_msix(struct pci_dev* dev,
        struct msix_entry *entries, int nvec);
 extern void pci_disable_msix(struct pci_dev *dev);
 extern void msi_remove_pci_irq_vectors(struct pci_dev *dev);
+extern void pci_restore_msi_state(struct pci_dev *dev);
 #endif
 
 #ifdef CONFIG_HT_IRQ
-
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  http://vger.kernel.org/majordomo-info.html

Reply via email to