qcacld-3.0: Return EAGAIN in wlan_hdd_pld_runtime_suspend

If fw is down when runtime pm, runtime pm will return EFAULT
to kernel, so kernel will treat it as a critical error so all
future runtime PM API calls will return error, this is not what
driver expected.

Always make sure driver only return EAGAIN or EBUSY to kernel.

Change-Id: I651f75ee615af819a080e2955ac64a986620375f
CRs-Fixed: 2674531
This commit is contained in:
Jingxiang Ge
2020-04-29 14:00:13 +08:00
committed by nshrivas
parent d22127914e
commit 83b1033055

View File

@@ -1781,12 +1781,20 @@ static int wlan_hdd_pld_runtime_suspend(struct device *dev,
errno = osif_psoc_sync_op_start(dev, &psoc_sync);
if (errno)
return errno;
goto out;
errno = wlan_hdd_runtime_suspend(dev);
osif_psoc_sync_op_stop(psoc_sync);
out:
/* If it returns other errno to kernel, it will treat
* it as critical issue, so all the future runtime
* PM api will return error, pm runtime can't be work
* anymore. Such case found in SSR.
*/
if (errno && errno != -EAGAIN && errno != -EBUSY)
errno = -EAGAIN;
return errno;
}