From bd4064ff8a82460d6a497faf66ac5830ffe452b1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Pali=20Roh=C3=A1r?= Date: Tue, 19 Oct 2021 11:05:01 +0200 Subject: [PATCH] arm: a37xx: pci: Fix condition for CRS response MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit As stated in comment above the code, CRS response can be returned to OS only for 4-byte PCI_VENDOR_ID config read request. So fix the code. Fixes: 1d7ad68559e2 ("arm: a37xx: pci: Handle propagation of CRSSVE bit from PCIe Root Port") Signed-off-by: Pali Rohár Reviewed-by: Stefan Roese --- drivers/pci/pci-aardvark.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/pci-aardvark.c b/drivers/pci/pci-aardvark.c index ade5ab0..9e623b6 100644 --- a/drivers/pci/pci-aardvark.c +++ b/drivers/pci/pci-aardvark.c @@ -445,7 +445,7 @@ static int pcie_advk_read_config(const struct udevice *bus, pci_dev_t bdf, * for returning CRS, so that if U-Boot does support CRS in the future, * it will work for Aardvark. */ - allow_crs = pcie->cfgcrssve; + allow_crs = (offset == PCI_VENDOR_ID) && (size == PCI_SIZE_32) && pcie->cfgcrssve; if (advk_readl(pcie, PIO_START)) { dev_err(pcie->dev, -- 2.7.4