Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3617496pxb; Mon, 24 Jan 2022 13:37:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJyVaLVppWLBXgWO78hFDyGJOPiMJgmV9FZtHRA/9So/tT+4R+aC/eYLpyq/VRnRHvhzlGrj X-Received: by 2002:a17:90b:33d2:: with SMTP id lk18mr281209pjb.37.1643060244406; Mon, 24 Jan 2022 13:37:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643060244; cv=none; d=google.com; s=arc-20160816; b=c3k91ovtc9qfQEGSX4q8jusZAxeyGfLKdoP4e6r2zAdiG6CHc1yY3Xipzo1giBLO9j X1P3fjsdF1tiIwGIje9cLfDj4TTiYcQ11jxGo10eIwcrOrnAhrL4oYksGI0P4mBuzIRH GhUBHugunhbzXhg24J3qkme+BJJk29pyUuwQgIjIOrv+819p66I6BSzHLDxQeiu3iKhW 4QK5b0iipYjApgkw/nkX3hNyxczz9mU6xMqbjsYngBkNDc82Ey6dMHTq3kq4/UrH8/Kz OKuxD81dDULiNH1ZmmvNM94FruUE47CzaS4+0HHD0I/7rp4TYwShMkTdh98YFxYwM7gJ x+vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=RfNmWHVrbW8zkerDgC8XQqOoOZksbiuOW4VCo3em9yo=; b=V4Qvaq/5xPBaGcaAiDz/FtNDDu+y006BQRKBpkWpUxnY8yoRp5FtTomA+BSwGGYpMz wVfNNUWA0quZSJKHhS9WB6C76qj1k96mXEjvbcHlmAyiPNzfZZXSmJsS3BWFzn1bI7xQ gP9FABhYaGb2u4h4nD1nOEyaBpuRi7hRQ/Q3jRS0Qx3WO5ju30fwJeWqy2sfNjdRFrbA CBAsWnxSYk13714+kRCwe08vOMJM3w+mUOTBAh8tl94nY+nkztxwEXA8m6qIQAp8Rxjp pAGlLDfO3PRF9L7YFMBeMvRQyoO0kZoFpSVkwI5IlI8AfhGcnabbF93trfFDSSQ/vKJ5 pBkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ozD0Z8Nz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id my13si471220pjb.171.2022.01.24.13.37.12; Mon, 24 Jan 2022 13:37:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ozD0Z8Nz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1448010AbiAXVLw (ORCPT + 99 others); Mon, 24 Jan 2022 16:11:52 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:46062 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1390191AbiAXUpD (ORCPT ); Mon, 24 Jan 2022 15:45:03 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 15CC6B81218; Mon, 24 Jan 2022 20:44:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1A500C340E5; Mon, 24 Jan 2022 20:44:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643057096; bh=ucs4b6QzXOxOc1YICXU0kEQvXUrqmGp6H4umnOvh/+E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ozD0Z8Nz6hFjbp996eVDqvwxP53beMTdjZZZ0pwJLRiEOkOvMAN7xfVSTtvWx8rP3 nGRbNZb+MaDFDkvYS9uTmM26+9vQTSvsyPLoVR+CMBr5elkMvv9kiYvCmVfGh2suJN YwXo5PFkJSXXW5yyAUz8JWJWTf5TD+KvL0cxHF1s= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?St=C3=A9phane=20Graber?= , Rob Herring , Lorenzo Pieralisi , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= Subject: [PATCH 5.15 700/846] PCI: xgene: Fix IB window setup Date: Mon, 24 Jan 2022 19:43:37 +0100 Message-Id: <20220124184125.203088385@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184100.867127425@linuxfoundation.org> References: <20220124184100.867127425@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rob Herring commit c7a75d07827a1f33d566e18e6098379cc2a0c2b2 upstream. 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 Tested-by: Stéphane Graber Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Reviewed-by: Krzysztof Wilczyński Cc: stable@vger.kernel.org # v5.5+ Signed-off-by: Greg Kroah-Hartman --- drivers/pci/controller/pci-xgene.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/pci/controller/pci-xgene.c +++ b/drivers/pci/controller/pci-xgene.c @@ -466,7 +466,7 @@ static int xgene_pcie_select_ib_reg(u8 * 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; }