319-v4.12-0023-brcmfmac-restore-bus-state-when-enter_D3-fails.patch 1.2 KB

1234567891011121314151617181920212223242526272829
  1. From 49fe9b59f0e9b750f173fbe44637c436ba1030d2 Mon Sep 17 00:00:00 2001
  2. From: Arend Van Spriel <arend.vanspriel@broadcom.com>
  3. Date: Tue, 28 Mar 2017 11:43:27 +0100
  4. Subject: [PATCH] brcmfmac: restore bus state when enter_D3 fails
  5. In brcmf_pcie_suspend() we inform the firmware on the device that
  6. it will enter in D3 state. Before this is done we already bring down
  7. the bus state. However, When entering D3 fails we abort the suspend
  8. and the bus state need to be restored.
  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/pcie.c | 1 +
  16. 1 file changed, 1 insertion(+)
  17. --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
  18. +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
  19. @@ -1877,6 +1877,7 @@ static int brcmf_pcie_pm_enter_D3(struct
  20. BRCMF_PCIE_MBDATA_TIMEOUT);
  21. if (!devinfo->mbdata_completed) {
  22. brcmf_err("Timeout on response for entering D3 substate\n");
  23. + brcmf_bus_change_state(bus, BRCMF_BUS_UP);
  24. return -EIO;
  25. }