diff options
author | Brian King <brking@linux.vnet.ibm.com> | 2007-04-06 17:39:36 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-05-02 22:02:34 -0400 |
commit | f7bdd12d234d9064bd0aa1b5610508959120a9b4 (patch) | |
tree | 16f0e3f1762885c1e9b55249f79920be94b19ff6 /include/linux | |
parent | 988cbb15e00e6f924d052874b40c6a5447f9fdd7 (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 'include/linux')
-rw-r--r-- | include/linux/pci.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h index 972491089ac9..3aba02a04792 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -96,6 +96,19 @@ enum pci_channel_state { | |||
96 | pci_channel_io_perm_failure = (__force pci_channel_state_t) 3, | 96 | pci_channel_io_perm_failure = (__force pci_channel_state_t) 3, |
97 | }; | 97 | }; |
98 | 98 | ||
99 | typedef unsigned int __bitwise pcie_reset_state_t; | ||
100 | |||
101 | enum pcie_reset_state { | ||
102 | /* Reset is NOT asserted (Use to deassert reset) */ | ||
103 | pcie_deassert_reset = (__force pcie_reset_state_t) 1, | ||
104 | |||
105 | /* Use #PERST to reset PCI-E device */ | ||
106 | pcie_warm_reset = (__force pcie_reset_state_t) 2, | ||
107 | |||
108 | /* Use PCI-E Hot Reset to reset device */ | ||
109 | pcie_hot_reset = (__force pcie_reset_state_t) 3 | ||
110 | }; | ||
111 | |||
99 | typedef unsigned short __bitwise pci_bus_flags_t; | 112 | typedef unsigned short __bitwise pci_bus_flags_t; |
100 | enum pci_bus_flags { | 113 | enum pci_bus_flags { |
101 | PCI_BUS_FLAGS_NO_MSI = (__force pci_bus_flags_t) 1, | 114 | PCI_BUS_FLAGS_NO_MSI = (__force pci_bus_flags_t) 1, |
@@ -532,6 +545,7 @@ static inline int pci_is_managed(struct pci_dev *pdev) | |||
532 | 545 | ||
533 | void pci_disable_device(struct pci_dev *dev); | 546 | void pci_disable_device(struct pci_dev *dev); |
534 | void pci_set_master(struct pci_dev *dev); | 547 | void pci_set_master(struct pci_dev *dev); |
548 | int pci_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state state); | ||
535 | #define HAVE_PCI_SET_MWI | 549 | #define HAVE_PCI_SET_MWI |
536 | int __must_check pci_set_mwi(struct pci_dev *dev); | 550 | int __must_check pci_set_mwi(struct pci_dev *dev); |
537 | void pci_clear_mwi(struct pci_dev *dev); | 551 | void pci_clear_mwi(struct pci_dev *dev); |