summaryrefslogtreecommitdiffstats
path: root/drivers/irqchip/irq-loongarch-cpu.c
diff options
context:
space:
mode:
authorNiklas Schnelle <schnelle@linux.ibm.com>2022-11-09 15:28:59 +0100
committerJoerg Roedel <jroedel@suse.de>2022-11-19 10:28:15 +0100
commit59bbf596791b89c7f88fdcac29dfc39c1221d25d (patch)
treeff25e8550704eadf0a53c2b6fbc118efa951cfd6 /drivers/irqchip/irq-loongarch-cpu.c
parentf3cc4f874efa8d5b10ebd9dc8702cd25b9e536a3 (diff)
downloadlinux-59bbf596791b89c7f88fdcac29dfc39c1221d25d.tar.bz2
iommu/s390: Make attach succeed even if the device is in error state
If a zPCI device is in the error state while switching IOMMU domains zpci_register_ioat() will fail and we would end up with the device not attached to any domain. In this state since zdev->dma_table == NULL a reset via zpci_hot_reset_device() would wrongfully re-initialize the device for DMA API usage using zpci_dma_init_device(). As automatic recovery is currently disabled while attached to an IOMMU domain this only affects slot resets triggered through other means but will affect automatic recovery once we switch to using dma-iommu. Additionally with that switch common code expects attaching to the default domain to always work so zpci_register_ioat() should only fail if there is no chance to recover anyway, e.g. if the device has been unplugged. Improve the robustness of attach by specifically looking at the status returned by zpci_mod_fc() to determine if the device is unavailable and in this case simply ignore the error. Once the device is reset zpci_hot_reset_device() will then correctly set the domain's DMA translation tables. Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com> Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com> Link: https://lore.kernel.org/r/20221109142903.4080275-2-schnelle@linux.ibm.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/irqchip/irq-loongarch-cpu.c')
0 files changed, 0 insertions, 0 deletions