]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: endpoint: Fix ->set_msix() to take BIR and offset as arguments
authorKishon Vijay Abraham I <kishon@ti.com>
Tue, 25 Feb 2020 08:17:01 +0000 (13:47 +0530)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Thu, 2 Apr 2020 16:57:10 +0000 (17:57 +0100)
commitdca3f8c3a8ad74fe0f58ce9323e1da2cf8ae4fbe
tree6d39619de34bfcfd89a50f70d41575ff9415b87f
parentbddd73664c1c840729bb2071875cf326ebf95978
PCI: endpoint: Fix ->set_msix() to take BIR and offset as arguments

commit e61d95832076 ("PCI: endpoint: Add MSI-X interfaces") while
adding support to raise MSI-X interrupts from endpoint didn't include
BAR Indicator register (BIR) configuration and MSI-X table offset as
arguments in pci_epc_set_msix(). This would result in endpoint
controller register using random BAR indicator register, the memory
for which might not be allocated by the endpoint function driver.
Add BAR indicator register and MSI-X table offset as arguments in
pci_epc_set_msix() and allocate space for MSI-X table and pending
bit array (PBA) in pci-epf-test endpoint function driver.

Fixes: e61d95832076 ("PCI: endpoint: Add MSI-X interfaces")
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
drivers/pci/controller/dwc/pcie-designware-ep.c
drivers/pci/endpoint/functions/pci-epf-test.c
drivers/pci/endpoint/pci-epc-core.c
include/linux/pci-epc.h