All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] arm: a37xx: pci: Disable returning CRS response
@ 2021-08-27 12:14 Pali Rohár
  2021-08-27 12:14 ` [PATCH 2/2] arm: a37xx: pci: Implement re-issuing config requests on " Pali Rohár
  2021-08-31  5:57 ` [PATCH 1/2] arm: a37xx: pci: Disable returning " Stefan Roese
  0 siblings, 2 replies; 4+ messages in thread
From: Pali Rohár @ 2021-08-27 12:14 UTC (permalink / raw)
  To: Stefan Roese, Konstantin Porotchkin; +Cc: Marek Behún, u-boot

There was mistake in commit 4cd61c43fd51 ("arm: a37xx: pci: Fix handling
PIO config error responses"). U-Boot does not support handling of CRS
return value for PCI_VENDOR_ID config read request and also does not set
CRSSVE bit.

Therefore disable returning CRS response for now.

Signed-off-by: Pali Rohár <pali@kernel.org>
Fixes: 4cd61c43fd51 ("arm: a37xx: pci: Fix handling PIO config error responses")
---
 drivers/pci/pci-aardvark.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/pci-aardvark.c b/drivers/pci/pci-aardvark.c
index 815b26162f15..d3ef8f203d97 100644
--- a/drivers/pci/pci-aardvark.c
+++ b/drivers/pci/pci-aardvark.c
@@ -358,7 +358,18 @@ static int pcie_advk_read_config(const struct udevice *bus, pci_dev_t bdf,
 		return 0;
 	}
 
-	allow_crs = (offset == PCI_VENDOR_ID) && (size == 4);
+	/*
+	 * Returning fabricated CRS value (0xFFFF0001) by PCIe Root Complex to
+	 * OS is allowed only for 4-byte PCI_VENDOR_ID config read request and
+	 * only when CRSSVE bit in Root Port PCIe device is enabled. In all
+	 * other error PCIe Root Complex must return all-ones.
+	 * Aardvark HW does not have Root Port PCIe device and U-Boot does not
+	 * implement emulation of this device.
+	 * U-Boot currently does not support handling of CRS return value for
+	 * PCI_VENDOR_ID config read request and also does not set CRSSVE bit.
+	 * Therefore disable returning CRS response for now.
+	 */
+	allow_crs = false;
 
 	if (advk_readl(pcie, PIO_START)) {
 		dev_err(pcie->dev,
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-08-31  5:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-27 12:14 [PATCH 1/2] arm: a37xx: pci: Disable returning CRS response Pali Rohár
2021-08-27 12:14 ` [PATCH 2/2] arm: a37xx: pci: Implement re-issuing config requests on " Pali Rohár
2021-08-31  5:58   ` Stefan Roese
2021-08-31  5:57 ` [PATCH 1/2] arm: a37xx: pci: Disable returning " Stefan Roese

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.