Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'irq_urgent_for_v5.16_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull irq fixes from Borislav Petkov:

- Clear the PCI_MSIX_FLAGS_MASKALL bit too on the error path so that it
is restored to its reset state

- Mask MSI-X vectors late on the init path in order to handle
out-of-spec Marvell NVME devices which apparently look at the MSI-X
mask even when MSI-X is disabled

* tag 'irq_urgent_for_v5.16_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
PCI/MSI: Clear PCI_MSIX_FLAGS_MASKALL on error
PCI/MSI: Mask MSI-X vectors only on success

+11 -4
+11 -4
drivers/pci/msi.c
··· 722 722 goto out_disable; 723 723 } 724 724 725 - /* Ensure that all table entries are masked. */ 726 - msix_mask_all(base, tsize); 727 - 728 725 ret = msix_setup_entries(dev, base, entries, nvec, affd); 729 726 if (ret) 730 727 goto out_disable; ··· 748 751 /* Set MSI-X enabled bits and unmask the function */ 749 752 pci_intx_for_msi(dev, 0); 750 753 dev->msix_enabled = 1; 754 + 755 + /* 756 + * Ensure that all table entries are masked to prevent 757 + * stale entries from firing in a crash kernel. 758 + * 759 + * Done late to deal with a broken Marvell NVME device 760 + * which takes the MSI-X mask bits into account even 761 + * when MSI-X is disabled, which prevents MSI delivery. 762 + */ 763 + msix_mask_all(base, tsize); 751 764 pci_msix_clear_and_set_ctrl(dev, PCI_MSIX_FLAGS_MASKALL, 0); 752 765 753 766 pcibios_free_irq(dev); ··· 784 777 free_msi_irqs(dev); 785 778 786 779 out_disable: 787 - pci_msix_clear_and_set_ctrl(dev, PCI_MSIX_FLAGS_ENABLE, 0); 780 + pci_msix_clear_and_set_ctrl(dev, PCI_MSIX_FLAGS_MASKALL | PCI_MSIX_FLAGS_ENABLE, 0); 788 781 789 782 return ret; 790 783 }