Google
  Web www.spinics.net

Re: How to perform runtime pm for usb hcds?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On Nov 19, 2007 11:20 PM, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
>
> On Mon, 19 Nov 2007, jidong xiao wrote:
>
> > Hi,
> >   I saw usb_hcd_pci_suspend() is stored in several HCD's struct
> > pci_driver as suspend, and usb_hcd_pci_resume() is stored as
> > resume().From user's perspective, is it possible to call these methods
> > manually?I mean,I am using kdb the trace these methods,and I wanna set
> > a breakpoint in the point whenever these two methods are invoked.
> > That's to say, once either of these two methods are invoked, then the
> > system will drop into kdb, so that I can do some analysis on these two
> > methods. But the problem is, from user space,what shall I do to
> > trigger these two methods?
>
> Here's a patch to create a sysfs file for PCI devices.  Writing 1 to
> the file will call the device's suspend method, and writing 0 will call
> the resume method.
>
> Alan Stern
>
Thanks.

However in the following link, I saw your comments,
http://bugzilla.kernel.org/show_bug.cgi?id=6193

"echo 3 >/sys/devices/pci0000:00/0000:00:10.2/power/state

which should suspend just that one UHCI controller,"


Then I tried in my box,

localhost:~ # lspci | grep USB
00:1d.0 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6
Family) USB UHCI #1 (rev 03)
00:1d.1 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6
Family) USB UHCI #2 (rev 03)
00:1d.2 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6
Family) USB UHCI #3 (rev 03)
00:1d.3 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6
Family) USB UHCI #4 (rev 03)
00:1d.7 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6
Family) USB2 EHCI Controller (rev 03)
localhost:~ # cat /sys/devices/pci0000\:00/0000\:00\:1d.0/power/state
0
localhost:~ # echo 3 >/sys/devices/pci0000:00/0000:00:1d.0/power/state
-bash: echo: write error: Invalid argument

But this command failed to work.(both usbcore and uhci-hcd are inserted already)
The kernel I am using is 2.6.22.1.

Regards
Jason

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
linux-usb-devel@xxxxxxxxxxxxxxxxxxxxx
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

[Home]     [Video for Linux]     [Photo]     [Yosemite Forum]     [Yosemite Photos]    [Video Projectors]     [PDAs]     [Hacking TiVo]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Devices]     [Big List of Linux Books]     [Free Dating]

  Powered by Linux