]> git.baikalelectronics.ru Git - kernel.git/commit
PCI/MSI: Unbreak pci_irq_get_affinity()
authorThomas Gleixner <tglx@linutronix.de>
Sat, 18 Dec 2021 10:25:14 +0000 (11:25 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Sat, 18 Dec 2021 19:33:21 +0000 (20:33 +0100)
commit53b562b2017e72e2d20ec839c2c233b6a5d23502
tree0e74e8f1f5de0d92783fc23cbd6c1ec2a38c2917
parentf54d7657fa6624f865b7b4067be878766c8cd5aa
PCI/MSI: Unbreak pci_irq_get_affinity()

The recent cleanup of pci_irq_get_affinity() broke the function for
PCI/MSI-X and indices > 0. Only the MSI descriptor for PCI/MSI has more
than one affinity mask which can be retrieved via the MSI index.

PCI/MSI-X has one descriptor per vector and each has a single affinity
mask.

Use index 0 when accessing the affinity mask in the MSI descriptor when
MSI-X is enabled.

Fixes: 5b5d833343f1 ("PCI/MSI: Simplify pci_irq_get_affinity()")
Reported-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/87v8zm9pmd.ffs@tglx
drivers/pci/msi/msi.c