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: <570BAEFD.2050406@ti.com>
Date:	Mon, 11 Apr 2016 17:04:45 +0300
From:	Roger Quadros <rogerq@...com>
To:	<myungjoo.ham@...sung.com>, <cw00.choi@...sung.com>
CC:	<linux-kernel@...r.kernel.org>,
	Grygorii Strashko <grygorii.strashko@...com>, <rogerq@...com>
Subject: [PATCH v3] extcon: usb-gpio: Don't miss event during suspend/resume

Pin state might have changed during suspend/resume while
our interrupts were disabled and if device doesn't support wakeup.

Scan for change during resume for such case.

Signed-off-by: Roger Quadros <rogerq@...com>
---
v3:
- use queue_delayed_work() instead of directly calling usb_extcon_detect_cable()

v2:
- only check for state change during resume if device wakeup is 

 drivers/extcon/extcon-usb-gpio.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/extcon/extcon-usb-gpio.c b/drivers/extcon/extcon-usb-gpio.c
index bc61d11..bad2159 100644
--- a/drivers/extcon/extcon-usb-gpio.c
+++ b/drivers/extcon/extcon-usb-gpio.c
@@ -185,6 +185,9 @@ static int usb_extcon_resume(struct device *dev)
 	int ret = 0;
 
 	enable_irq(info->id_irq);
+	if (!device_may_wakeup(dev))
+		queue_delayed_work(system_power_efficient_wq,
+				   &info->wq_detcable, 0);
 
 	return ret;
 }
-- 
2.5.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ