]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: endpoint: Use correct "end of test" interrupt
authorJohn Keeping <john@metanate.com>
Wed, 20 Sep 2017 18:56:06 +0000 (13:56 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 20 Sep 2017 18:56:06 +0000 (13:56 -0500)
commit97c990d4839236e6808e5998086330274f61f34b
tree11434013812a24f21ab8df0b6c071879c8d8d739
parentccd5d4f578319a1cb5c2f33d76108e16e771cfbf
PCI: endpoint: Use correct "end of test" interrupt

pci_epf_test_raise_irq() reads the interrupt to use for the response from
reg->command, but this has been cleared at the beginning of the command
handler so the value is always zero at this point.

Instead, extract the interrupt index before handling the command and then
pass the requested interrupt into pci_epf_test_raise_irq().  This allows us
to remove the specific code to extract the interrupt for
COMMAND_RAISE_MSI_IRQ since it is now handled in common code.

Fixes: c5f21fcc27da ("PCI: endpoint: Do not reset *command* inadvertently")
Signed-off-by: John Keeping <john@metanate.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
drivers/pci/endpoint/functions/pci-epf-test.c