123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- From: Rob Herring <[email protected]>
- Date: Tue, 3 Aug 2021 15:56:55 -0600
- Subject: [PATCH] PCI: of: Don't fail devm_pci_alloc_host_bridge() on missing
- 'ranges'
- MIME-Version: 1.0
- Content-Type: text/plain; charset=UTF-8
- Content-Transfer-Encoding: 8bit
- 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.
- Fixes: 669cbc708122 ("PCI: Move DT resource setup into devm_pci_alloc_host_bridge()")
- Reported-by: Rafał Miłecki <[email protected]>
- Cc: Srinath Mannam <[email protected]>
- Cc: Roman Bacik <[email protected]>
- Cc: Bharat Gooty <[email protected]>
- Cc: Abhishek Shah <[email protected]>
- Cc: Jitendra Bhivare <[email protected]>
- Cc: Ray Jui <[email protected]>
- Cc: Florian Fainelli <[email protected]>
- Cc: BCM Kernel Feedback <[email protected]>
- Cc: Scott Branden <[email protected]>
- Cc: Bjorn Helgaas <[email protected]>
- Cc: Lorenzo Pieralisi <[email protected]>
- Signed-off-by: Rob Herring <[email protected]>
- Acked-by: Bjorn Helgaas <[email protected]>
- ---
- drivers/pci/of.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
- --- a/drivers/pci/of.c
- +++ b/drivers/pci/of.c
- @@ -295,7 +295,7 @@ static int devm_of_pci_get_host_bridge_r
- /* 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) {
|