OSDN Git Service

PCI: xgene: Fix IB window setup
authorRob Herring <robh@kernel.org>
Mon, 29 Nov 2021 17:36:37 +0000 (11:36 -0600)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Tue, 30 Nov 2021 14:29:51 +0000 (14:29 +0000)
commitc7a75d07827a1f33d566e18e6098379cc2a0c2b2
tree6fc26f143333680592ac5449a7526da261dc599b
parent1ed9b961be1492e2acc0ce5113936ab08e379de7
PCI: xgene: Fix IB window setup

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.

Link: https://lore.kernel.org/all/CA+enf=v9rY_xnZML01oEgKLmvY1NGBUUhnSJaETmXtDtXfaczA@mail.gmail.com/
Link: https://lore.kernel.org/r/20211129173637.303201-1-robh@kernel.org
Fixes: 6dce5aa59e0b ("PCI: xgene: Use inbound resources for setup")
Reported-by: Stéphane Graber <stgraber@ubuntu.com>
Tested-by: Stéphane Graber <stgraber@ubuntu.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Krzysztof Wilczyński <kw@linux.com>
Cc: stable@vger.kernel.org # v5.5+
drivers/pci/controller/pci-xgene.c