aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci.c
diff options
context:
space:
mode:
authorBrian King <brking@linux.vnet.ibm.com>2007-04-06 17:39:36 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-05-02 22:02:34 -0400
commitf7bdd12d234d9064bd0aa1b5610508959120a9b4 (patch)
tree16f0e3f1762885c1e9b55249f79920be94b19ff6 /drivers/pci/pci.c
parent988cbb15e00e6f924d052874b40c6a5447f9fdd7 (diff)
pci: New PCI-E reset API
Adds a new API which can be used to issue various types of PCI-E reset, including PCI-E warm reset and PCI-E hot reset. This is needed for an ipr PCI-E adapter which does not properly implement BIST. Running BIST on this adapter results in PCI-E errors. The only reliable reset mechanism that exists on this hardware is PCI Fundamental reset (warm reset). Since driving this type of reset is architecture unique, this provides the necessary hooks for architectures to add this support. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Acked-by: Linas Vepstas <linas@austin.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/pci.c')
-rw-r--r--drivers/pci/pci.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 2a458279327..2086cd1b5e0 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -892,6 +892,34 @@ pci_disable_device(struct pci_dev *dev)
892} 892}
893 893
894/** 894/**
895 * pcibios_set_pcie_reset_state - set reset state for device dev
896 * @dev: the PCI-E device reset
897 * @state: Reset state to enter into
898 *
899 *
900 * Sets the PCI-E reset state for the device. This is the default
901 * implementation. Architecture implementations can override this.
902 */
903int __attribute__ ((weak)) pcibios_set_pcie_reset_state(struct pci_dev *dev,
904 enum pcie_reset_state state)
905{
906 return -EINVAL;
907}
908
909/**
910 * pci_set_pcie_reset_state - set reset state for device dev
911 * @dev: the PCI-E device reset
912 * @state: Reset state to enter into
913 *
914 *
915 * Sets the PCI reset state for the device.
916 */
917int pci_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state state)
918{
919 return pcibios_set_pcie_reset_state(dev, state);
920}
921
922/**
895 * pci_enable_wake - enable PCI device as wakeup event source 923 * pci_enable_wake - enable PCI device as wakeup event source
896 * @dev: PCI device affected 924 * @dev: PCI device affected
897 * @state: PCI state from which device will issue wakeup events 925 * @state: PCI state from which device will issue wakeup events
@@ -1427,4 +1455,5 @@ EXPORT_SYMBOL(pci_set_power_state);
1427EXPORT_SYMBOL(pci_save_state); 1455EXPORT_SYMBOL(pci_save_state);
1428EXPORT_SYMBOL(pci_restore_state); 1456EXPORT_SYMBOL(pci_restore_state);
1429EXPORT_SYMBOL(pci_enable_wake); 1457EXPORT_SYMBOL(pci_enable_wake);
1458EXPORT_SYMBOL_GPL(pci_set_pcie_reset_state);
1430 1459