From patchwork Mon Sep 20 16:44:15 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: 514362 Delivered-To: patch@linaro.org Received: by 2002:a02:c816:0:0:0:0:0 with SMTP id p22csp2325074jao; Mon, 20 Sep 2021 11:31:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJySKagq5UYYc8gY89Ku1HUAWZtMebnpsTt8LulMNjXvpNgPDA6yHGwTR3HXqOqs6tx4xnf6 X-Received: by 2002:a05:6402:742:: with SMTP id p2mr31104819edy.347.1632162699064; Mon, 20 Sep 2021 11:31:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632162699; cv=none; d=google.com; s=arc-20160816; b=qf1COpJ5j3KsbiK9mINqTtpVzVeP3AzWg+N05siSRg8x623GvXIjaSyhb+VfwX5oob VvxY2uq5mqbm2gGAe+us1up3Nsx9WWeSm51iTRftMuTcWzMyv7g/CVXHvgblYEzN9/jb BnqND5IMPusP42bdtcHoQpmzKSAz3KITgSacT7bXSCBfDSk9pHXbIBCA4nk64hqUtkQl f/XxGkVfs4qnv8EyigpX4YX3vIQ2O0tKQt/x0g2guqOGjwyXCZnOTrwtNlj7mx5Ze0XJ JQTgKA1tqghbsz+NYoCzV2nMcrIFapDCDqGk1+CqKT2KdQVfOdFhOaih3ZAa8htE6vcy yWXw== 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=0ln8uUM+cB4guI4qHK+bK7Jhwy0P4brDqZ9hgLcwzUNm2j66t8V2Tnb/LqyKsHCnPC 9jxGdW9S6K1Ho+/VrcgXBHnK5Gj7cRSuWJ6Qu0moh8KUxoasDL6heWePPZVrmrXKZuUk A/MI1sFwb/TcnB4NMkRi7t3EuD3+hJ1uJCY9I1lqq6qML5CsHDA62uxEtqxgdOW0lcgp cJrptKntqk2Efi2z/SH3VRfD4tUhurfpIizyOjAV4JqPIRB9W7+ZJR5bd63olxCD492E NZm3/7mIu+BVL/fY0vUWqVpAbQkZVFBrs8X9CpEGF/cRzeG7liS+6xk4C1w3p2bEdMPC QeSw== 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 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.38; Mon, 20 Sep 2021 11:31:39 -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=d0+dJ3nC; 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 S1352842AbhITSdE (ORCPT + 11 others); Mon, 20 Sep 2021 14:33:04 -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?b?UmFmYcWCIE1pxYJlY2tp?= , =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , 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_Wilczy=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 Precedence: bulk List-ID: X-Mailing-List: stable@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(-) -- 2.30.2 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)