summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/pci-hotplug.c
diff options
context:
space:
mode:
authorGavin Shan <shangw@linux.vnet.ibm.com>2013-07-24 10:24:53 +0800
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-07-24 14:18:46 +1000
commit008a4938ea07db071f03adffaa3a78c2fbbcde6b (patch)
tree9baeaa629cc4ac775fa8fa6f6ee00d203c952dd8 /arch/powerpc/kernel/pci-hotplug.c
parentf2856491d24044de08da9e53cf7068841a8b4e1c (diff)
downloadblackbird-op-linux-008a4938ea07db071f03adffaa3a78c2fbbcde6b.tar.gz
blackbird-op-linux-008a4938ea07db071f03adffaa3a78c2fbbcde6b.zip
powerpc/pci: Override pcibios_release_device()
The patch overrides pcibios_release_device() to release EEH resources (EEH cache, unbinding EEH device) for the indicated PCI device. Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/pci-hotplug.c')
-rw-r--r--arch/powerpc/kernel/pci-hotplug.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/pci-hotplug.c b/arch/powerpc/kernel/pci-hotplug.c
index 3f608800c06b..3dab2f2801b9 100644
--- a/arch/powerpc/kernel/pci-hotplug.c
+++ b/arch/powerpc/kernel/pci-hotplug.c
@@ -22,6 +22,17 @@
#include <asm/eeh.h>
/**
+ * pcibios_release_device - release PCI device
+ * @dev: PCI device
+ *
+ * The function is called before releasing the indicated PCI device.
+ */
+void pcibios_release_device(struct pci_dev *dev)
+{
+ eeh_remove_device(dev, 1);
+}
+
+/**
* __pcibios_remove_pci_devices - remove all devices under this bus
* @bus: the indicated PCI bus
* @purge_pe: destroy the PE on removal of PCI devices
OpenPOWER on IntegriCloud