351-0028-brcmfmac-defer-DPC-processing-during-probe.patch 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. From fd3ed33f51c2a586412d35b4f64803f019ab589f Mon Sep 17 00:00:00 2001
  2. From: Arend Van Spriel <arend.vanspriel@broadcom.com>
  3. Date: Fri, 15 Jul 2016 12:39:13 +0200
  4. Subject: [PATCH] brcmfmac: defer DPC processing during probe
  5. The sdio dpc starts processing when in SDIOD_STATE_DATA. This state was
  6. entered right after firmware download. This patch moves that transition
  7. just before enabling sdio interrupt handling thus avoiding watchdog
  8. expiry which would put the bus to sleep while probing.
  9. Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
  10. Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
  11. Reviewed-by: Franky Lin <franky.lin@broadcom.com>
  12. Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
  13. Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
  14. ---
  15. drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 7 +++----
  16. 1 file changed, 3 insertions(+), 4 deletions(-)
  17. --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
  18. +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
  19. @@ -3304,10 +3304,6 @@ static int brcmf_sdio_download_firmware(
  20. goto err;
  21. }
  22. - /* Allow full data communication using DPC from now on. */
  23. - brcmf_sdiod_change_state(bus->sdiodev, BRCMF_SDIOD_DATA);
  24. - bcmerror = 0;
  25. -
  26. err:
  27. brcmf_sdio_clkctl(bus, CLK_SDONLY, false);
  28. sdio_release_host(bus->sdiodev->func[1]);
  29. @@ -4045,6 +4041,9 @@ static void brcmf_sdio_firmware_callback
  30. }
  31. if (err == 0) {
  32. + /* Allow full data communication using DPC from now on. */
  33. + brcmf_sdiod_change_state(bus->sdiodev, BRCMF_SDIOD_DATA);
  34. +
  35. err = brcmf_sdiod_intr_register(sdiodev);
  36. if (err != 0)
  37. brcmf_err("intr register failed:%d\n", err);