Comment 94 for bug 952080

Revision history for this message
In , stern (stern-linux-kernel-bugs) wrote :

Wakeup events are: port connect, port disconnect, and over-current detect. If the controller is enabled for wakeup and it is suspended when one of these events occurs, it generates a wakeup signal.

For many controllers this signal takes the form of asserting PCI's PME# (Power Management Event) line. For other controllers (including Intel's UHCI but not VIA's), other platform-specific techniques are used for the wakeup signal, typically some sort of GPIO or interrupt.

You can tell whether or not a particular PCI controller uses the PME# mechanism by looking at the output from "lspci -vv" running as root. For example, on this computer I get (uninteresting stuff omitted):

00:1d.3 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #4 (rev 02) (prog-if 00 [UHCI])
 Subsystem: GVC/BCM Advanced Research Device 2181
 Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
 Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
 Latency: 0
 Interrupt: pin A routed to IRQ 16
 Region 4: I/O ports at e800 [size=32]
 Kernel driver in use: uhci_hcd

00:1d.7 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB2 EHCI Controller (rev 02) (prog-if 20 [EHCI])
 Subsystem: GVC/BCM Advanced Research Device 2181
 Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
 Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
 Latency: 0
 Interrupt: pin D routed to IRQ 23
 Region 0: Memory at fe77bc00 (32-bit, non-prefetchable) [size=1K]
 Capabilities: [50] Power Management version 2
  Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
  Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
 Capabilities: [58] Debug port: BAR=1 offset=00a0
 Kernel driver in use: ehci_hcd

01:01.0 USB Controller: NEC Corporation USB (rev 43) (prog-if 10 [OHCI])
 Subsystem: NEC Corporation Hama USB 2.0 CardBus
 Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
 Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
 Latency: 32 (250ns min, 10500ns max), Cache Line Size: 32 bytes
 Interrupt: pin A routed to IRQ 22
 Region 0: Memory at fe5dd000 (32-bit, non-prefetchable) [size=4K]
 Capabilities: [40] Power Management version 2
  Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold-)
  Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
 Kernel driver in use: ohci_hcd

Look at the Power Management Capabilities sections. The UHCI controller doesn't have one, so it doesn't use PME#. The EHCI and OHCI controllers do use it, and the last entry on the Flags line indicates which states support it. You can see that the EHCI controller implements PME# in D3hot and D3cold but not D1 or D2, whereas the OHCI controller implements it in D1, D2, and D3hot but not D3cold. The difference in the AuxCurrent values may or may not be significant; I don't know.