From patchwork Mon Sep 20 16:44:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 514364 Delivered-To: patch@linaro.org Received: by 2002:a02:c816:0:0:0:0:0 with SMTP id p22csp2325126jao; Mon, 20 Sep 2021 11:31:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzh2drBIekDnhNtTUaX/GJPwLEKTDn3qy5lbeWyGAYTINf2zikBVAJVTyv5NnpVvwIvT6St X-Received: by 2002:a17:906:6011:: with SMTP id o17mr29192740ejj.157.1632162701995; Mon, 20 Sep 2021 11:31:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632162701; cv=none; d=google.com; s=arc-20160816; b=BRSWz/Hxgh/boxzB7jtIXxz9CfH+MtjgnqfG77XnjeRcnjWtpgYoh/pb5Ad8WpwNuX Dvn62Bkgg2xxDVTcfnWa5vkn0/MXGwmhtB+5Ky2d8ZeS+LnrkqRl6tnbE/fABCL1nfd6 wv6WZh2QTK2S3q6AhEF4sFZrcPaJnuyAWokKxGP4ljQwctncXonkRU5sb+opPKe4oMP/ JaBucTunlkx4gSNZ7ov2prZkb8frsMWeBSG6MzymQjigVE6ewWa6MRoXxg/TO7GJ/dO6 d6jjVk/vrTpBIT1RHWpAdY5x0HXGwB4tPHlnLlB6A2a3vtXnSWT7h27sK+lksiaHMaLK bIAQ== 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=0tkbOnL+zg8mAXUb4Nqbiy+IvCdc8z2qhJvpgjBoTMs=; b=xvOt0Noy2WwS/k83EzmuFfKDwUXEi3Lw6wEn5LnZysIF0VdKtDiDbBorRA32MB4tGT kg02DgFT0QMAeQqHQL7IfNqHMSLqgInkGjwgfWMqf57ccbK94XFOu/g7WEtR+geZTJc9 gAgq5g/JIOL7/ACPTgmeg2dbTbgC93q70mCA1l4w99/cEPOpQyhPdEkJrb29KO5r10tM TK+R1YlKIkNqat6/g7pAOtTT7VrXXMAOIvg4uKQ4yWcdglwRqv+vEoJ+Xhi4iA63lUtf mdVWqj+NcWusV0DkYASmAJTXmCr58w6iO3K1d6SpXKOQEe0aqMWNwUTaOJmVaTgjvWgW rLXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jA+j6nZC; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 q1si16538474ejr.43.2021.09.20.11.31.41; Mon, 20 Sep 2021 11:31:41 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-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=jA+j6nZC; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 S1352814AbhITSdF (ORCPT + 11 others); Mon, 20 Sep 2021 14:33:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:49714 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379871AbhITSbA (ORCPT ); Mon, 20 Sep 2021 14:31:00 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2C443632EF; Mon, 20 Sep 2021 17:27:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632158845; bh=YgWcVjKHiquDq7uBBsRRXjk9RqqgHeuE4K7c+7hoAZw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jA+j6nZCSRzT1zbzNBF4+U+26VckEswpMzAmEnFhf+jNLCLbdUkNU7ML2snJWoiim G4i2ixwDWn4pO0M5QVnDANVLRempFqfkhOy+Aud7b+JlkDJbs7qHbWttFKGphvlbTy zTTimwagMUK2dg8UhrwKzvUBxMjseLoaOJ7lLoYc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , Rob Herring , Lorenzo Pieralisi , Bjorn Helgaas , Srinath Mannam , Roman Bacik , Bharat Gooty , Abhishek Shah , Jitendra Bhivare , Ray Jui , Florian Fainelli , BCM Kernel Feedback , Scott Branden , Sasha Levin Subject: [PATCH 5.10 082/122] PCI: of: Dont fail devm_pci_alloc_host_bridge() on missing ranges Date: Mon, 20 Sep 2021 18:44:14 +0200 Message-Id: <20210920163918.481485606@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163915.757887582@linuxfoundation.org> References: <20210920163915.757887582@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Rob Herring [ Upstream commit d277f6e88c88729b1d57d40bbfb00d0bfc961972 ] Commit 669cbc708122 ("PCI: Move DT resource setup into devm_pci_alloc_host_bridge()") made devm_pci_alloc_host_bridge() fail on any DT resource parsing errors, but Broadcom iProc uses devm_pci_alloc_host_bridge() on BCMA bus devices that don't have DT resources. In particular, there is no 'ranges' property. Fix iProc by making 'ranges' optional. If 'ranges' is required by a platform, there's going to be more errors latter on if it is missing. Link: https://lore.kernel.org/r/20210803215656.3803204-1-robh@kernel.org Fixes: 669cbc708122 ("PCI: Move DT resource setup into devm_pci_alloc_host_bridge()") Reported-by: Rafał Miłecki Tested-by: Rafał Miłecki Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Acked-by: Bjorn Helgaas Cc: Srinath Mannam Cc: Roman Bacik Cc: Bharat Gooty Cc: Abhishek Shah Cc: Jitendra Bhivare Cc: Ray Jui Cc: Florian Fainelli Cc: BCM Kernel Feedback Cc: Scott Branden Cc: Bjorn Helgaas Cc: Lorenzo Pieralisi Signed-off-by: Sasha Levin --- drivers/pci/of.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.30.2 diff --git a/drivers/pci/of.c b/drivers/pci/of.c index ac24cd5439a9..3f6ef2f45e57 100644 --- a/drivers/pci/of.c +++ b/drivers/pci/of.c @@ -295,7 +295,7 @@ static int devm_of_pci_get_host_bridge_resources(struct device *dev, /* Check for ranges property */ err = of_pci_range_parser_init(&parser, dev_node); if (err) - goto failed; + return 0; dev_dbg(dev, "Parsing ranges property...\n"); for_each_of_pci_range(&parser, &range) {