Skip to content

Commit 8bd72bf

Browse files
robherringsmb49
authored andcommitted
PCI: xgene: Fix IB window setup
BugLink: https://bugs.launchpad.net/bugs/1962230 commit c7a75d0 upstream. Commit 6dce5aa ("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/[email protected] Fixes: 6dce5aa ("PCI: xgene: Use inbound resources for setup") Reported-by: Stéphane Graber <[email protected]> Tested-by: Stéphane Graber <[email protected]> Signed-off-by: Rob Herring <[email protected]> Signed-off-by: Lorenzo Pieralisi <[email protected]> Reviewed-by: Krzysztof Wilczyński <[email protected]> Cc: [email protected] # v5.5+ Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Kamal Mostafa <[email protected]> Signed-off-by: Stefan Bader <[email protected]>
1 parent 8a526d3 commit 8bd72bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/pci/controller/pci-xgene.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ static int xgene_pcie_select_ib_reg(u8 *ib_reg_mask, u64 size)
466466
return 1;
467467
}
468468

469-
if ((size > SZ_1K) && (size < SZ_1T) && !(*ib_reg_mask & (1 << 0))) {
469+
if ((size > SZ_1K) && (size < SZ_4G) && !(*ib_reg_mask & (1 << 0))) {
470470
*ib_reg_mask |= (1 << 0);
471471
return 0;
472472
}

0 commit comments

Comments
 (0)