]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: mvebu: Fix duplicate resource requests
authorRob Herring <robh@kernel.org>
Fri, 23 Oct 2020 14:52:52 +0000 (09:52 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 4 Nov 2020 19:55:30 +0000 (13:55 -0600)
commite18c22d73056514bc8a80ace4c933d993e07cd67
treeb3a0bafdc0d6b2798973d16d22b92dc4abb1fe29
parent64991e542bddba26ba903bf827076f2e41c49252
PCI: mvebu: Fix duplicate resource requests

With commit d39de0c50277 ("PCI: Move DT resource setup into
devm_pci_alloc_host_bridge()"), the DT 'ranges' is parsed and populated
into resources when the host bridge is allocated. The resources are
requested as well, but that happens a second time for the mvebu driver in
mvebu_pcie_parse_request_resources(). We should only be requesting the
additional resources added in mvebu_pcie_parse_request_resources().  These
are not added by default because they use custom properties rather than
standard DT address translation.

Also, the bus ranges was also populated by default, so we can remove it
from mvebu_pci_host_probe().

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=209729
Fixes: d39de0c50277 ("PCI: Move DT resource setup into devm_pci_alloc_host_bridge()")
Link: https://lore.kernel.org/r/20201023145252.2691779-1-robh@kernel.org
Reported-by: vtolkm@googlemail.com
Tested-by: Jan Kundrát <jan.kundrat@cesnet.cz>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Russell King <linux@armlinux.org.uk>
drivers/pci/controller/pci-mvebu.c