]> 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)
commit0e1f9b0dd04235fd581b22e4a055a31c7672df44
tree11434013812a24f21ab8df0b6c071879c8d8d739
parent31f0b393f84d4647fa26a69ec21af407dead0402
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: 05ae9c6b8ade ("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