]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
s390/pci: Remove redundant bus removal and disable from zpci_release_device()
authorNiklas Schnelle <schnelle@linux.ibm.com>
Thu, 22 May 2025 12:13:12 +0000 (14:13 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Thu, 22 May 2025 14:12:25 +0000 (16:12 +0200)
Remove zpci_bus_remove_device() and zpci_disable_device() calls from
zpci_release_device(). These calls were done when the device
transitioned into the ZPCI_FN_STATE_STANDBY state which is guaranteed to
happen before it enters the ZPCI_FN_STATE_RESERVED state. When
zpci_release_device() is called the device is known to be in the
ZPCI_FN_STATE_RESERVED state which is also checked by a WARN_ON().

Cc: stable@vger.kernel.org
Fixes: a46044a92add ("s390/pci: fix zpci_zdev_put() on reserve")
Reviewed-by: Gerd Bayer <gbayer@linux.ibm.com>
Reviewed-by: Julian Ruess <julianr@linux.ibm.com>
Tested-by: Gerd Bayer <gbayer@linux.ibm.com>
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/pci/pci.c

index 5bbdc4190b8b8277c6aaea34274238c54988dbd5..9fcc6d3180f28313ef20306e7575c11633d8b477 100644 (file)
@@ -949,12 +949,6 @@ void zpci_release_device(struct kref *kref)
 
        WARN_ON(zdev->state != ZPCI_FN_STATE_RESERVED);
 
-       if (zdev->zbus->bus)
-               zpci_bus_remove_device(zdev, false);
-
-       if (zdev_enabled(zdev))
-               zpci_disable_device(zdev);
-
        if (zdev->has_hp_slot)
                zpci_exit_slot(zdev);