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]
Date:   Mon, 13 Aug 2018 09:49:26 +0200
From:   Oliver Neukum <oneukum@...e.com>
To:     Anshuman Gupta <anshuman.gupta@...el.com>,
        linux-usb@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [Query] USB device autosuspend and its runtime usage count.

On Mo, 2018-08-13 at 12:15 +0530, Anshuman Gupta wrote:
> Hi ,
> I need to test a functionality with USB autosuspend with latest kernel          
> Linux 4.18-rc8. I am trying to autosuspend a USB key board, i enabled       
> its autosuspend by doing echo "auto" to its "control" attributes.
> I am expecting USB keyboard to go to autosuspend after autosuspend_delay_ms.
> But USB key board is not going to autosuspend because its runtime usage
> count is not equal to zero.
> 
> Below are the log snippets:
> 
> root@...el-Kabylake-Client-platform:# cat /sys/bus/usb/devices/1-5/power/runtime_enabled
> enabled
> root@...el-Kabylake-Client-platform:# cat /sys/bus/usb/devices/1-5/power/control
> auto
> root@...el-Kabylake-Client-platform:# cat /sys/bus/usb/devices/1-5/power/autosuspend_delay_ms
> 2000
> root@...el-Kabylake-Client-platform:# cat /sys/bus/usb/devices/1-5/power/runtime_status
> active
> root@...el-Kabylake-Client-platform:# cat /sys/bus/usb/devices/1-5/power/runtime_usage
> 1
> root@...el-Kabylake-Client-platform:# sleep 60; cat /sys/bus/usb/devices/1-5/power/runtime_usage
> 1
> 
> My USB keyboard runtime usage reference count is not decreasing to zero.
> Here am i missing something regarding runtime usage count or is it some issue with
> my kernel or OS?

Very hard to say without further information. Is the HID device the
only interface of the whole device?
Does the device support remote wakeup?
Is an LED on?

Usbhid does support autosuspend, but its criteria must be met.
And all interface drivers must call the device idle.
Or you have discovered a kernel bug.

	Regards
		Oliver

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ