lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 02 Jun 2015 16:48:50 +0200
From:	Heiko Stübner <heiko@...ech.de>
To:	Sebastian Reichel <sre@...nel.org>,
	Dmitry Eremin-Solenikov <dbaryshkov@...il.com>,
	David Woodhouse <dwmw2@...radead.org>,
	Guenter Roeck <linux@...ck-us.net>
Cc:	linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] power: reset: gpio-restart: increase priority slightly

gpio-restart uses a priority of 128 and currently most soc-level restart
mechanisms use the same - with some exceptions even using 192.
But while the soc-level restarts are provided by the soc itself,
gpio-restarts will most of the time be board-specfic and be used
when some special board condition makes the soc-level restart
only a second choice.

The problem at hand manifested itself on the rk3288-veyron devices.
While the soc-level restart can sucessfully restart all other rockchip
boards I have, the veyron devices use an external restart mechanism that
seems to not only reset the soc but also some external needed components.

With both restart handlers having priority 128 in my tests the soc-specific
variant took precedent in all cases. While it could restart the soc
sucessfully in all cases, firmware then got an issue when talking to an
external component, resulting in the device being put into recovery mode.

So, give the board-specific restart handler a slight push and move it
to priority 129 to make it more important than the generic soc-specific
restart-handler.

Signed-off-by: Heiko Stuebner <heiko@...ech.de>
---
 drivers/power/reset/gpio-restart.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/reset/gpio-restart.c b/drivers/power/reset/gpio-restart.c
index edb327e..829b45f 100644
--- a/drivers/power/reset/gpio-restart.c
+++ b/drivers/power/reset/gpio-restart.c
@@ -78,7 +78,7 @@ static int gpio_restart_probe(struct platform_device *pdev)
 	}
 
 	gpio_restart->restart_handler.notifier_call = gpio_restart_notify;
-	gpio_restart->restart_handler.priority = 128;
+	gpio_restart->restart_handler.priority = 129;
 	gpio_restart->active_delay_ms = 100;
 	gpio_restart->inactive_delay_ms = 100;
 	gpio_restart->wait_delay_ms = 3000;
-- 
2.1.4


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ