Re: [PATCH 1/2] PCI: of: Don't fail devm_pci_alloc_host_bridge() on missing 'ranges'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 03, 2021 at 03:56:55PM -0600, Rob Herring wrote:
> 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.

s/latter/later/

> Fixes: 669cbc708122 ("PCI: Move DT resource setup into devm_pci_alloc_host_bridge()")
> Reported-by: Rafał Miłecki <zajec5@xxxxxxxxx>
> Cc: Srinath Mannam <srinath.mannam@xxxxxxxxxxxx>
> Cc: Roman Bacik <roman.bacik@xxxxxxxxxxxx>
> Cc: Bharat Gooty <bharat.gooty@xxxxxxxxxxxx>
> Cc: Abhishek Shah <abhishek.shah@xxxxxxxxxxxx>
> Cc: Jitendra Bhivare <jitendra.bhivare@xxxxxxxxxxxx>
> Cc: Ray Jui <ray.jui@xxxxxxxxxxxx>
> Cc: Florian Fainelli <f.fainelli@xxxxxxxxx>
> Cc: BCM Kernel Feedback <bcm-kernel-feedback-list@xxxxxxxxxxxx>
> Cc: Scott Branden <sbranden@xxxxxxxxxxxx>
> Cc: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@xxxxxxx>
> Signed-off-by: Rob Herring <robh@xxxxxxxxxx>

Acked-by: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>

I assume Lorenzo will merge this along with the iproc change.

> ---
>  drivers/pci/of.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/of.c b/drivers/pci/of.c
> index a143b02b2dcd..d84381ce82b5 100644
> --- a/drivers/pci/of.c
> +++ b/drivers/pci/of.c
> @@ -310,7 +310,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) {
> -- 
> 2.30.2
> 



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux