aboutsummaryrefslogtreecommitdiff
path: root/arch/s390/pci/pci.c
diff options
context:
space:
mode:
authorSebastian Ott2017-05-09 12:27:30 +0200
committerMartin Schwidefsky2017-06-28 07:32:12 +0200
commit623bd44d3f277b7bbe16e0e091bd361e75964b5d (patch)
tree8ac1b17efed6df637352a6d31f4179821dc93477 /arch/s390/pci/pci.c
parent783684f1f60faec09f3ac74c0b12e89bdb182429 (diff)
s390/pci: improve pci hotplug
PCI hotplug events basically notify about the new state of a function. Unfortunately some hypervisors implement hotplug events in a way where it is not clear what the new state of the function should be. Use clp_get_state to find the current state of the function and handle accordingly. Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/pci/pci.c')
-rw-r--r--arch/s390/pci/pci.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c
index 6a44a68efb81..f4928bc57773 100644
--- a/arch/s390/pci/pci.c
+++ b/arch/s390/pci/pci.c
@@ -855,6 +855,15 @@ void zpci_stop_device(struct zpci_dev *zdev)
}
EXPORT_SYMBOL_GPL(zpci_stop_device);
+void zpci_remove_device(struct zpci_dev *zdev)
+{
+ if (!zdev->bus)
+ return;
+
+ pci_stop_root_bus(zdev->bus);
+ pci_remove_root_bus(zdev->bus);
+}
+
int zpci_report_error(struct pci_dev *pdev,
struct zpci_report_error_header *report)
{