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 21, 2007 12:59 PM, jidong xiao <jidong.xiao@xxxxxxxxx> wrote:
> 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
>

I also tried echo -n 3 > ...

echo -n 3 >/sys/devices/pci0000:00/0000:00:1d.0/usb1/1-0:1.0/power/state
echo -n 3 >/sys/devices/pci0000:00/0000:00:1d.0/usb1/power/state
echo -n 3 >/sys/devices/pci0000:00/0000:00:1d.0/power/state

The first two commands works well,but the third one doesn't.

Then I do:

localhost:~ # lspci -vvv -s 1d.0
00:1d.0 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6
Family) USB UHCI #1 (rev 03) (prog-if 00 [UHCI])
        Subsystem: Dell Unknown device 018f
        Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B-
        Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium
>TAbort- <TAbort- <MAbort- >SERR- <PERR-
        Latency: 0
        Interrupt: pin A routed to IRQ 16
        Region 4: I/O ports at bf80 [size=32]

Is "Cap-" indicating that the controller is not able to perform power
management?

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