firmware-utils: replace md5 code with Alexander Peslyak's implementation
[openwrt/openwrt.git] / target / linux / bcm53xx / patches-4.4 / 800-PCI-iproc-Ignore-ARM-core-aborts-when-running-on-bcm.patch
1 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
2 Subject: [PATCH] PCI: iproc: Ignore ARM core aborts when running on bcma bus
3 MIME-Version: 1.0
4 Content-Type: text/plain; charset=UTF-8
5 Content-Transfer-Encoding: 8bit
6
7 Northstar devices have host bridges that forward errors to the ARM core.
8 These errors happen during PCI bus probing (device enumeration) and are
9 expected. There is no reason for them to cause a die() so this patch
10 adds a handler silencing them.
11
12 Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
13 ---
14
15 --- a/drivers/pci/host/pcie-iproc-bcma.c
16 +++ b/drivers/pci/host/pcie-iproc-bcma.c
17 @@ -40,6 +40,15 @@ static int iproc_pcie_bcma_map_irq(const
18 return bcma_core_irq(bdev, 5);
19 }
20
21 +static int iproc_pcie_bcma_abort_handler(unsigned long addr, unsigned int fsr,
22 + struct pt_regs *regs)
23 +{
24 + if (fsr == 0x1406)
25 + return 0;
26 +
27 + return 1;
28 +}
29 +
30 static int iproc_pcie_bcma_probe(struct bcma_device *bdev)
31 {
32 struct iproc_pcie *pcie;
33 @@ -65,6 +74,9 @@ static int iproc_pcie_bcma_probe(struct
34
35 pcie->map_irq = iproc_pcie_bcma_map_irq;
36
37 + hook_fault_code(16 + 6, iproc_pcie_bcma_abort_handler, SIGBUS, BUS_OBJERR,
38 + "imprecise external abort");
39 +
40 ret = iproc_pcie_setup(pcie, &res);
41 if (ret)
42 dev_err(pcie->dev, "PCIe controller setup failed\n");