openwrt/target/linux/bcm53xx/patches-4.14/982-PCI-iproc-Disable-DMA-mapping-support.patch

30 lines
867 B
Diff
Raw Normal View History

From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
Date: Fri, 29 Dec 2017 22:39:45 +0100
Subject: [PATCH] PCI: iproc: Disable DMA mapping support
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This has been added in commit dd9d4e7498de3 ("PCI: iproc: Add inbound
DMA mapping support") which causes a crash for bcma case. Function
pci_dma_range_parser_init calls of_n_addr_cells with a NULL argument
which causes a NULL pointer dereference.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
--- a/drivers/pci/host/pcie-iproc.c
+++ b/drivers/pci/host/pcie-iproc.c
@@ -1396,9 +1396,11 @@ int iproc_pcie_setup(struct iproc_pcie *
}
}
+if (0) {
ret = iproc_pcie_map_dma_ranges(pcie);
if (ret && ret != -ENOENT)
goto err_power_off_phy;
+}
#ifdef CONFIG_ARM
pcie->sysdata.private_data = pcie;