]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
powerpc/pci: Add release_device() hook to phb ops
authorMichael Neuling <mikey@neuling.org>
Wed, 27 May 2015 06:06:57 +0000 (16:06 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 3 Jun 2015 03:27:15 +0000 (13:27 +1000)
Add release_device() hook to phb ops so we can clean up for specific phbs.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/pci-bridge.h
arch/powerpc/kernel/pci-hotplug.c

index 6d17bb8498bf3a101c800ddb20cd3c73c55bd2ed..4cf0caaa33c74bd8cdcf20ab0595118064df7515 100644 (file)
@@ -27,6 +27,8 @@ struct pci_controller_ops {
         * allow assignment/enabling of the device. */
        bool            (*enable_device_hook)(struct pci_dev *);
 
+       void            (*release_device)(struct pci_dev *);
+
        /* Called during PCI resource reassignment */
        resource_size_t (*window_alignment)(struct pci_bus *, unsigned long type);
        void            (*reset_secondary_bus)(struct pci_dev *dev);
index 7ed85a69a9c29b956d232596ba089cf610e9e1d2..7f9ed0c1f6b93d88dc4b3d8e815b7e1c099b1f82 100644 (file)
  */
 void pcibios_release_device(struct pci_dev *dev)
 {
+       struct pci_controller *phb = pci_bus_to_host(dev->bus);
+
        eeh_remove_device(dev);
+
+       if (phb->controller_ops.release_device)
+               phb->controller_ops.release_device(dev);
 }
 
 /**