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: <Pine.LNX.4.44L0.0709221020080.22762-100000@netrider.rowland.org>
Date:	Sat, 22 Sep 2007 10:29:39 -0400 (EDT)
From:	Alan Stern <stern@...land.harvard.edu>
To:	Hans de Goede <j.w.r.degoede@....nl>
cc:	linux-kernel <linux-kernel@...r.kernel.org>,
	USB development list <linux-usb-devel@...ts.sourceforge.net>
Subject: Re: [linux-usb-devel] USB autosuspend and turning of usb pendrive
 leds

On Sat, 22 Sep 2007, Hans de Goede wrote:

> I'm afraid that that doesn't work for usb mass-storage devices.
> 
> Here is what I did:
> 1) kill hal
> 2) insert usb stick -> led lights
> 3):
> echo -n 1 >    /sys/bus/usb/devices/.../power/autosuspend
> echo -n auto > /sys/bus/usb/devices/.../power/level
> 
> 4) wait
> 
> Nothing happens, where as sending "suspend" to power/level does turn the led 
> off.

I don't know what went wrong.  It works fine on my systems.  You did 
fill in the correct device path for the "...", right?  And you don't 
need the "-n" -- adding it shouldn't matter, but you should try reading 
back the contents of those files to make sure the values did get 
written correctly.

> Now call me naive, but I would expect a mass-storage devices with no 
> partitions mounted to autosuspend when autosuspend is enabled for that device.

Yes, that is naive.  The driver has no way to tell whether or not any 
partitions are mounted.  Furthermore, you might very well want to 
access the raw device without mounting any partitions (database 
managers frequently do such things to reduce I/O overhead), in which 
case you certainly would not the device to be autosuspended.

> And yes I'm pretty sure nothing else is talking to the device.

You can be absolutely certain by using usbmon (see 
Documentation/usb/usbmon.txt).  It will also show whether any suspends 
or resumes are actually being sent.

Alan Stern

-
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