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

Commit a0a5aeff authored by Avaneesh Kumar Dwivedi's avatar Avaneesh Kumar Dwivedi
Browse files

qcom: subsystem_restart: Ignore SSR requests during system reboot/shutdown



When a system reboot or shutdown is already underway, ignore SSR errors
so that the system reboot/shutdown process is uninterrupted. However, log
the SSR request so that we know that the subsystem behaved unexpectedly.

Change-Id: Ibfac397bf38749b095dacab4cadf7b77bd003e88
Signed-off-by: default avatarAvaneesh Kumar Dwivedi <akdwived@codeaurora.org>
parent 1a970af7
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
/* Copyright (c) 2011-2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2011-2016, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -890,6 +890,18 @@ static void subsystem_restart_wq_func(struct work_struct *work)
		track = &dev->track;
	}

	/*
	 * If a system reboot/shutdown is under way, ignore subsystem errors.
	 * However, print a message so that we know that a subsystem behaved
	 * unexpectedly here.
	 */
	if (system_state == SYSTEM_RESTART
		|| system_state == SYSTEM_POWER_OFF) {
		WARN(1, "SSR aborted: %s, system reboot/shutdown is under way\n",
			desc->name);
		return;
	}

	mutex_lock(&track->lock);
	do_epoch_check(dev);