Author: jogo
Date: 2014-07-28 13:12:25 +0200 (Mon, 28 Jul 2014)
New Revision: 41856

Modified:
   
trunk/target/linux/brcm63xx/patches-3.14/416-BCM63XX-add-a-fixup-for-ath9k-devices.patch
   
trunk/target/linux/brcm63xx/patches-3.14/420-BCM63XX-add-endian-check-for-ath9k.patch
   
trunk/target/linux/brcm63xx/patches-3.14/421-BCM63XX-add-led-pin-for-ath9k.patch
Log:
brcm63xx: 3.14: fix ath9k_pci_fixup

Since kernel commit 928bea964827 ("PCI: Delay enabling bridges until
they're needed"), pci fixups are run with bridges (e.g. the pcie port)
disabled.

This causses hangs when ath9k_pci_fixup tries to manually enable the
device to apply the register fixups.

Fix this by enabling any parent bridges before trying to access the
device itself.

Fixes boot on DSL-274XB rev F1.

Reported-by: Matteo Croce <[email protected]>
Signed-off-by: Jonas Gorski <[email protected]>

Modified: 
trunk/target/linux/brcm63xx/patches-3.14/416-BCM63XX-add-a-fixup-for-ath9k-devices.patch
===================================================================
--- 
trunk/target/linux/brcm63xx/patches-3.14/416-BCM63XX-add-a-fixup-for-ath9k-devices.patch
    2014-07-28 10:36:51 UTC (rev 41855)
+++ 
trunk/target/linux/brcm63xx/patches-3.14/416-BCM63XX-add-a-fixup-for-ath9k-devices.patch
    2014-07-28 11:12:25 UTC (rev 41856)
@@ -24,7 +24,7 @@
  obj-y         += boards/
 --- /dev/null
 +++ b/arch/mips/bcm63xx/pci-ath9k-fixup.c
-@@ -0,0 +1,192 @@
+@@ -0,0 +1,199 @@
 +/*
 + *  Broadcom BCM63XX Ath9k EEPROM fixup helper.
 + *
@@ -117,6 +117,7 @@
 +{
 +      void __iomem *mem;
 +      struct ath9k_platform_data *pdata = NULL;
++      struct pci_dev *bridge = pci_upstream_bridge(dev);
 +      u16 *cal_data = NULL;
 +      u16 cmd;
 +      u32 bar0;
@@ -161,6 +162,9 @@
 +              return;
 +      }
 +
++      if (bridge)
++              pci_enable_device(bridge);
++
 +      pci_read_config_dword(dev, PCI_BASE_ADDRESS_0, &bar0);
 +      pci_read_config_dword(dev, PCI_BASE_ADDRESS_0, &bar0);
 +      pci_write_config_dword(dev, PCI_BASE_ADDRESS_0, val);
@@ -195,6 +199,9 @@
 +
 +      pci_write_config_dword(dev, PCI_BASE_ADDRESS_0, bar0);
 +
++      if (bridge)
++              pci_disable_device(bridge);
++
 +      iounmap(mem);
 +
 +      dev->dev.platform_data = pdata;

Modified: 
trunk/target/linux/brcm63xx/patches-3.14/420-BCM63XX-add-endian-check-for-ath9k.patch
===================================================================
--- 
trunk/target/linux/brcm63xx/patches-3.14/420-BCM63XX-add-endian-check-for-ath9k.patch
       2014-07-28 10:36:51 UTC (rev 41855)
+++ 
trunk/target/linux/brcm63xx/patches-3.14/420-BCM63XX-add-endian-check-for-ath9k.patch
       2014-07-28 11:12:25 UTC (rev 41856)
@@ -21,7 +21,7 @@
  /*
 --- a/arch/mips/bcm63xx/pci-ath9k-fixup.c
 +++ b/arch/mips/bcm63xx/pci-ath9k-fixup.c
-@@ -174,12 +174,14 @@ static void ath9k_pci_fixup(struct pci_d
+@@ -181,12 +181,14 @@ static void ath9k_pci_fixup(struct pci_d
  }
  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATHEROS, PCI_ANY_ID, ath9k_pci_fixup);
  

Modified: 
trunk/target/linux/brcm63xx/patches-3.14/421-BCM63XX-add-led-pin-for-ath9k.patch
===================================================================
--- 
trunk/target/linux/brcm63xx/patches-3.14/421-BCM63XX-add-led-pin-for-ath9k.patch
    2014-07-28 10:36:51 UTC (rev 41855)
+++ 
trunk/target/linux/brcm63xx/patches-3.14/421-BCM63XX-add-led-pin-for-ath9k.patch
    2014-07-28 11:12:25 UTC (rev 41856)
@@ -11,7 +11,7 @@
  }
 --- a/arch/mips/bcm63xx/pci-ath9k-fixup.c
 +++ b/arch/mips/bcm63xx/pci-ath9k-fixup.c
-@@ -175,13 +175,14 @@ static void ath9k_pci_fixup(struct pci_d
+@@ -182,13 +182,14 @@ static void ath9k_pci_fixup(struct pci_d
  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATHEROS, PCI_ANY_ID, ath9k_pci_fixup);
  
  void __init pci_enable_ath9k_fixup(unsigned slot, u32 offset,
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to