Skip to content

Commit

Permalink
cnss2: Set PCIe link state in proper state during resume
Browse files Browse the repository at this point in the history
pci_link_state is meant to track if CNSS driver suspends/resumes
PCIe link by calling PCIe bus suspend/resume APIs. Hence set it
in proper state during resume path to reflect accurate state change.

Change-Id: I638357e8a48d52796ac604dcea734056eb03ee54
Signed-off-by: Yue Ma <yuem@codeaurora.org>
  • Loading branch information
Yue Ma authored and acuicultor committed May 1, 2021
1 parent 684044b commit d5899da
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/wireless/cnss2/pci.c
Expand Up @@ -2425,6 +2425,8 @@ int cnss_pci_resume_bus(struct cnss_pci_data *pci_priv)
goto out;
}

pci_priv->pci_link_state = PCI_LINK_UP;

if (pci_priv->drv_connected_last)
goto skip_enable_pci;

Expand All @@ -2442,7 +2444,6 @@ int cnss_pci_resume_bus(struct cnss_pci_data *pci_priv)

skip_enable_pci:
cnss_pci_set_mhi_state(pci_priv, CNSS_MHI_RESUME);
pci_priv->pci_link_state = PCI_LINK_UP;
out:
return ret;
}
Expand Down

0 comments on commit d5899da

Please sign in to comment.