netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 5/7] pci: Export the pci_restore_msi_state() function
@ 2007-10-19 21:36 Matt Carlson
  2007-10-19 23:29 ` Linas Vepstas
  2007-10-21 23:21 ` David Miller
  0 siblings, 2 replies; 27+ messages in thread
From: Matt Carlson @ 2007-10-19 21:36 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-pci, Linas Vepstas, Michael Chan

This patch exports the pci_restore_msi_state() function.  This function
is needed to restore the MSI state during PCI error recovery.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>

diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index 87e0161..f57762d 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -224,7 +224,6 @@ static struct msi_desc* alloc_msi_entry(void)
 	return entry;
 }
 
-#ifdef CONFIG_PM
 static void __pci_restore_msi_state(struct pci_dev *dev)
 {
 	int pos;
@@ -282,7 +281,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 6fda33d..23c6c17 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 768b933..5575227 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -662,6 +662,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);
@@ -669,6 +670,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);
+void pci_restore_msi_state(struct pci_dev *dev);
 #endif
 
 #ifdef CONFIG_HT_IRQ



^ permalink raw reply related	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2007-10-23  4:20 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-19 21:36 [PATCH 5/7] pci: Export the pci_restore_msi_state() function Matt Carlson
2007-10-19 23:29 ` Linas Vepstas
2007-10-20  0:36   ` Michael Chan
2007-10-20  0:04     ` Linas Vepstas
2007-10-20  0:27       ` David Miller
2007-10-20  0:46         ` [BUG] powerpc does not save msi state [was " Linas Vepstas
2007-10-20  0:53           ` David Miller
2007-10-20  6:43             ` Michael Ellerman
2007-10-20 22:50               ` Michael Chan
2007-10-21 21:13               ` Benjamin Herrenschmidt
2007-10-22 19:54             ` Linas Vepstas
2007-10-23  0:23               ` David Miller
2007-10-23  0:32                 ` Benjamin Herrenschmidt
2007-10-20  1:29           ` Benjamin Herrenschmidt
2007-10-20  1:12       ` Michael Chan
2007-10-20  0:25         ` Linas Vepstas
2007-10-21 23:21 ` David Miller
2007-10-22  1:49   ` Michael Ellerman
2007-10-22 18:13     ` Linas Vepstas
2007-10-22 21:24       ` Benjamin Herrenschmidt
2007-10-23  0:13         ` Linas Vepstas
2007-10-23  0:29           ` Benjamin Herrenschmidt
2007-10-23  4:20       ` Michael Ellerman
2007-10-22  4:01   ` Michael Chan
2007-10-22  4:45     ` David Miller
2007-10-22 18:19       ` Linas Vepstas
2007-10-22 18:07   ` Linas Vepstas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).