cnss2: Prevent PCIE l1 substatus at MHI fast resume

Prevent PCIE L1 substates while MHI fast resume to make
device not to enter any low power substates and allow l1
once mhi fast resume is completed.

Change-Id: Id92af704ce6f38ce13df25ef8be5d9c67b4b588a
Signed-off-by: Vivek Pernamitta <vpernami@codeaurora.org>
This commit is contained in:
Vivek Pernamitta 2020-12-23 12:00:10 +05:30
commit f1bdd75085

View file

@ -1381,10 +1381,13 @@ static int cnss_pci_set_mhi_state(struct cnss_pci_data *pci_priv,
break;
case CNSS_MHI_RESUME:
mutex_lock(&pci_priv->mhi_ctrl->pm_mutex);
if (pci_priv->drv_connected_last)
if (pci_priv->drv_connected_last) {
cnss_pci_prevent_l1(&pci_priv->pci_dev->dev);
ret = mhi_pm_fast_resume(pci_priv->mhi_ctrl, true);
else
cnss_pci_allow_l1(&pci_priv->pci_dev->dev);
} else {
ret = mhi_pm_resume(pci_priv->mhi_ctrl);
}
mutex_unlock(&pci_priv->mhi_ctrl->pm_mutex);
break;
case CNSS_MHI_TRIGGER_RDDM: