linux/drivers/pci/msi
Jonathan Currier 35ba7b2d4d PCI/MSI: Add an option to write MSIX ENTRY_DATA before any reads
[ Upstream commit cf761e3dac ]

Commit 7d5ec3d361 ("PCI/MSI: Mask all unused MSI-X entries") introduced a
readl() from ENTRY_VECTOR_CTRL before the writel() to ENTRY_DATA.

This is correct, however some hardware, like the Sun Neptune chips, the NIU
module, will cause an error and/or fatal trap if any MSIX table entry is
read before the corresponding ENTRY_DATA field is written to.

Add an optional early writel() in msix_prepare_msi_desc().

Fixes: 7d5ec3d361 ("PCI/MSI: Mask all unused MSI-X entries")
Signed-off-by: Jonathan Currier <dullfire@yahoo.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/all/20241117234843.19236-2-dullfire@yahoo.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-05-02 07:58:56 +02:00
..
api.c Merge branch 'pci/ims-removal' 2024-05-16 18:14:14 -05:00
irqdomain.c PCI/MSI: Handle lack of irqdomain gracefully 2025-01-02 10:34:22 +01:00
legacy.c PCI/MSI: Prevent UAF in error path 2022-01-21 02:14:46 +01:00
Makefile PCI/MSI: Move pci_disable_msi() to api.c 2022-11-17 15:15:20 +01:00
msi.c PCI/MSI: Add an option to write MSIX ENTRY_DATA before any reads 2025-05-02 07:58:56 +02:00
msi.h PCI/MSI: Split MSI-X descriptor setup 2022-12-05 22:22:34 +01:00
pcidev_msi.c PCI/MSI: Split out CONFIG_PCI_MSI independent part 2021-12-09 11:52:22 +01:00