mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 12:58:12 -04:00
Merge "icnss: Add ASSERT if fw ready got timed out"
This commit is contained in:
commit
ffd8017cb2
2 changed files with 24 additions and 0 deletions
|
|
@ -82,6 +82,8 @@ module_param(qmi_timeout, ulong, 0600);
|
|||
#define WLFW_TIMEOUT msecs_to_jiffies(3000)
|
||||
#endif
|
||||
|
||||
#define ICNSS_RECOVERY_TIMEOUT 60000
|
||||
|
||||
static struct icnss_priv *penv;
|
||||
static struct work_struct wpss_loader;
|
||||
uint64_t dynamic_feature_mask = ICNSS_DEFAULT_FEATURE_MASK;
|
||||
|
|
@ -869,6 +871,9 @@ static int icnss_driver_event_fw_ready_ind(struct icnss_priv *priv, void *data)
|
|||
if (!priv)
|
||||
return -ENODEV;
|
||||
|
||||
if (priv->device_id == ADRASTEA_DEVICE_ID)
|
||||
del_timer(&priv->recovery_timer);
|
||||
|
||||
set_bit(ICNSS_FW_READY, &priv->state);
|
||||
clear_bit(ICNSS_MODE_ON, &priv->state);
|
||||
atomic_set(&priv->soc_wake_ref_count, 0);
|
||||
|
|
@ -1854,6 +1859,9 @@ static int icnss_modem_notifier_nb(struct notifier_block *nb,
|
|||
}
|
||||
icnss_driver_event_post(priv, ICNSS_DRIVER_EVENT_PD_SERVICE_DOWN,
|
||||
ICNSS_EVENT_SYNC, event_data);
|
||||
|
||||
mod_timer(&priv->recovery_timer,
|
||||
jiffies + msecs_to_jiffies(ICNSS_RECOVERY_TIMEOUT));
|
||||
out:
|
||||
icnss_pr_vdbg("Exit %s,state: 0x%lx\n", __func__, priv->state);
|
||||
return NOTIFY_OK;
|
||||
|
|
@ -2022,6 +2030,9 @@ event_post:
|
|||
clear_bit(ICNSS_HOST_TRIGGERED_PDR, &priv->state);
|
||||
icnss_driver_event_post(priv, ICNSS_DRIVER_EVENT_PD_SERVICE_DOWN,
|
||||
ICNSS_EVENT_SYNC, event_data);
|
||||
|
||||
mod_timer(&priv->recovery_timer,
|
||||
jiffies + msecs_to_jiffies(ICNSS_RECOVERY_TIMEOUT));
|
||||
done:
|
||||
if (notification == SERVREG_NOTIF_SERVICE_STATE_UP_V01)
|
||||
clear_bit(ICNSS_FW_DOWN, &priv->state);
|
||||
|
|
@ -4107,6 +4118,9 @@ static int icnss_probe(struct platform_device *pdev)
|
|||
#ifdef CONFIG_ICNSS2_RESTART_LEVEL_NOTIF
|
||||
register_trace_pil_restart_level(pil_restart_level_notifier, NULL);
|
||||
#endif
|
||||
} else {
|
||||
timer_setup(&priv->recovery_timer,
|
||||
icnss_recovery_timeout_hdlr, 0);
|
||||
}
|
||||
|
||||
INIT_LIST_HEAD(&priv->icnss_tcdev_list);
|
||||
|
|
@ -4183,6 +4197,13 @@ static int icnss_remove(struct platform_device *pdev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void icnss_recovery_timeout_hdlr(struct timer_list *t)
|
||||
{
|
||||
struct icnss_priv *priv = from_timer(priv, t, recovery_timer);
|
||||
|
||||
icnss_pr_err("Timeout waiting for FW Ready 0x%lx\n", priv->state);
|
||||
ICNSS_ASSERT(0);
|
||||
}
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int icnss_pm_suspend(struct device *dev)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
#include <soc/qcom/service-locator.h>
|
||||
#include <soc/qcom/service-notifier.h>
|
||||
#include "wlan_firmware_service_v01.h"
|
||||
#include <linux/timer.h>
|
||||
|
||||
#define WCN6750_DEVICE_ID 0x6750
|
||||
#define ADRASTEA_DEVICE_ID 0xabcd
|
||||
|
|
@ -466,6 +467,7 @@ struct icnss_priv {
|
|||
u8 use_nv_mac;
|
||||
u32 wlan_en_delay_ms;
|
||||
unsigned long device_config;
|
||||
struct timer_list recovery_timer;
|
||||
};
|
||||
|
||||
struct icnss_reg_info {
|
||||
|
|
@ -493,5 +495,6 @@ int icnss_get_cpr_info(struct icnss_priv *priv);
|
|||
int icnss_update_cpr_info(struct icnss_priv *priv);
|
||||
void icnss_add_fw_prefix_name(struct icnss_priv *priv, char *prefix_name,
|
||||
char *name);
|
||||
void icnss_recovery_timeout_hdlr(struct timer_list *t);
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue