linux-stable/drivers/pci
Stefan Roese d8888cdabe PCI/MSI: Mask MSI-X vectors only on success
commit 83dbf898a2 upstream.

Masking all unused MSI-X entries is done to ensure that a crash kernel
starts from a clean slate, which correponds to the reset state of the
device as defined in the PCI-E specificion 3.0 and later:

 Vector Control for MSI-X Table Entries
 --------------------------------------

 "00: Mask bit:  When this bit is set, the function is prohibited from
                 sending a message using this MSI-X Table entry.
                 ...
                 This bit’s state after reset is 1 (entry is masked)."

A Marvell NVME device fails to deliver MSI interrupts after trying to
enable MSI-X interrupts due to that masking. It seems to take the MSI-X
mask bits into account even when MSI-X is disabled.

While not specification compliant, this can be cured by moving the masking
into the success path, so that the MSI-X table entries stay in device reset
state when the MSI-X setup fails.

[ tglx: Move it into the success path, add comment and amend changelog ]

Fixes: aa8092c1d1 ("PCI/MSI: Mask all unused MSI-X entries")
Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-pci@vger.kernel.org
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Marek Vasut <marex@denx.de>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20211210161025.3287927-1-sr@denx.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-12-22 09:32:46 +01:00
..
controller Revert "PCI: aardvark: Fix support for PCI_ROM_ADDRESS1 on emulated bridge" 2021-12-14 10:57:18 +01:00
endpoint pci-v5.15-changes 2021-09-07 19:13:42 -07:00
hotplug s390/pci: fix zpci_zdev_put() on reserve 2021-10-04 09:49:10 +02:00
pcie pci-v5.15-changes 2021-09-07 19:13:42 -07:00
switch
access.c
ats.c
bus.c
ecam.c
host-bridge.c PCI: VMD: ACPI: Make ACPI companion lookup work for VMD bus 2021-09-02 17:59:58 +02:00
iov.c
irq.c
Kconfig PCI: only build xen-pcifront in PV-enabled environments 2021-09-20 17:01:11 +02:00
Makefile
mmap.c
msi.c PCI/MSI: Mask MSI-X vectors only on success 2021-12-22 09:32:46 +01:00
of.c
p2pdma.c
pci-acpi.c PCI: ACPI: Check parent pointer in acpi_pci_find_companion() 2021-10-07 18:42:44 +02:00
pci-bridge-emul.c PCI: pci-bridge-emul: Fix emulation of W1C bits 2021-11-18 19:16:04 +01:00
pci-bridge-emul.h
pci-driver.c VFIO update for v5.15-rc1 2021-09-02 13:41:33 -07:00
pci-label.c
pci-mid.c
pci-pf-stub.c
pci-stub.c
pci-sysfs.c pci-v5.15-changes 2021-09-07 19:13:42 -07:00
pci.c PCI: Do not enable AtomicOps on VFs 2021-11-18 19:17:08 +01:00
pci.h pci-v5.15-changes 2021-09-07 19:13:42 -07:00
probe.c Merge branch 'remotes/lorenzo/pci/hyper-v' 2021-09-02 14:56:47 -05:00
proc.c pci-v5.15-changes 2021-09-07 19:13:42 -07:00
quirks.c PCI: Add MSI masking quirk for Nvidia ION AHCI 2021-11-21 13:44:14 +01:00
remove.c
rom.c
search.c
setup-bus.c
setup-irq.c
setup-res.c
slot.c
syscall.c
vc.c
vpd.c PCI/VPD: Defer VPD sizing until first access 2021-09-15 16:26:13 -05:00
xen-pcifront.c Merge branch 'stable/for-linus-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb 2021-09-03 10:34:44 -07:00