Skip to content

Commit

Permalink
s390/pci: remove hotplug slot when releasing the device
Browse files Browse the repository at this point in the history
Centralize the removal so all paths are covered and the hotplug slot
will remain active until the device is really destroyed.

Signed-off-by: Gerd Bayer <gbayer@linux.ibm.com>
Reviewed-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
  • Loading branch information
Gerd Bayer authored and Heiko Carstens committed Feb 20, 2024
1 parent bcb5d6c commit 6ee600b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions arch/s390/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -906,8 +906,6 @@ int zpci_deconfigure_device(struct zpci_dev *zdev)
*/
void zpci_device_reserved(struct zpci_dev *zdev)
{
if (zdev->has_hp_slot)
zpci_exit_slot(zdev);
/*
* Remove device from zpci_list as it is going away. This also
* makes sure we ignore subsequent zPCI events for this device.
Expand All @@ -925,6 +923,9 @@ void zpci_release_device(struct kref *kref)
struct zpci_dev *zdev = container_of(kref, struct zpci_dev, kref);
int ret;

if (zdev->has_hp_slot)
zpci_exit_slot(zdev);

if (zdev->zbus->bus)
zpci_bus_remove_device(zdev, false);

Expand Down

0 comments on commit 6ee600b

Please sign in to comment.