Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/pci: Add release_device() hook to phb ops

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>

authored by

Michael Neuling and committed by
Michael Ellerman
10e79630 5b64d2cc

+7
+2
arch/powerpc/include/asm/pci-bridge.h
··· 27 27 * allow assignment/enabling of the device. */ 28 28 bool (*enable_device_hook)(struct pci_dev *); 29 29 30 + void (*release_device)(struct pci_dev *); 31 + 30 32 /* Called during PCI resource reassignment */ 31 33 resource_size_t (*window_alignment)(struct pci_bus *, unsigned long type); 32 34 void (*reset_secondary_bus)(struct pci_dev *dev);
+5
arch/powerpc/kernel/pci-hotplug.c
··· 29 29 */ 30 30 void pcibios_release_device(struct pci_dev *dev) 31 31 { 32 + struct pci_controller *phb = pci_bus_to_host(dev->bus); 33 + 32 34 eeh_remove_device(dev); 35 + 36 + if (phb->controller_ops.release_device) 37 + phb->controller_ops.release_device(dev); 33 38 } 34 39 35 40 /**