Skip to content

Commit ddd044b

Browse files
committed
PCI: apple: Set only available ports up
Iterating over disabled ports results in of_irq_parse_raw() parsing the wrong "interrupt-map" entries, as it takes the status of the node into account. Switching from for_each_child_of_node() to for_each_available_child_of_node() solves this issue. This became apparent after disabling unused PCIe ports in the Apple Silicon device trees instead of deleting them. Link: https://lore.kernel.org/asahi/20230214-apple_dts_pcie_disable_unused-v1-0-5ea0d3ddcde3@jannau.net/ Link: https://lore.kernel.org/asahi/1ea2107a-bb86-8c22-0bbc-82c453ab08ce@linaro.org/ Fixes: 1e33888 ("PCI: apple: Add initial hardware bring-up") Cc: stable@vger.kernel.org Signed-off-by: Janne Grunau <j@jannau.net> Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Signed-off-by: Marc Zyngier <maz@kernel.org>
1 parent 97e10a1 commit ddd044b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/pci/controller/pcie-apple.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@ static int apple_pcie_init(struct pci_config_window *cfg)
747747
struct device_node *of_port;
748748
int ret;
749749

750-
for_each_child_of_node(dev->of_node, of_port) {
750+
for_each_available_child_of_node(dev->of_node, of_port) {
751751
ret = apple_pcie_setup_port(pcie, of_port);
752752
if (ret) {
753753
dev_err(dev, "Port %pOF setup fail: %d\n", of_port, ret);

0 commit comments

Comments
 (0)