[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+enf=vOE7dAPL+fpcFytxMkVsDcgrroCchWKYfd6YjGaE4bVQ@mail.gmail.com>
Date: Mon, 29 Nov 2021 14:14:13 -0500
From: Stéphane Graber <stgraber@...ntu.com>
To: Rob Herring <robh@...nel.org>
Cc: Toan Le <toan@...amperecomputing.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Krzysztof Wilczyński <kw@...ux.com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Andrew Murray <amurray@...goodpenguin.co.uk>,
stable@...r.kernel.org, linux-pci@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] PCI: xgene: Fix IB window setup
On Mon, Nov 29, 2021 at 12:36 PM Rob Herring <robh@...nel.org> wrote:
>
> 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@...ntu.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@...r.kernel.org # v5.5+
> Signed-off-by: Rob Herring <robh@...nel.org>
I've been running with this exact change on top of the latest 5.12
stable release for a few days now, so can confirm that on my hardware
it's behaving perfectly (on 4 different servers).
Tested-by: Stéphane Graber <stgraber@...ntu.com>
> ---
> 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
>
Powered by blists - more mailing lists