mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 00:24:41 -04:00
cnss2: Handle -ETIMEDOUT properly for MHI power on failure
If MHI power on returns -ETIMEDOUT, controller needs to take care the cleanup by calling MHI power down. Force to set the power on bit for driver internal MHI state to make sure it can be handled properly later. Change-Id: Icdeb3fc10a18cf643710240aa4984af61c8b5195 Signed-off-by: Yue Ma <yuem@codeaurora.org>
This commit is contained in:
parent
7141e265d8
commit
c690a7dbd6
1 changed files with 9 additions and 4 deletions
|
|
@ -1530,11 +1530,16 @@ int cnss_pci_start_mhi(struct cnss_pci_data *pci_priv)
|
|||
|
||||
pci_priv->mhi_ctrl->timeout_ms = timeout;
|
||||
|
||||
/* -ETIMEDOUT means MHI power on has succeeded but timed out
|
||||
* for firmware mission mode event, so handle it properly.
|
||||
*/
|
||||
if (ret == -ETIMEDOUT)
|
||||
if (ret == -ETIMEDOUT) {
|
||||
/* This is a special case needs to be handled that if MHI
|
||||
* power on returns -ETIMEDOUT, controller needs to take care
|
||||
* the cleanup by calling MHI power down. Force to set the bit
|
||||
* for driver internal MHI state to make sure it can be handled
|
||||
* properly later.
|
||||
*/
|
||||
set_bit(CNSS_MHI_POWER_ON, &pci_priv->mhi_state);
|
||||
ret = cnss_pci_handle_mhi_poweron_timeout(pci_priv);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue