Skip to content

Commit 6ee600b

Browse files
Gerd Bayerhcahca
authored andcommitted
s390/pci: remove hotplug slot when releasing the device
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 <[email protected]> Reviewed-by: Niklas Schnelle <[email protected]> Signed-off-by: Heiko Carstens <[email protected]>
1 parent bcb5d6c commit 6ee600b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

arch/s390/pci/pci.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -906,8 +906,6 @@ int zpci_deconfigure_device(struct zpci_dev *zdev)
906906
*/
907907
void zpci_device_reserved(struct zpci_dev *zdev)
908908
{
909-
if (zdev->has_hp_slot)
910-
zpci_exit_slot(zdev);
911909
/*
912910
* Remove device from zpci_list as it is going away. This also
913911
* makes sure we ignore subsequent zPCI events for this device.
@@ -925,6 +923,9 @@ void zpci_release_device(struct kref *kref)
925923
struct zpci_dev *zdev = container_of(kref, struct zpci_dev, kref);
926924
int ret;
927925

926+
if (zdev->has_hp_slot)
927+
zpci_exit_slot(zdev);
928+
928929
if (zdev->zbus->bus)
929930
zpci_bus_remove_device(zdev, false);
930931

0 commit comments

Comments
 (0)