Merge "msm: ep_pcie: Avoid setting host wake pending flag for D0"

This commit is contained in:
QCTECMDR Service
2024-08-27 00:24:32 -07:00
committed by Gerrit - the friendly Code Review server

View File

@@ -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),