325-brcmfmac-sdio-Increase-the-default-timeouts-a-bit.patch 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. From: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
  2. Date: Mon, 25 Jan 2016 11:47:29 +0100
  3. Subject: [PATCH] brcmfmac: sdio: Increase the default timeouts a bit
  4. On a Radxa Rock2 board with a Ampak AP6335 (Broadcom 4339 core) it seems
  5. the card responds very quickly most of the time, unfortunately during
  6. initialisation it sometimes seems to take just a bit over 2 seconds to
  7. respond.
  8. This results intialization failing with message like:
  9. brcmf_c_preinit_dcmds: Retreiving cur_etheraddr failed, -52
  10. brcmf_bus_start: failed: -52
  11. brcmf_sdio_firmware_callback: dongle is not responding
  12. Increasing the timeout to allow for a bit more headroom allows the
  13. card to initialize reliably.
  14. A quick search online after diagnosing/fixing this showed that Google
  15. has a similar patch in their ChromeOS tree, so this doesn't seem
  16. specific to the board I'm using.
  17. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
  18. Reviewed-by: Julian Calaby <julian.calaby@gmail.com>
  19. Acked-by: Arend van Spriel <arend@broadcom.com>
  20. Reviewed-by: Douglas Anderson <dianders@chromium.org>
  21. Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
  22. ---
  23. --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
  24. +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
  25. @@ -45,8 +45,8 @@
  26. #include "chip.h"
  27. #include "firmware.h"
  28. -#define DCMD_RESP_TIMEOUT msecs_to_jiffies(2000)
  29. -#define CTL_DONE_TIMEOUT msecs_to_jiffies(2000)
  30. +#define DCMD_RESP_TIMEOUT msecs_to_jiffies(2500)
  31. +#define CTL_DONE_TIMEOUT msecs_to_jiffies(2500)
  32. #ifdef DEBUG