mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 20:33:58 -04:00
Merge "msm: ep_pcie: Avoid setting host wake pending flag for D0"
This commit is contained in:
commit
0fc0638ba8
1 changed files with 5 additions and 2 deletions
|
|
@ -3236,8 +3236,10 @@ static int ep_pcie_core_wakeup_host_internal(enum ep_pcie_event event)
|
|||
{
|
||||
struct ep_pcie_dev_t *dev = &ep_pcie_dev;
|
||||
|
||||
if (atomic_read(&dev->host_wake_pending))
|
||||
if (atomic_read(&dev->host_wake_pending)) {
|
||||
EP_PCIE_DBG(dev, "PCIe V%d: Host wake is already pending, returning\n", dev->rev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!atomic_read(&dev->perst_deast)) {
|
||||
/*D3 cold handling*/
|
||||
|
|
@ -3249,12 +3251,14 @@ static int ep_pcie_core_wakeup_host_internal(enum ep_pcie_event event)
|
|||
*/
|
||||
dev->wake_from_d3cold = true;
|
||||
}
|
||||
atomic_set(&dev->host_wake_pending, 1);
|
||||
} else if (dev->l23_ready) {
|
||||
EP_PCIE_ERR(dev,
|
||||
"PCIe V%d: request to assert WAKE# when in D3hot\n",
|
||||
dev->rev);
|
||||
/*D3 hot handling*/
|
||||
ep_pcie_core_issue_inband_pme();
|
||||
atomic_set(&dev->host_wake_pending, 1);
|
||||
} else {
|
||||
/*D0 handling*/
|
||||
EP_PCIE_ERR(dev,
|
||||
|
|
@ -3262,7 +3266,6 @@ static int ep_pcie_core_wakeup_host_internal(enum ep_pcie_event event)
|
|||
dev->rev);
|
||||
}
|
||||
|
||||
atomic_set(&dev->host_wake_pending, 1);
|
||||
EP_PCIE_DBG(dev,
|
||||
"PCIe V%d: Set wake pending : %d and return ; perst is %s de-asserted; D3hot is %s set\n",
|
||||
dev->rev, atomic_read(&dev->host_wake_pending),
|
||||
|
|
|
|||
Loading…
Reference in a new issue