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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
988cbb15e0
commit
f7bdd12d23
@@ -891,6 +891,34 @@ pci_disable_device(struct pci_dev *dev)
|
||||
pcibios_disable_device(dev);
|
||||
}
|
||||
|
||||
/**
|
||||
* pcibios_set_pcie_reset_state - set reset state for device dev
|
||||
* @dev: the PCI-E device reset
|
||||
* @state: Reset state to enter into
|
||||
*
|
||||
*
|
||||
* Sets the PCI-E reset state for the device. This is the default
|
||||
* implementation. Architecture implementations can override this.
|
||||
*/
|
||||
int __attribute__ ((weak)) pcibios_set_pcie_reset_state(struct pci_dev *dev,
|
||||
enum pcie_reset_state state)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/**
|
||||
* pci_set_pcie_reset_state - set reset state for device dev
|
||||
* @dev: the PCI-E device reset
|
||||
* @state: Reset state to enter into
|
||||
*
|
||||
*
|
||||
* Sets the PCI reset state for the device.
|
||||
*/
|
||||
int pci_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state state)
|
||||
{
|
||||
return pcibios_set_pcie_reset_state(dev, state);
|
||||
}
|
||||
|
||||
/**
|
||||
* pci_enable_wake - enable PCI device as wakeup event source
|
||||
* @dev: PCI device affected
|
||||
@@ -1427,4 +1455,5 @@ EXPORT_SYMBOL(pci_set_power_state);
|
||||
EXPORT_SYMBOL(pci_save_state);
|
||||
EXPORT_SYMBOL(pci_restore_state);
|
||||
EXPORT_SYMBOL(pci_enable_wake);
|
||||
EXPORT_SYMBOL_GPL(pci_set_pcie_reset_state);
|
||||
|
||||
|
Reference in New Issue
Block a user