Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9995ffe5 authored by Wey-Yi Guy's avatar Wey-Yi Guy Committed by John W. Linville
Browse files

iwlwifi: change the default behavior of watchdog timer



The current default watchdog timer is enabled, but we are seeing issues on
legacy devices. So change the default setting of watchdog timer to per
device based. But user still can use the "wd_disable" module parameter
to overwrite the system setting

Cc: stable@vger.kernel.org #3.0+
Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 34a5b4b6
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -191,6 +191,7 @@ static struct iwl_base_params iwl1000_base_params = {
	.chain_noise_scale = 1000,
	.wd_timeout = IWL_DEF_WD_TIMEOUT,
	.max_event_log_size = 128,
	.wd_disable = true,
};
static struct iwl_ht_params iwl1000_ht_params = {
	.ht_greenfield_support = true,
+1 −0
Original line number Diff line number Diff line
@@ -364,6 +364,7 @@ static struct iwl_base_params iwl5000_base_params = {
	.wd_timeout = IWL_LONG_WD_TIMEOUT,
	.max_event_log_size = 512,
	.no_idle_support = true,
	.wd_disable = true,
};
static struct iwl_ht_params iwl5000_ht_params = {
	.ht_greenfield_support = true,
+3 −2
Original line number Diff line number Diff line
@@ -3498,9 +3498,10 @@ MODULE_PARM_DESC(plcp_check, "Check plcp health (default: 1 [enabled])");
module_param_named(ack_check, iwlagn_mod_params.ack_check, bool, S_IRUGO);
MODULE_PARM_DESC(ack_check, "Check ack health (default: 0 [disabled])");

module_param_named(wd_disable, iwlagn_mod_params.wd_disable, bool, S_IRUGO);
module_param_named(wd_disable, iwlagn_mod_params.wd_disable, int, S_IRUGO);
MODULE_PARM_DESC(wd_disable,
		"Disable stuck queue watchdog timer (default: 0 [enabled])");
		"Disable stuck queue watchdog timer 0=system default, "
		"1=disable, 2=enable (default: 0)");

/*
 * set bt_coex_active to true, uCode will do kill/defer
+17 −5
Original line number Diff line number Diff line
@@ -1810,11 +1810,23 @@ void iwl_setup_watchdog(struct iwl_priv *priv)
{
	unsigned int timeout = priv->cfg->base_params->wd_timeout;

	if (timeout && !iwlagn_mod_params.wd_disable)
	if (!iwlagn_mod_params.wd_disable) {
		/* use system default */
		if (timeout && !priv->cfg->base_params->wd_disable)
			mod_timer(&priv->watchdog,
			  jiffies + msecs_to_jiffies(IWL_WD_TICK(timeout)));
				jiffies +
				msecs_to_jiffies(IWL_WD_TICK(timeout)));
		else
			del_timer(&priv->watchdog);
	} else {
		/* module parameter overwrite default configuration */
		if (timeout && iwlagn_mod_params.wd_disable == 2)
			mod_timer(&priv->watchdog,
				jiffies +
				msecs_to_jiffies(IWL_WD_TICK(timeout)));
		else
			del_timer(&priv->watchdog);
	}
}

/**
+2 −0
Original line number Diff line number Diff line
@@ -113,6 +113,7 @@ struct iwl_lib_ops {
 * @shadow_reg_enable: HW shadhow register bit
 * @no_idle_support: do not support idle mode
 * @hd_v2: v2 of enhanced sensitivity value, used for 2000 series and up
 * wd_disable: disable watchdog timer
 */
struct iwl_base_params {
	int eeprom_size;
@@ -134,6 +135,7 @@ struct iwl_base_params {
	const bool shadow_reg_enable;
	const bool no_idle_support;
	const bool hd_v2;
	const bool wd_disable;
};
/*
 * @advanced_bt_coexist: support advanced bt coexist
Loading