From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6607ACAC5A7 for ; Tue, 23 Sep 2025 11:38:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=egMekaFccen750Il+5Kasv4g4VbB9AzrUt1BlUnrNyU=; b=l+zurlkuQH20gU qWKL0qTXAjYnoemEs+rPrMSdgtheTMRKKxGnY52lMfILGCsp9YIFtTMwob8UxqU3rhwXcujQA7zjB vOPCejW2Q5KMqml2ztQC/8YDGDidKTDLFF61XPmkXTZzowtBansquioOgvYXzjtXeSsnAAFcYKlwX HQVYLrdy/9FZP8rFUDnzPa+rR+7F4F6ldgOzUIZU8EQ3yHhWZ9RlD3zGXxg1Qw0nTstEGvbyOqOXk 4qf9Qvb11iaGOQB+t6OTQqlv4A0R+1W9xt3Mq1i1DMx2jXucB07LXgWb6K2w+oiW0GwOWFZldvGia sME2hleRflxoRZ6iXnDg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1v11LP-0000000DCDM-1ALc; Tue, 23 Sep 2025 11:38:03 +0000 Received: from 60-248-80-70.hinet-ip.hinet.net ([60.248.80.70] helo=Atcsqr.andestech.com) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1v11LM-0000000DCBq-3kcL for linux-riscv@lists.infradead.org; Tue, 23 Sep 2025 11:38:02 +0000 Received: from mail.andestech.com (ATCPCS31.andestech.com [10.0.1.89]) by Atcsqr.andestech.com with ESMTPS id 58NBb07N067441 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 23 Sep 2025 19:37:12 +0800 (+08) (envelope-from randolph@andestech.com) Received: from atctrx.andestech.com (10.0.15.173) by ATCPCS31.andestech.com (10.0.1.89) with Microsoft SMTP Server id 14.3.498.0; Tue, 23 Sep 2025 19:37:00 +0800 From: Randolph Lin To: CC: , , , , , , , , , , , , , , , , , , , , , , Randolph Lin Subject: [PATCH v3 1/5] PCI: dwc: Skip failed outbound iATU and continue Date: Tue, 23 Sep 2025 19:36:43 +0800 Message-ID: <20250923113647.895686-2-randolph@andestech.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250923113647.895686-1-randolph@andestech.com> References: <20250923113647.895686-1-randolph@andestech.com> MIME-Version: 1.0 X-Originating-IP: [10.0.15.173] X-DKIM-Results: atcpcs31.andestech.com; dkim=none; X-DNSRBL: X-MAIL: Atcsqr.andestech.com 58NBb07N067441 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250923_043801_255228_DB95A7EA X-CRM114-Status: GOOD ( 11.38 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Previously, outbound iATU programming included range checks based on hardware limitations. If a configuration did not meet these constraints, the loop would stop immediately. This patch updates the behavior to enhance flexibility. Instead of stopping at the first issue, it now logs a warning with details of the affected window and proceeds to program the remaining iATU entries. This enables partial configuration to complete in cases where some iATU windows may not meet requirements, improving overall compatibility. Signed-off-by: Randolph Lin --- drivers/pci/controller/dwc/pcie-designware-host.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c index 952f8594b501..91ee6b903934 100644 --- a/drivers/pci/controller/dwc/pcie-designware-host.c +++ b/drivers/pci/controller/dwc/pcie-designware-host.c @@ -756,7 +756,7 @@ static int dw_pcie_iatu_setup(struct dw_pcie_rp *pp) if (resource_type(entry->res) != IORESOURCE_MEM) continue; - if (pci->num_ob_windows <= ++i) + if (pci->num_ob_windows <= i) break; atu.index = i; @@ -773,9 +773,10 @@ static int dw_pcie_iatu_setup(struct dw_pcie_rp *pp) ret = dw_pcie_prog_outbound_atu(pci, &atu); if (ret) { - dev_err(pci->dev, "Failed to set MEM range %pr\n", - entry->res); - return ret; + dev_warn(pci->dev, "Failed to set MEM range %pr\n", + entry->res); + } else { + i++; } } -- 2.34.1 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv