mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-29 23:26:44 +07:00
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>
This commit is contained in:
parent
4bee2a5dce
commit
8b2a7e609b
@ -236,7 +236,6 @@ int clp_disable_fh(struct zpci_dev *zdev)
|
|||||||
if (!zdev_enabled(zdev))
|
if (!zdev_enabled(zdev))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
dev_info(&zdev->pdev->dev, "disabling fn handle: 0x%x\n", fh);
|
|
||||||
rc = clp_set_pci_fn(&fh, 0, CLP_SET_DISABLE_PCI_FN);
|
rc = clp_set_pci_fn(&fh, 0, CLP_SET_DISABLE_PCI_FN);
|
||||||
if (!rc)
|
if (!rc)
|
||||||
/* Success -> store disabled handle in zdev */
|
/* Success -> store disabled handle in zdev */
|
||||||
|
@ -99,12 +99,13 @@ static int disable_slot(struct hotplug_slot *hotplug_slot)
|
|||||||
if (!zpci_fn_configured(slot->zdev->state))
|
if (!zpci_fn_configured(slot->zdev->state))
|
||||||
return -EIO;
|
return -EIO;
|
||||||
|
|
||||||
|
if (slot->zdev->pdev)
|
||||||
|
pci_stop_and_remove_bus_device(slot->zdev->pdev);
|
||||||
|
|
||||||
rc = zpci_disable_device(slot->zdev);
|
rc = zpci_disable_device(slot->zdev);
|
||||||
if (rc)
|
if (rc)
|
||||||
return 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);
|
return slot_deconfigure(slot);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user