linux/arch/s390/pci
Farhan Ali b45873c3f0 s390/pci: Restore IRQ unconditionally for the zPCI device
Commit c1e18c17bd ("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 da995d538d ("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.

Fixes: c1e18c17bd ("s390/pci: add zpci_set_irq()/zpci_clear_irq()")
Cc: stable@vger.kernnel.org
Reviewed-by: Niklas Schnelle <schnelle@linux.ibm.com>
Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>
Signed-off-by: Farhan Ali <alifm@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
2025-10-24 15:25:43 +02:00
..
Makefile s390/pci: Support mmap() of PCI resources except for ISM devices 2025-03-21 14:54:16 -05:00
pci.c s390/pci: Expose firmware provided UID Checking state in sysfs 2025-10-04 18:40:42 +02:00
pci_bus.c s390: Remove unnecessary include <linux/export.h> 2025-06-17 18:18:02 +02:00
pci_bus.h s390/pci: Allow re-add of a reserved but not yet removed device 2025-05-22 16:12:47 +02:00
pci_clp.c s390/pci: Fix missing check for zpci_create_device() error return 2025-05-07 13:35:05 +02:00
pci_debug.c iommu/s390: Implement blocking domain 2024-10-15 10:19:07 +02:00
pci_event.c s390/pci: Avoid deadlock between PCI error recovery and mlx5 crdump 2025-10-23 16:11:16 +02:00
pci_fixup.c s390/pci: Support mmap() of PCI resources except for ISM devices 2025-03-21 14:54:16 -05:00
pci_insn.c s390: Remove superfluous newlines from inline assemblies 2025-09-29 13:52:08 +02:00
pci_iov.c s390/pci: Fix handling of isolated VFs 2025-02-11 19:35:08 +01:00
pci_iov.h s390/pci: Fix handling of isolated VFs 2025-02-11 19:35:08 +01:00
pci_irq.c s390/pci: Restore IRQ unconditionally for the zPCI device 2025-10-24 15:25:43 +02:00
pci_kvm_hook.c s390: Explicitly include <linux/export.h> 2025-06-17 18:18:02 +02:00
pci_mmio.c s390/pci: Fix __pcilg_mio_inuser() inline assembly 2025-05-21 12:02:27 +02:00
pci_report.c s390/pci: Add pci_msg debug view to PCI report 2024-12-16 16:14:27 +01:00
pci_report.h s390/pci: Report PCI error recovery results via SCLP 2024-12-16 16:14:26 +01:00
pci_sysfs.c s390/pci: Expose firmware provided UID Checking state in sysfs 2025-10-04 18:40:42 +02:00