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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <0C18FE92A7765D4EB9EE5D38D86A563A01C428B4@SHSMSX103.ccr.corp.intel.com>
Date:	Thu, 18 Dec 2014 12:00:30 +0000
From:	"Du, Changbin" <changbin.du@...el.com>
To:	"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [DISCUSSION] USB device remote wakeup is not working for S3 case

When I am checking usb remote wakeup code, I found that usb remote wakeup will not work after system going to S3 sate and I confirmed with my PC.
During enumeration, usb device will be set as wakeup capable by usb_set_device_state if it supports. Whether usb driver send SET_FEATURE(REMOTE_WAKUP) usb request when suspending on S3  depend on do_remote_wakeup flag which is set by choose_wakeup(). It can be simply presented as below.
       do_remote_wakeup  = device_may_wakeup(&udev->dev);
The return value is always false since usb device is not marked as wakeup enabled(that is no one call device_set_wakeup_enable() for usb device). As a result, usb device will not signal wakeup event to host.

Maybe we should not allow all remote wakeup supported device can wakeup system by default. But for usb keyboard/mouse, I think it is not reasonable to disable it by default.

A simple way to fix this is that replace the device_may_wakeup by device_can_wakeup in choose_wakeup() function, just like on auto suspend case (usb remote wakeup works for rpm). Another way is to make usb device wakeup able  by default. But both of them will make all usb devices can wakeup system. Have any better idea?
--
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