Browse Source

arm: a37xx: pci: Fix condition for CRS response

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 <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
Pali Rohár 2 years ago
parent
commit
9ae6851dec
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/pci/pci-aardvark.c

+ 1 - 1
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,