diff options
| author | Sundar Subramaniyan <subrams@qti.qualcomm.com> | 2014-01-05 03:43:32 -0800 |
|---|---|---|
| committer | Prakash Dhavali <pdhavali@codeaurora.org> | 2014-01-18 02:43:13 -0800 |
| commit | 893a3ec6f9b5ba8bf12e214181bba0d06350b7a4 (patch) | |
| tree | 416d89c81915e4a5f7d76e9f38343415fcb06057 | |
| parent | 7d4b10cb1a10df076449ab1b4a0b2456783a1cf4 (diff) | |
qcacld: Disable asynchronous suspend capability during pci probe
When WLAN driver refuses to suspend, the PCIe bus driver should not
suspend as the WLAN driver might access target address space or the
target might be accessing APSS DDR. If the bus driver still suspends
when the endpoint is accessing target space over the momentarily
broken PCIe link it could cause L2 errors in host or AXI bus error
in target. Also, due to this incorrect suspend sequence, after
the ongoing suspend process is unwinded by PM, any target register
access becomes invalid as target returns unsupported request (-1)
after D3 handshake is completed by now.
Here the target may refuse to suspend for multiple reasons including
but not limited to host DDR access by not sending the HTC endpoint
acknowledgement for the SUSPEND_TARGET or WOW_ENABLE WMI commands.
The issue is that asynchronous suspend capability flag is getting set
by default when pci device is probed. If this flag is set runtime PM
will schedule the device suspend function to asynchronously run
independent of parent device. If the flag is not set, runtime PM
will do suspend in order one by one and maintains any parent-child
relationship.
To fix this, disable the asynchronous suspend during pci probe,
so that the runtime PM perform suspend of PCI endpoint and PCI
bus drivers serially and if endpoint fails to suspend the return
value is checked immediately and aborts the suspend and starts
recovering the suspended devices.
Change-Id: Ia88448094209048c4bb52af30c3404e53de5a2a1
CRs-Fixed: 594454
| -rw-r--r-- | CORE/SERVICES/HIF/PCIe/if_pci.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/CORE/SERVICES/HIF/PCIe/if_pci.c b/CORE/SERVICES/HIF/PCIe/if_pci.c index b5d3523073a1..f2cc9621d642 100644 --- a/CORE/SERVICES/HIF/PCIe/if_pci.c +++ b/CORE/SERVICES/HIF/PCIe/if_pci.c @@ -467,6 +467,10 @@ again: ret = -EIO; goto err_iomap; } + + /* Disable asynchronous suspend */ + device_disable_async_suspend(&pdev->dev); + sc = A_MALLOC(sizeof(*sc)); if (!sc) { ret = -ENOMEM; |
