kernel: Update to version 4.4.182
[openwrt/openwrt.git] / target / linux / cns3xxx / patches-4.4 / 060-pcie_abort.patch
index 7a3a8e4c250c9ced74b32a14ad0aff37e7515976..87b1526c3a397d5446251ca544f0c5e5e751b2e0 100644 (file)
@@ -1,7 +1,7 @@
 --- a/arch/arm/mach-cns3xxx/pcie.c
 +++ b/arch/arm/mach-cns3xxx/pcie.c
 @@ -86,6 +86,79 @@ static void __iomem *cns3xxx_pci_map_bus
-       return base + (where & 0xffc) + (devfn << 12);
+       return base + where + (devfn << 12);
  }
  
 +static inline int check_master_abort(struct pci_bus *bus, unsigned int devfn, int where)
@@ -82,7 +82,7 @@
  {
 @@ -95,6 +168,11 @@ static int cns3xxx_pci_read_config(struc
  
-       ret = pci_generic_config_read32(bus, devfn, where, size, val);
+       ret = pci_generic_config_read(bus, devfn, where, size, val);
  
 +      if (check_master_abort(bus, devfn, where)) {
 +              printk(KERN_ERR "pci error: %04d:%02x:%02x.%02x %02x(%d)= master_abort on read\n", pci_domain_nr(bus), bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn), where, size);