PCI: endpoint: Allocate enough space for fixed size BAR
authorAlan Mikhak <alan.mikhak@sifive.com>
Thu, 23 May 2019 21:47:59 +0000 (14:47 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Jul 2019 05:24:38 +0000 (07:24 +0200)
commit3ba9ffa4b4ece4d92bf3935578115e7d6dc452cc
treea1227e43c3887bb7dd438095ae01529dc5b20850
parentd7d97f4696916fa6010e15d0730a6c4e8e765f2e
PCI: endpoint: Allocate enough space for fixed size BAR

[ Upstream commit f16fb16ed16c7f561e9c41c9ae4107c7f6aa553c ]

PCI endpoint test function code should honor the .bar_fixed_size parameter
from underlying endpoint controller drivers or results may be unexpected.

In pci_epf_test_alloc_space(), check if BAR being used for test
register space is a fixed size BAR. If so, allocate the required fixed
size.

Signed-off-by: Alan Mikhak <alan.mikhak@sifive.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pci/endpoint/functions/pci-epf-test.c