diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2013-08-05 16:17:05 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2013-08-05 16:17:05 +0000 |
commit | 9d4145efe5808ecd7616902142fcdfceeefdb172 (patch) | |
tree | 172e459ad2f22399c10296a498d9b6fb64acdc71 /package/kernel | |
parent | 9257d556c27d107102a216eca3472865591a77fb (diff) | |
download | upstream-9d4145efe5808ecd7616902142fcdfceeefdb172.tar.gz upstream-9d4145efe5808ecd7616902142fcdfceeefdb172.tar.bz2 upstream-9d4145efe5808ecd7616902142fcdfceeefdb172.zip |
kernel: fix DMA error when BCM4331 is connected to BCM4706
The BCM4331 supports a PCIe max request size of 512 bytes and uses
that, but the PCIe controller in the BCM4706 just supports 128 Bytes
and that causes a DMA error for packages bigger than 126 bytes. This
fixes the problem by setting the BCM4331 also to 128 Bytes.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
SVN-Revision: 37709
Diffstat (limited to 'package/kernel')
-rw-r--r-- | package/kernel/mac80211/patches/860-brcmsmac-use-bcma-PCIe-up-and-down-functions.patch | 84 | ||||
-rw-r--r-- | package/kernel/mac80211/patches/861-b43-call-PCIe-up-and-down-functions.patch | 36 |
2 files changed, 120 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/860-brcmsmac-use-bcma-PCIe-up-and-down-functions.patch b/package/kernel/mac80211/patches/860-brcmsmac-use-bcma-PCIe-up-and-down-functions.patch new file mode 100644 index 0000000000..d89b9847a3 --- /dev/null +++ b/package/kernel/mac80211/patches/860-brcmsmac-use-bcma-PCIe-up-and-down-functions.patch @@ -0,0 +1,84 @@ +brcmsmac: use bcma PCIe up and down functions + +replace the calls to bcma_core_pci_extend_L1timer() by calls to the +newly introduced bcma_core_pci_ip() and bcma_core_pci_down() + +Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> + +--- a/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c ++++ b/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c +@@ -679,27 +679,6 @@ bool ai_clkctl_cc(struct si_pub *sih, en + return mode == BCMA_CLKMODE_FAST; + } + +-void ai_pci_up(struct si_pub *sih) +-{ +- struct si_info *sii; +- +- sii = container_of(sih, struct si_info, pub); +- +- if (sii->icbus->hosttype == BCMA_HOSTTYPE_PCI) +- bcma_core_pci_extend_L1timer(&sii->icbus->drv_pci[0], true); +-} +- +-/* Unconfigure and/or apply various WARs when going down */ +-void ai_pci_down(struct si_pub *sih) +-{ +- struct si_info *sii; +- +- sii = container_of(sih, struct si_info, pub); +- +- if (sii->icbus->hosttype == BCMA_HOSTTYPE_PCI) +- bcma_core_pci_extend_L1timer(&sii->icbus->drv_pci[0], false); +-} +- + /* Enable BT-COEX & Ex-PA for 4313 */ + void ai_epa_4313war(struct si_pub *sih) + { +--- a/drivers/net/wireless/brcm80211/brcmsmac/aiutils.h ++++ b/drivers/net/wireless/brcm80211/brcmsmac/aiutils.h +@@ -183,9 +183,6 @@ extern u16 ai_clkctl_fast_pwrup_delay(st + extern bool ai_clkctl_cc(struct si_pub *sih, enum bcma_clkmode mode); + extern bool ai_deviceremoved(struct si_pub *sih); + +-extern void ai_pci_down(struct si_pub *sih); +-extern void ai_pci_up(struct si_pub *sih); +- + /* Enable Ex-PA for 4313 */ + extern void ai_epa_4313war(struct si_pub *sih); + +--- a/drivers/net/wireless/brcm80211/brcmsmac/main.c ++++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c +@@ -4667,7 +4667,7 @@ static int brcms_b_attach(struct brcms_c + brcms_c_coredisable(wlc_hw); + + /* Match driver "down" state */ +- ai_pci_down(wlc_hw->sih); ++ bcma_core_pci_down(wlc_hw->d11core->bus); + + /* turn off pll and xtal to match driver "down" state */ + brcms_b_xtal(wlc_hw, OFF); +@@ -5010,12 +5010,12 @@ static int brcms_b_up_prep(struct brcms_ + */ + if (brcms_b_radio_read_hwdisabled(wlc_hw)) { + /* put SB PCI in down state again */ +- ai_pci_down(wlc_hw->sih); ++ bcma_core_pci_down(wlc_hw->d11core->bus); + brcms_b_xtal(wlc_hw, OFF); + return -ENOMEDIUM; + } + +- ai_pci_up(wlc_hw->sih); ++ bcma_core_pci_up(wlc_hw->d11core->bus); + + /* reset the d11 core */ + brcms_b_corereset(wlc_hw, BRCMS_USE_COREFLAGS); +@@ -5212,7 +5212,7 @@ static int brcms_b_down_finish(struct br + + /* turn off primary xtal and pll */ + if (!wlc_hw->noreset) { +- ai_pci_down(wlc_hw->sih); ++ bcma_core_pci_down(wlc_hw->d11core->bus); + brcms_b_xtal(wlc_hw, OFF); + } + } diff --git a/package/kernel/mac80211/patches/861-b43-call-PCIe-up-and-down-functions.patch b/package/kernel/mac80211/patches/861-b43-call-PCIe-up-and-down-functions.patch new file mode 100644 index 0000000000..f09cc3ee89 --- /dev/null +++ b/package/kernel/mac80211/patches/861-b43-call-PCIe-up-and-down-functions.patch @@ -0,0 +1,36 @@ +b43: call PCIe up and down functions + +Tell the PCIe host core when the wifi is activated. + +Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> + +--- a/drivers/net/wireless/b43/main.c ++++ b/drivers/net/wireless/b43/main.c +@@ -4670,6 +4670,19 @@ static void b43_wireless_core_exit(struc + b43_maskset32(dev, B43_MMIO_MACCTL, ~B43_MACCTL_PSM_RUN, + B43_MACCTL_PSM_JMP0); + ++ switch (dev->dev->bus_type) { ++#ifdef CPTCFG_B43_BCMA ++ case B43_BUS_BCMA: ++ bcma_core_pci_down(dev->dev->bdev->bus); ++ break; ++#endif ++#ifdef CPTCFG_B43_SSB ++ case B43_BUS_SSB: ++ /* TODO */ ++ break; ++#endif ++ } ++ + b43_dma_free(dev); + b43_pio_free(dev); + b43_chip_exit(dev); +@@ -4709,6 +4722,7 @@ static int b43_wireless_core_init(struct + case B43_BUS_BCMA: + bcma_core_pci_irq_ctl(&dev->dev->bdev->bus->drv_pci[0], + dev->dev->bdev, true); ++ bcma_core_pci_up(dev->dev->bdev->bus); + break; + #endif + #ifdef CPTCFG_B43_SSB |