]> git.baikalelectronics.ru Git - kernel.git/commit
misc: pci_endpoint_test: Avoid using module parameter to determine irqtype
authorKishon Vijay Abraham I <kishon@ti.com>
Tue, 17 Mar 2020 10:01:54 +0000 (15:31 +0530)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Thu, 2 Apr 2020 16:57:10 +0000 (17:57 +0100)
commita701034e7f2a298e475ee0ab99af56f80aa1aad3
tree3f5f44465fa27af9498b245bf3244deae8f78e68
parenta425222c1a30b35618a8060e37ffddbafac61d94
misc: pci_endpoint_test: Avoid using module parameter to determine irqtype

commit 16f57a8285bc ("pci_endpoint_test: Add 2 ioctl commands")
uses module parameter 'irqtype' in pci_endpoint_test_set_irq()
to check if IRQ vectors of a particular type (MSI or MSI-X or
LEGACY) is already allocated. However with multi-function devices,
'irqtype' will not correctly reflect the IRQ type of the PCI device.

Fix it here by adding 'irqtype' for each PCI device to show the
IRQ type of a particular PCI device.

Fixes: 16f57a8285bc ("pci_endpoint_test: Add 2 ioctl commands")
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: stable@vger.kernel.org # v4.19+
drivers/misc/pci_endpoint_test.c