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

Commit dc73a604 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge changes Ic45c42c4,If093f432,I769d848e into msm-4.14

* changes:
  icnss: Remove vote for hardware resources when FW is not down
  icnss: Allow recursive recovery for WLAN
  icnss: Remove sending uevent after FW ready
parents c1a29116 26163bd5
Loading
Loading
Loading
Loading
+19 −4
Original line number Diff line number Diff line
@@ -550,6 +550,9 @@ static int icnss_hw_power_off(struct icnss_priv *priv)
	if (test_bit(HW_ALWAYS_ON, &quirks))
		return 0;

	if (test_bit(ICNSS_FW_DOWN, &priv->state))
		return 0;

	icnss_pr_dbg("HW Power off: 0x%lx\n", priv->state);

	spin_lock(&priv->on_off_lock);
@@ -842,6 +845,7 @@ static int icnss_pd_restart_complete(struct icnss_priv *priv)
	if (ret < 0) {
		icnss_pr_err("Driver reinit failed: %d, state: 0x%lx\n",
			     ret, priv->state);
		if (!priv->allow_recursive_recovery)
			ICNSS_ASSERT(false);
		goto out_power_off;
	}
@@ -869,8 +873,6 @@ static int icnss_driver_event_fw_ready_ind(void *data)

	set_bit(ICNSS_FW_READY, &penv->state);

	icnss_call_driver_uevent(penv, ICNSS_UEVENT_FW_READY, NULL);

	icnss_pr_info("WLAN FW is ready: 0x%lx\n", penv->state);

	icnss_hw_power_off(penv);
@@ -994,6 +996,7 @@ static int icnss_driver_event_pd_service_down(struct icnss_priv *priv,
	if (test_bit(ICNSS_PD_RESTART, &priv->state) && event_data->crashed) {
		icnss_pr_err("PD Down while recovery inprogress, crashed: %d, state: 0x%lx\n",
			     event_data->crashed, priv->state);
		if (!priv->allow_recursive_recovery)
			ICNSS_ASSERT(0);
		goto out;
	}
@@ -2207,6 +2210,15 @@ static int icnss_test_mode_fw_test(struct icnss_priv *priv,
	return ret;
}

static void icnss_allow_recursive_recovery(struct device *dev)
{
	struct icnss_priv *priv = dev_get_drvdata(dev);

	priv->allow_recursive_recovery = true;

	icnss_pr_info("Recursive recovery allowed for WLAN\n");
}

static ssize_t icnss_fw_debug_write(struct file *fp,
				    const char __user *user_buf,
				    size_t count, loff_t *off)
@@ -2255,6 +2267,9 @@ static ssize_t icnss_fw_debug_write(struct file *fp,
		case 3:
			ret = icnss_trigger_recovery(&priv->pdev->dev);
			break;
		case 4:
			icnss_allow_recursive_recovery(&priv->pdev->dev);
			break;
		default:
			return -EINVAL;
		}
+1 −0
Original line number Diff line number Diff line
@@ -334,6 +334,7 @@ struct icnss_priv {
	struct ramdump_device *msa0_dump_dev;
	bool bypass_s1_smmu;
	bool force_err_fatal;
	bool allow_recursive_recovery;
	u8 cause_for_rejuvenation;
	u8 requesting_sub_system;
	u16 line_number;
+0 −1
Original line number Diff line number Diff line
@@ -23,7 +23,6 @@
#endif

enum icnss_uevent {
	ICNSS_UEVENT_FW_READY,
	ICNSS_UEVENT_FW_CRASHED,
	ICNSS_UEVENT_FW_DOWN,
};