s390/pci: remove hotplug slot when releasing the device
BugLink: https://bugs.launchpad.net/bugs/2114174 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> (cherry picked from commit 6ee600bfbe0f818ffb7748d99e9b0c89d0d9f02a) Signed-off-by: Massimiliano Pellizzer <massimiliano.pellizzer@canonical.com> Acked-by: Edoardo Canepa <edoardo.canepa@canonical.com> Acked-by: Manuel Diewald <manuel.diewald@canonical.com> Acked-by: Mehmet Basaran <mehmet.basaran@canonical.com> Signed-off-by: Mehmet Basaran <mehmet.basaran@canonical.com>
This commit is contained in:
committed by
Mehmet Basaran
parent
d2ba385ea9
commit
854cdceb33
+3
-2
@@ -932,8 +932,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.
|
||||
@@ -951,6 +949,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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user