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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1523505239-16229-12-git-send-email-j-keerthy@ti.com>
Date:   Thu, 12 Apr 2018 09:23:56 +0530
From:   Keerthy <j-keerthy@...com>
To:     <linus.walleij@...aro.org>, <grygorii.strashko@...com>,
        <tony@...mide.com>
CC:     <j-keerthy@...com>, <t-kristo@...com>, <Russ.Dill@...com>,
        <linux-omap@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <ssantosh@...nel.org>, <haojian.zhuang@...aro.org>,
        <linux-arm-kernel@...ts.infradead.org>, <d-gerlach@...com>
Subject: [PATCH 11/14] gpio: omap: Restore power_mode configuration at resume time

From: Dave Gerlach <d-gerlach@...com>

Commit 2dc983c565e0 ("gpio/omap: cleanup prepare_for_idle and
resume_after_idle") introduces omap2_gpio_prepare_for_idle and
omap2_gpio_resume_after_idle to properly configure gpios that are used
as wake sources. When entering off mode, omap2_gpio_prepare_for_idle
can set a flag indicating off-mode entry is desired, however once this
flag is set it is never cleared, so any additional calls to this
function, regardless of the mode, have this flag set.

This patch restores the pwr_mode flag to 0 in
omap2_gpio_resume_after_idle to ensure the flag is not misconfigured
during non off-mode operation.

Signed-off-by: Dave Gerlach <d-gerlach@...com>
Signed-off-by: Keerthy <j-keerthy@...com>
---
 drivers/gpio/gpio-omap.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index 34fde30..84d664b 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -1476,6 +1476,8 @@ void omap2_gpio_resume_after_idle(void)
 			continue;
 
 		pm_runtime_get_sync(bank->chip.parent);
+
+		bank->power_mode = 0;
 	}
 }
 #endif
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ