void modem_power_on_do_work(struct work_struct *work)
{
	reset_print_debug("\n");
	if (1 == g_modem_reset_ctrl.in_suspend_state)
	{
		if (!wait_for_completion_timeout(&(g_modem_reset_ctrl.suspend_completion), HZ*10))
		{
			machine_restart("system halt");
			return;
		}
	}
	reset_prepare(MODEM_POWER_ON);
}
void modem_reset_do_work(struct work_struct *work)
{
	reset_print_debug("\n");
	g_modem_reset_ctrl.exec_time = bsp_get_slice_value();
	if (1 == g_modem_reset_ctrl.in_suspend_state)
	{
		if (!wait_for_completion_timeout(&(g_modem_reset_ctrl.suspend_completion), HZ*10))
		{
			machine_restart("system halt"); /* 调systemError */
			return;
		}
	}
	reset_prepare(MODEM_RESET);
}
Esempio n. 3
0
static int igt_atomic_reset(void *arg)
{
	struct drm_i915_private *i915 = arg;
	const typeof(*igt_atomic_phases) *p;
	int err = 0;

	/* Check that the resets are usable from atomic context */

	igt_global_reset_lock(i915);
	mutex_lock(&i915->drm.struct_mutex);

	/* Flush any requests before we get started and check basics */
	if (!igt_force_reset(i915))
		goto unlock;

	for (p = igt_atomic_phases; p->name; p++) {
		GEM_TRACE("intel_gpu_reset under %s\n", p->name);

		p->critical_section_begin();
		reset_prepare(i915);
		err = intel_gpu_reset(i915, ALL_ENGINES);
		reset_finish(i915);
		p->critical_section_end();

		if (err) {
			pr_err("intel_gpu_reset failed under %s\n", p->name);
			break;
		}
	}

	/* As we poke around the guts, do a full reset before continuing. */
	igt_force_reset(i915);

unlock:
	mutex_unlock(&i915->drm.struct_mutex);
	igt_global_reset_unlock(i915);

	return err;
}