summaryrefslogtreecommitdiff
path: root/drivers/pci/hotplug
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2013-06-05 16:07:28 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2013-06-26 21:10:08 +0200
commit8b2a7e609bfcb26ed3639da9eda3fea42c009b65 (patch)
tree3ba9126746a67626411d1581b2b2fac43127832a /drivers/pci/hotplug
parent4bee2a5dce45096851cb8694d962bf8c016816a8 (diff)
s390/pci: remove pdev during unplug
The disable slot implementation on s390 currently just detaches the pci function from the partition - without informing the pci layer. Fix this by calling pci_stop_and_remove_bus_device prior to the operation. Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com> Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/pci/hotplug')
-rw-r--r--drivers/pci/hotplug/s390_pci_hpc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/pci/hotplug/s390_pci_hpc.c b/drivers/pci/hotplug/s390_pci_hpc.c
index b12acaad9dc6..ea3fa90d020a 100644
--- a/drivers/pci/hotplug/s390_pci_hpc.c
+++ b/drivers/pci/hotplug/s390_pci_hpc.c
@@ -99,12 +99,13 @@ static int disable_slot(struct hotplug_slot *hotplug_slot)
if (!zpci_fn_configured(slot->zdev->state))
return -EIO;
+ if (slot->zdev->pdev)
+ pci_stop_and_remove_bus_device(slot->zdev->pdev);
+
rc = zpci_disable_device(slot->zdev);
if (rc)
return rc;
- /* TODO: we rely on the user to unbind/remove the device, is that plausible
- * or do we need to trigger that here?
- */
+
return slot_deconfigure(slot);
}