s390/pci: implement reset_slot for hotplug slot
authorNiklas Schnelle <schnelle@linux.ibm.com>
Thu, 1 Jul 2021 13:49:11 +0000 (15:49 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Mon, 8 Nov 2021 13:17:49 +0000 (14:17 +0100)
commitda995d538d3a17610d89fea0f5813cf7921b3c2c
tree5004af3a435a6546658bf78ecbc559a355aea055
parent4fe204977096e900cb91a3298b05c794ac24f540
s390/pci: implement reset_slot for hotplug slot

This is done by adding a zpci_hot_reset_device() call which does a low
level reset of the PCI function without changing its higher level
function state. This way it can be used while the zPCI function is bound
to a driver and with DMA tables being controlled either through the
IOMMU or DMA APIs which is prohibited when using zpci_disable_device()
as that drop existing DMA translations.

As this reset, unlike a normal FLR, also calls zpci_clear_irq() we need
to implement arch_restore_msi_irqs() and make sure we re-enable IRQs for
the PCI function if they were previously disabled.

Reviewed-by: Pierre Morel <pmorel@linux.ibm.com>
Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/include/asm/pci.h
arch/s390/pci/pci.c
arch/s390/pci/pci_irq.c
drivers/pci/hotplug/s390_pci_hpc.c