ath10k: remove support for the obsolete STA firmware
[openwrt/openwrt.git] / package / kernel / mac80211 / patches / 387-brcmfmac-remove-watchdog-reset-from-brcmf_pcie_busco.patch
1 From: Arend van Spriel <arend@broadcom.com>
2 Date: Mon, 8 Jun 2015 14:38:34 +0200
3 Subject: [PATCH] brcmfmac: remove watchdog reset from
4 brcmf_pcie_buscoreprep()
5
6 The watchdog reset as done in brcmf_pcie_buscoreprep() is not
7 sufficient. It needs to modify PCIe core registers as well
8 which is properly done by brcmf_pcie_reset_device() after the
9 chip recognition is done. So the faulty watchdog reset can be
10 removed as it was causing driver reload to fail and hang the
11 system requiring a power-cycle. Instead the call to to the
12 brcmf_pcie_reset_device() function is done twice in the unload.
13
14 Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
15 Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
16 Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
17 Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
18 Signed-off-by: Arend van Spriel <arend@broadcom.com>
19 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
20 ---
21
22 --- a/drivers/net/wireless/brcm80211/brcmfmac/pcie.c
23 +++ b/drivers/net/wireless/brcm80211/brcmfmac/pcie.c
24 @@ -1629,20 +1629,7 @@ static void brcmf_pcie_buscore_write32(v
25
26 static int brcmf_pcie_buscoreprep(void *ctx)
27 {
28 - struct brcmf_pciedev_info *devinfo = (struct brcmf_pciedev_info *)ctx;
29 - int err;
30 -
31 - err = brcmf_pcie_get_resource(devinfo);
32 - if (err == 0) {
33 - /* Set CC watchdog to reset all the cores on the chip to bring
34 - * back dongle to a sane state.
35 - */
36 - brcmf_pcie_buscore_write32(ctx, CORE_CC_REG(SI_ENUM_BASE,
37 - watchdog), 4);
38 - msleep(100);
39 - }
40 -
41 - return err;
42 + return brcmf_pcie_get_resource(ctx);
43 }
44
45
46 @@ -1824,6 +1811,7 @@ brcmf_pcie_remove(struct pci_dev *pdev)
47 brcmf_pcie_intr_disable(devinfo);
48
49 brcmf_detach(&pdev->dev);
50 + brcmf_pcie_reset_device(devinfo);
51
52 kfree(bus->bus_priv.pcie);
53 kfree(bus->msgbuf->flowrings);