arm: a37xx: pci: Fix condition for CRS response
PATCH 1/1 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.
--- drivers/pci/pci-aardvark.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/pci-aardvark.c +1 -1
@@ -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,
Signature · 1 line
2.20.1
Quoted 5 lines · Pali Rohár
As stated in comment above the code, CRS response can be returned to OS only for 4-byte
PCI_VENDOR_IDconfig 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 <[email protected]>
Thanks,
Stefan
Quoted 10 lines
--- drivers/pci/pci-aardvark.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/pci/pci-aardvark.c +0
-0
drivers/pci/pci-aardvark.c static int pcie_advk_read_config(const struct udevice *bus, pci_dev_t bdf, · line 451
Quoted 8 lines
drivers/pci/pci-aardvark.c +1
-1@@ -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,
Viele Grüße,
Stefan
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]
Quoted 5 lines · Pali Rohár
As stated in comment above the code, CRS response can be returned to OS only for 4-byte
PCI_VENDOR_IDconfig 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 <[email protected]>
Applied to u-boot-marvell/master
Thanks,
Stefan
Quoted 10 lines
--- drivers/pci/pci-aardvark.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/pci/pci-aardvark.c +0
-0
drivers/pci/pci-aardvark.c static int pcie_advk_read_config(const struct udevice *bus, pci_dev_t bdf, · line 451
Quoted 8 lines
drivers/pci/pci-aardvark.c +1
-1@@ -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,
Viele Grüße,
Stefan
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]