Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

misc: pci_endpoint_test: Enable/Disable MSI using module param

In certain platforms like TI's DRA7 SoCs, use of legacy PCI interrupt is
exclusive with use of MSI (Section 24.9.4.6.2.1 Legacy PCI Interrupts in
http://www.ti.com/lit/ug/spruhz6i/spruhz6i.pdf).

However pci_endpoint_test driver enables MSI by default in probe. In order
for pci_endpoint_test to be able to test legacy interrupt, MSI should be
disabled. Add a module param 'no_msi' to disable MSI (only when legacy
interrupt has to be tested).

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
[bhelgaas: folded in static fix from Colin Ian King <colin.king@canonical.com>]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>

authored by

Kishon Vijay Abraham I and committed by
Bjorn Helgaas
0c8a5f9d cda370ec

+5 -1
+5 -1
drivers/misc/pci_endpoint_test.c
··· 72 72 73 73 #define to_endpoint_test(priv) container_of((priv), struct pci_endpoint_test, \ 74 74 miscdev) 75 + 76 + static bool no_msi; 77 + module_param(no_msi, bool, 0444); 78 + MODULE_PARM_DESC(no_msi, "Disable MSI interrupt in pci_endpoint_test"); 79 + 75 80 enum pci_barno { 76 81 BAR_0, 77 82 BAR_1, ··· 456 451 int err; 457 452 int irq = 0; 458 453 int id; 459 - bool no_msi = false; 460 454 char name[20]; 461 455 enum pci_barno bar; 462 456 void __iomem *base;