mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 05:39:54 -04:00
Merge "cnss2: Add code to handle idle-restart failure gracefully"
This commit is contained in:
commit
da53fdd298
3 changed files with 12 additions and 0 deletions
|
|
@ -761,6 +761,14 @@ int cnss_idle_restart(struct device *dev)
|
|||
timeout = cnss_get_timeout(plat_priv, CNSS_TIMEOUT_IDLE_RESTART);
|
||||
ret = wait_for_completion_timeout(&plat_priv->power_up_complete,
|
||||
msecs_to_jiffies(timeout));
|
||||
if (plat_priv->power_up_error) {
|
||||
ret = plat_priv->power_up_error;
|
||||
clear_bit(CNSS_DRIVER_IDLE_RESTART, &plat_priv->driver_state);
|
||||
cnss_pr_dbg("Power up error:%d, exiting\n",
|
||||
plat_priv->power_up_error);
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (!ret) {
|
||||
/* This exception occurs after attempting retry of FW recovery.
|
||||
* Thus we can safely power off the device.
|
||||
|
|
|
|||
|
|
@ -479,6 +479,7 @@ struct cnss_plat_data {
|
|||
bool fw_pcie_gen_switch;
|
||||
u8 pcie_gen_speed;
|
||||
struct cnss_dms_data dms;
|
||||
int power_up_error;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_ARCH_QCOM
|
||||
|
|
|
|||
|
|
@ -1825,6 +1825,8 @@ int cnss_pci_call_driver_probe(struct cnss_pci_data *pci_priv)
|
|||
if (ret) {
|
||||
cnss_pr_err("Failed to idle restart host driver, err = %d\n",
|
||||
ret);
|
||||
plat_priv->power_up_error = ret;
|
||||
complete_all(&plat_priv->power_up_complete);
|
||||
goto out;
|
||||
}
|
||||
clear_bit(CNSS_DRIVER_IDLE_RESTART, &plat_priv->driver_state);
|
||||
|
|
@ -2147,6 +2149,7 @@ static int cnss_qca6290_powerup(struct cnss_pci_data *pci_priv)
|
|||
/* Clear QMI send usage count during every power up */
|
||||
pci_priv->qmi_send_usage_count = 0;
|
||||
|
||||
plat_priv->power_up_error = 0;
|
||||
retry:
|
||||
ret = cnss_power_on_device(plat_priv);
|
||||
if (ret) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue