From: Hans de Goede <j.w.r.degoede@hhs.nl>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
USB development list <linux-usb-devel@lists.sourceforge.net>,
Hans de Goede <j.w.r.degoede@hhs.nl>
Subject: Re: [linux-usb-devel] USB autosuspend and turning of usb pendrive leds
Date: Sat, 22 Sep 2007 19:08:24 +0200 [thread overview]
Message-ID: <46F54C08.3050300@hhs.nl> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0709221020080.22762-100000@netrider.rowland.org>
Alan Stern wrote:
> 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?
Yes, the one that comes and goes as I plug in one of the USB-sticks I ue for
testing.
> 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.
>
I did read them back and it 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.
>
How does this relate to your "It works fine on my systems" remark, do I need to
do anything other the unmounting the paritions to make the device eligible for
autosuspend, like unbind the sd driver or even the usb-storage driver?
If so I must say I find that a little counter intuitive.
Regards,
Hans
p.s.
As always, please keep me CC-ed, not on the list.
next prev parent reply other threads:[~2007-09-22 17:11 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-21 13:28 USB autosuspend and turning of usb pendrive leds Hans de Goede
2007-09-21 14:18 ` Jiri Kosina
2007-09-21 14:20 ` Hans de Goede
2007-09-21 15:15 ` Jiri Kosina
2007-09-24 10:36 ` Oliver Neukum
2007-09-24 11:38 ` Hans de Goede
2007-09-24 13:25 ` Oliver Neukum
2007-09-21 19:47 ` [linux-usb-devel] " Oliver Neukum
2007-09-21 14:39 ` Alan Stern
2007-09-22 14:00 ` Hans de Goede
2007-09-22 14:29 ` Alan Stern
2007-09-22 17:08 ` Hans de Goede [this message]
2007-09-22 20:12 ` Alan Stern
2007-09-28 20:48 ` Bill Davidsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46F54C08.3050300@hhs.nl \
--to=j.w.r.degoede@hhs.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
--cc=stern@rowland.harvard.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox