FAILED: patch "[PATCH] s390/pci: Restore IRQ unconditionally for the zPCI device" failed to apply to 6.1-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 6.1-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y
git checkout FETCH_HEAD
git cherry-pick -x b45873c3f09153d1ad9b3a7bf9e5c0b0387fd2ea
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2025110237-sizable-stimulate-e9bf@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From b45873c3f09153d1ad9b3a7bf9e5c0b0387fd2ea Mon Sep 17 00:00:00 2001
From: Farhan Ali <[email protected]>
Date: Wed, 22 Oct 2025 09:47:26 -0700
Subject: [PATCH] s390/pci: Restore IRQ unconditionally for the zPCI device
Commit c1e18c17bda6 ("s390/pci: add zpci_set_irq()/zpci_clear_irq()"), introduced the zpci_set_irq() and zpci_clear_irq(), to be used while resetting a zPCI device.
Commit da995d538d3a ("s390/pci: implement reset_slot for hotplug slot"), mentions zpci_clear_irq() being called in the path for zpci_hot_reset_device(). But that is not the case anymore and these functions are not called outside of this file. Instead zpci_hot_reset_device() relies on zpci_disable_device() also clearing the IRQs, but misses to reset the zdev->irqs_registered flag.
However after a CLP disable/enable reset, the device's IRQ are unregistered, but the flag zdev->irq_registered does not get cleared. It creates an inconsistent state and so arch_restore_msi_irqs() doesn't correctly restore the device's IRQ. This becomes a problem when a PCI driver tries to restore the state of the device through pci_restore_state(). Restore IRQ unconditionally for the device and remove the irq_registered flag as its redundant.
arch/s390/include/asm/pci.h +0 -1
@@ -145,7 +145,6 @@ struct zpci_dev { u8 has_resources : 1; u8 is_physfn : 1; u8 util_str_avail : 1; - u8 irqs_registered : 1; u8 tid_avail : 1; u8 rtr_avail : 1; /* Relaxed translation allowed */unsigned int devfn;/* DEVFN part of the RID*/
arch/s390/pci/pci_irq.c +1 -8
@@ -107,9 +107,6 @@ static int zpci_set_irq(struct zpci_dev *zdev)else rc =zpci_set_airq (zdev); -if (!rc) - zdev->irqs_registered =1 ; -return rc; }
@@ -123,9 +120,6 @@ static int zpci_clear_irq(struct zpci_dev *zdev)else rc =zpci_clear_airq (zdev); -if (!rc) - zdev->irqs_registered =0 ; -return rc; }
@@ -427,8 +421,7 @@ bool arch_restore_msi_irqs(struct pci_dev *pdev) {struct zpci_dev *zdev =to_zpci (pdev); -if (!zdev->irqs_registered) -zpci_set_irq (zdev); +zpci_set_irq (zdev);return true; }
Sasha Levin
maintainerPATCH 1/1 s390/pci: Restore IRQ unconditionally for the zPCI device
From: Farhan Ali <[email protected]>
[ Upstream commit b45873c3f09153d1ad9b3a7bf9e5c0b0387fd2ea ]
Commit c1e18c17bda6 ("s390/pci: add zpci_set_irq()/zpci_clear_irq()"), introduced the zpci_set_irq() and zpci_clear_irq(), to be used while resetting a zPCI device.
Commit da995d538d3a ("s390/pci: implement reset_slot for hotplug slot"), mentions zpci_clear_irq() being called in the path for zpci_hot_reset_device(). But that is not the case anymore and these functions are not called outside of this file. Instead zpci_hot_reset_device() relies on zpci_disable_device() also clearing the IRQs, but misses to reset the zdev->irqs_registered flag.
However after a CLP disable/enable reset, the device's IRQ are unregistered, but the flag zdev->irq_registered does not get cleared. It creates an inconsistent state and so arch_restore_msi_irqs() doesn't correctly restore the device's IRQ. This becomes a problem when a PCI driver tries to restore the state of the device through pci_restore_state(). Restore IRQ unconditionally for the device and remove the irq_registered flag as its redundant.
--- arch/s390/include/asm/pci.h | 1 - arch/s390/pci/pci_irq.c | 9 +-------- 2 files changed, 1 insertion(+), 9 deletions(-)
arch/s390/include/asm/pci.h +0 -1
@@ -136,7 +136,6 @@ struct zpci_dev { u8 has_resources : 1; u8 is_physfn : 1; u8 util_str_avail : 1; - u8 irqs_registered : 1; u8 reserved : 2;unsigned int devfn;/* DEVFN part of the RID*/
arch/s390/pci/pci_irq.c +1 -8
@@ -107,9 +107,6 @@ static int zpci_set_irq(struct zpci_dev *zdev)else rc =zpci_set_airq (zdev); -if (!rc) - zdev->irqs_registered =1 ; -return rc; }
@@ -123,9 +120,6 @@ static int zpci_clear_irq(struct zpci_dev *zdev)else rc =zpci_clear_airq (zdev); -if (!rc) - zdev->irqs_registered =0 ; -return rc; }
@@ -427,8 +421,7 @@ bool arch_restore_msi_irqs(struct pci_dev *pdev) {struct zpci_dev *zdev =to_zpci (pdev); -if (!zdev->irqs_registered) -zpci_set_irq (zdev); +zpci_set_irq (zdev);return true; }
Signature · 1 line
2.51.0