All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PCI: xgene: Fix IB window setup
@ 2021-11-29 17:36 ` Rob Herring
  0 siblings, 0 replies; 27+ messages in thread
From: Rob Herring @ 2021-11-29 17:36 UTC (permalink / raw)
  To: Toan Le, Lorenzo Pieralisi, Krzysztof Wilczyński,
	Bjorn Helgaas, Andrew Murray
  Cc: Stéphane Graber, stable, linux-pci, linux-arm-kernel, linux-kernel

Commit 6dce5aa59e0b ("PCI: xgene: Use inbound resources for setup")
broke PCI support on XGene. The cause is the IB resources are now sorted
in address order instead of being in DT dma-ranges order. The result is
which inbound registers are used for each region are swapped. I don't
know the details about this h/w, but it appears that IB region 0
registers can't handle a size greater than 4GB. In any case, limiting
the size for region 0 is enough to get back to the original assignment
of dma-ranges to regions.

Reported-by: Stéphane Graber <stgraber@ubuntu.com>
Fixes: 6dce5aa59e0b ("PCI: xgene: Use inbound resources for setup")
Link: https://lore.kernel.org/all/CA+enf=v9rY_xnZML01oEgKLmvY1NGBUUhnSJaETmXtDtXfaczA@mail.gmail.com/
Cc: stable@vger.kernel.org # v5.5+
Signed-off-by: Rob Herring <robh@kernel.org>
---
 drivers/pci/controller/pci-xgene.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/controller/pci-xgene.c b/drivers/pci/controller/pci-xgene.c
index 56d0d50338c8..d83dbd977418 100644
--- a/drivers/pci/controller/pci-xgene.c
+++ b/drivers/pci/controller/pci-xgene.c
@@ -465,7 +465,7 @@ static int xgene_pcie_select_ib_reg(u8 *ib_reg_mask, u64 size)
 		return 1;
 	}
 
-	if ((size > SZ_1K) && (size < SZ_1T) && !(*ib_reg_mask & (1 << 0))) {
+	if ((size > SZ_1K) && (size < SZ_4G) && !(*ib_reg_mask & (1 << 0))) {
 		*ib_reg_mask |= (1 << 0);
 		return 0;
 	}
-- 
2.32.0


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

end of thread, other threads:[~2022-03-07 14:25 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-29 17:36 [PATCH] PCI: xgene: Fix IB window setup Rob Herring
2021-11-29 17:36 ` Rob Herring
2021-11-29 19:14 ` Stéphane Graber
2021-11-29 19:14   ` Stéphane Graber
2021-11-30  7:55 ` Krzysztof Wilczyński
2021-11-30  7:55   ` Krzysztof Wilczyński
2021-11-30 14:30 ` Lorenzo Pieralisi
2021-11-30 14:30   ` Lorenzo Pieralisi
2022-02-04 23:01 ` dann frazier
2022-02-04 23:01   ` dann frazier
2022-02-05 16:05   ` Rob Herring
2022-02-05 16:05     ` Rob Herring
2022-02-05 21:12     ` dann frazier
2022-02-05 21:12       ` dann frazier
2022-02-07 16:09       ` Rob Herring
2022-02-07 16:09         ` Rob Herring
2022-02-08  1:19         ` dann frazier
2022-02-08  1:19           ` dann frazier
2022-02-08 14:34           ` Rob Herring
2022-02-08 14:34             ` Rob Herring
2022-02-11  2:16             ` dann frazier
2022-02-11  2:16               ` dann frazier
2022-02-21 11:50               ` Thorsten Leemhuis
2022-02-21 11:50                 ` Thorsten Leemhuis
2022-02-06  9:52   ` Thorsten Leemhuis
2022-02-06  9:52     ` Thorsten Leemhuis
2022-03-07 14:25     ` [PATCH] PCI: xgene: Fix IB window setup #forregzbot Thorsten Leemhuis

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.