Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2352078pxb; Mon, 20 Sep 2021 19:48:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxklDNWxa0hwQTnRy16WzfLqw/2LjFM1GltB7jO9/ZZo9jjJT6xvsN4SPvajt5tFYw1UKvI X-Received: by 2002:a17:906:7802:: with SMTP id u2mr32228605ejm.325.1632192535042; Mon, 20 Sep 2021 19:48:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632192535; cv=none; d=google.com; s=arc-20160816; b=ev8f7LcOL/zQMUMRg1T7nA2pMPSryb1utHMQCp9IDqRxqAzqc7yYBZ2BRWXeYzfaOG A8jN7JO1hKPZn/3OAsZri3UHjzAle23GfqtnBjgjwXUdkDhs2PErSzeikd0eJy1koKST By5IGRN1nCCT0hDvvE3dl3nSnB+BIj4OBA0jHRdKWwjfJqIUXlJJ0L7VT1OCdXakTdfW tvVToNUfdGHPetAVf/letqQRbejkCf0USfUKSGWLxla3zgOplY34Jzg3HbsXoZKEhQaY Da+wx7Pq07PglqKWDDOSUNlpLxuYac6frBneSxzMUmBLyBTd02HoZpycS9n+whC1fwtR 4q4A== 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=KchsrLwXX54Dvfldy/gP/UtblKXwOYw58PaYddA0PXs=; b=ykLz3dIxxyTWVjmGmzPIv8K8ZBe7X3DrNGlpm0E9RwoL0+J5XBSrr2zYzpwCYPqoH+ HPw8pwW3yqm83UKeo9cEyyPZq1vkrtlNHOGqb/unlWOOK/GVyqt7VvqNKnagXfJVsHVW o1vvk2PJChZ7iAL/sYDCFoGojB72ZVTw0gaN+PP3RqrOJkVnpni3AggOptuZ8UcM74qW OMxOJWlR2x75kwn1WAZQlEgADRHTbmSmpLIBZphmx5Q5JjeMJkpvZCNf90+9j3BmVBmS VyBPzmg/9zutiCPc0StLCTl+IXiC+3uj6uXTZmrUAxSMCPFnPgWKKc8E7oqTmJw+DP5F Gy2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=d0+dJ3nC; 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 y11si17868839eda.74.2021.09.20.19.48.29; Mon, 20 Sep 2021 19:48:55 -0700 (PDT) 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=d0+dJ3nC; 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 S1380880AbhITSfA (ORCPT + 99 others); Mon, 20 Sep 2021 14:35:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:48136 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379869AbhITSbA (ORCPT ); Mon, 20 Sep 2021 14:31:00 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3839761AA3; Mon, 20 Sep 2021 17:27:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632158847; bh=12eTKTrgXoNsliTpBIj9AqdcGCF3gdeRnknu9J4fK+0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=d0+dJ3nCCM/kC8UNxzArfd32OIufVYAm1ocwe3LhzHVP48KYmIO1CPH91na/ijbO9 RWfXs4tC/LWtdkZ881aG9lcpWx09FRo8k0uJfZk+jXKm90hSxPwAFqY0fCgUfU0T0g Xw8O/z2yyOYN6NFgsrqYcr9l/y0myEb8nyn9t5n4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Rob Herring , Lorenzo Pieralisi , Srinath Mannam , Roman Bacik , Bharat Gooty , Abhishek Shah , Jitendra Bhivare , Ray Jui , Florian Fainelli , BCM Kernel Feedback , Scott Branden , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , Bjorn Helgaas , Sasha Levin Subject: [PATCH 5.10 083/122] PCI: iproc: Fix BCMA probe resource handling Date: Mon, 20 Sep 2021 18:44:15 +0200 Message-Id: <20210920163918.512725820@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 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 [ Upstream commit aeaea8969b402e0081210cc9144404d13996efed ] In commit 7ef1c871da16 ("PCI: iproc: Use pci_parse_request_of_pci_ranges()"), calling devm_request_pci_bus_resources() was dropped from the common iProc probe code, but is still needed for BCMA bus probing. Without it, there will be lots of warnings like this: pci 0000:00:00.0: BAR 8: no space for [mem size 0x00c00000] pci 0000:00:00.0: BAR 8: failed to assign [mem size 0x00c00000] Add back calling devm_request_pci_bus_resources() and adding the resources to pci_host_bridge.windows for BCMA bus probe. Link: https://lore.kernel.org/r/20210803215656.3803204-2-robh@kernel.org Fixes: 7ef1c871da16 ("PCI: iproc: Use pci_parse_request_of_pci_ranges()") Reported-by: Rafał Miłecki Tested-by: Rafał Miłecki Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi 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: Lorenzo Pieralisi Cc: "Krzysztof Wilczyński" Cc: Bjorn Helgaas Signed-off-by: Sasha Levin --- drivers/pci/controller/pcie-iproc-bcma.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/pci/controller/pcie-iproc-bcma.c b/drivers/pci/controller/pcie-iproc-bcma.c index 56b8ee7bf330..f918c713afb0 100644 --- a/drivers/pci/controller/pcie-iproc-bcma.c +++ b/drivers/pci/controller/pcie-iproc-bcma.c @@ -35,7 +35,6 @@ static int iproc_pcie_bcma_probe(struct bcma_device *bdev) { struct device *dev = &bdev->dev; struct iproc_pcie *pcie; - LIST_HEAD(resources); struct pci_host_bridge *bridge; int ret; @@ -60,19 +59,16 @@ static int iproc_pcie_bcma_probe(struct bcma_device *bdev) pcie->mem.end = bdev->addr_s[0] + SZ_128M - 1; pcie->mem.name = "PCIe MEM space"; pcie->mem.flags = IORESOURCE_MEM; - pci_add_resource(&resources, &pcie->mem); + pci_add_resource(&bridge->windows, &pcie->mem); + ret = devm_request_pci_bus_resources(dev, &bridge->windows); + if (ret) + return ret; pcie->map_irq = iproc_pcie_bcma_map_irq; - ret = iproc_pcie_setup(pcie, &resources); - if (ret) { - dev_err(dev, "PCIe controller setup failed\n"); - pci_free_resource_list(&resources); - return ret; - } - bcma_set_drvdata(bdev, pcie); - return 0; + + return iproc_pcie_setup(pcie, &bridge->windows); } static void iproc_pcie_bcma_remove(struct bcma_device *bdev) -- 2.30.2