]> www.infradead.org Git - users/jedix/linux-maple.git/commit
PCI/TPH: Replace the broken MSI-X control word update
authorThomas Gleixner <tglx@linutronix.de>
Thu, 13 Mar 2025 13:03:50 +0000 (14:03 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 13 Mar 2025 17:58:00 +0000 (18:58 +0100)
commit79273d0a40076601b1d37ff60e2ce8305f0a5d0d
tree596c9f590fecc450c1689525dce86855a4b6e0f9
parentb9db8df4333b895cd5c0b9f99234ac1cebd31bf7
PCI/TPH: Replace the broken MSI-X control word update

The driver walks the MSI descriptors to test whether a descriptor exists
for a given index. That's just abuse of the MSI internals.

The same test can be done with a single function call by looking up whether
there is a Linux interrupt number assigned at the index.

What's worse is that the function is completely unserialized against
modifications of the MSI-X control by operations issued from the interrupt
core. It also brings the PCI/MSI-X internal cached control word out of
sync.

Remove the trainwreck and invoke the function provided by the PCI/MSI core
to update it.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://lore.kernel.org/all/20250313130321.898592817@linutronix.de
drivers/pci/tph.c