346-brcmfmac-avoid-runtime-pm-for-sdio-host-controller.patch 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. From: Arend van Spriel <[email protected]>
  2. Date: Wed, 18 Mar 2015 13:25:21 +0100
  3. Subject: [PATCH] brcmfmac: avoid runtime-pm for sdio host controller
  4. Several host controllers supporting runtime-pm are causing issues
  5. with our sdio wireless cards because they disable the sdio interrupt
  6. upon going into runtime suspend. This patch avoids that by doing
  7. a pm_runtime_forbid() call during the probe. Tested with Sony Vaio
  8. Duo 13 which uses sdhci-acpi host controller.
  9. Reviewed-by: Hante Meuleman <[email protected]>
  10. Reviewed-by: Franky (Zhenhui) Lin <[email protected]>
  11. Reviewed-by: Pieter-Paul Giesberts <[email protected]>
  12. Signed-off-by: Arend van Spriel <[email protected]>
  13. Signed-off-by: Kalle Valo <[email protected]>
  14. ---
  15. --- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
  16. +++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
  17. @@ -29,6 +29,7 @@
  18. #include <linux/mmc/host.h>
  19. #include <linux/platform_device.h>
  20. #include <linux/platform_data/brcmfmac-sdio.h>
  21. +#include <linux/pm_runtime.h>
  22. #include <linux/suspend.h>
  23. #include <linux/errno.h>
  24. #include <linux/module.h>
  25. @@ -1006,6 +1007,7 @@ static int brcmf_sdiod_remove(struct brc
  26. sg_free_table(&sdiodev->sgtable);
  27. sdiodev->sbwad = 0;
  28. + pm_runtime_allow(sdiodev->func[1]->card->host->parent);
  29. return 0;
  30. }
  31. @@ -1074,7 +1076,7 @@ static int brcmf_sdiod_probe(struct brcm
  32. ret = -ENODEV;
  33. goto out;
  34. }
  35. -
  36. + pm_runtime_forbid(host->parent);
  37. out:
  38. if (ret)
  39. brcmf_sdiod_remove(sdiodev);