On Fri, 6 Jan 2006, Franck wrote:

> 2006/1/6, Alan Stern <[EMAIL PROTECTED]>:
> > Maybe you're missing some patches?  The power state value should be set
> > back to 0 (PMSG_ON) in drivers/usb/core/hub.c:finish_device_resume().
> >
> > Or maybe you're not using the correct path in sysfs?
> 
> I don't think so since I can suspend the device correctly.

What I mean is that there are separate paths for the device and for the 
interface.  Are you confusing the two of them?

For example, on my system here's the path to the power-state file for one 
of my root hubs:

        /sys/devices/pci0000:00/0000:00:1d.7/usb1/power/state

and here's the power-state file for the hub's interface:

        /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-0:1.0/power/state

They are not the same.  What path are you looking at?

Also, what kernel version + patchset are you using?  Right now I'm on 
2.6.15 together with gregkh-all-2.6.15.patch (which no longer exists; the 
current gregkh-all patch is for 2.6.15-git1).

> > Although the device
> > state does get set back to 0, I just noticed that the interface's state
> > does not.
> 
> you mean that you tried the same thing and got the power state of your
> device back to "on" state ?

Sorry, I take back what I said before.  I read the source code too 
hastily.  But yes, on many occasions I have suspended and resumed USB 
devices, and their power state always goes back to 0.  Of course you need 
to have CONFIG_USB_SUSPEND set, otherwise none of this stuff will work.

Anyway, if you still can't figure out what's going on, add some printk 
statements to finish_device_resume in core/hub.c.  You should see where 
udev->dev.power.power_state gets set to 0, near the top of the routine.

Alan Stern



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to