From a27c2321664acbfc9f7b4dbdafd3ac56f7363f6d Mon Sep 17 00:00:00 2001 From: Niklas Schnelle Date: Thu, 12 Jun 2025 19:43:06 +0200 Subject: [PATCH] s390/pci: Remove redundant bus removal and disable from zpci_release_device() BugLink: https://bugs.launchpad.net/bugs/2114174 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 Reviewed-by: Julian Ruess Tested-by: Gerd Bayer Signed-off-by: Niklas Schnelle Signed-off-by: Heiko Carstens (cherry picked from commit d76f9633296785343d45f85199f4138cb724b6d2) Signed-off-by: Massimiliano Pellizzer Acked-by: Edoardo Canepa Acked-by: Manuel Diewald Acked-by: Mehmet Basaran Signed-off-by: Mehmet Basaran --- arch/s390/pci/pci.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c index 7b5017221408..c8c3bf855793 100644 --- a/arch/s390/pci/pci.c +++ b/arch/s390/pci/pci.c @@ -950,12 +950,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);