On Thu, May 12, 2011 at 1:22 PM, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote: > On Thu, 12 May 2011, Dwight Schauer wrote: > >> > Dwight's problem is that he is looking in the wrong place. The xHCI >> > controller is not a USB device; it's a PCI device -- i.e., it >> > communicates with the computer over a PCI bus and not over a USB bus. >> > Therefore it shows up under /sys/bus/pci, not /sys/bus/usb. >> > >> >> OK, thanks. I see that now. I've gone into /sys/bus/pci/.../power/ for >> the xHCI controller in question and put "enabled" in wakeup, but it >> does not seem to have the same effect as enabled wakeups in >> /proc/acpi/wakeup. > > Wakeup handling is often easier to test using runtime PM than system > suspend. Try writing "auto" to the power/control file for the xHCI > controller, with no USB devices plugged in, and wait for the controller > to be suspended. Then plug in a USB device and see if the controller > wakes up again. > > If that works okay but a similar test fails to wake up a suspended > system, it would help to see a dmesg log with CONFIG_USB_DEBUG enabled. > You should also post the output from "lspci -v" for the controller in > question. > Thanks Alan. OK, this is with 2.6.39-rc7-gregkh 05:00.0 USB Controller: NEC Corporation uPD720200 USB 3.0 Host Controller (rev 03) (prog-if 30 [XHCI]) Subsystem: Melco Inc Device 0241 Control: I/O- Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+ Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Interrupt: pin A routed to IRQ 17 Region 0: Memory at fe9fe000 (64-bit, non-prefetchable) [size=8K] Capabilities: [50] Power Management version 3 Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold-) Status: D3 NoSoftRst+ PME-Enable+ DSel=0 DScale=0 PME+ Capabilities: [70] MSI: Enable- Count=1/8 Maskable- 64bit+ Address: 0000000000000000 Data: 0000 Capabilities: [90] MSI-X: Enable+ Count=8 Masked- Vector table: BAR=0 offset=00001000 PBA: BAR=0 offset=00001080 Capabilities: [a0] Express (v2) Endpoint, MSI 00 DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s unlimited, L1 unlimited ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset- DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported- RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop+ MaxPayload 128 bytes, MaxReadReq 512 bytes DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq+ AuxPwr- TransPend- LnkCap: Port #0, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0 <4us, L1 unlimited ClockPM+ Surprise- LLActRep- BwNot- LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+ ExtSynch- ClockPM+ AutWidDis- BWInt- AutBWInt- LnkSta: Speed 5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt- DevCap2: Completion Timeout: Not Supported, TimeoutDis+ DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-, Selectable De-emphasis: -6dB Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS- Compliance De-emphasis: -6dB LnkSta2: Current De-emphasis Level: -3.5dB Capabilities: [100 v1] Advanced Error Reporting UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol- UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol- UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol- CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+ CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+ AERCap: First Error Pointer: 00, GenCap- CGenEn- ChkCap- ChkEn- Capabilities: [140 v1] Device Serial Number ff-ff-ff-ff-ff-ff-ff-ff Capabilities: [150 v1] #18 Kernel driver in use: xhci_hcd Kernel modules: xhci-hcd @@@ With "on" in power/control I get this upon plugging in a keyboard: usb usb2: usb wakeup-resume usb usb2: usb auto-resume hub 2-0:1.0: hub_resume hub 2-0:1.0: port 2: status 0101 change 0001 hub 2-0:1.0: state 7 ports 2 chg 0004 evt 0000 hub 2-0:1.0: port 2, status 0101, change 0000, 12 Mb/s usb 2-2: new low speed USB device number 6 using xhci_hcd usb 2-2: skipped 1 descriptor after interface xhci_hcd 0000:05:00.0: WARN: short transfer on control ep usb 2-2: default language 0x0409 xhci_hcd 0000:05:00.0: WARN: short transfer on control ep xhci_hcd 0000:05:00.0: WARN: short transfer on control ep usb 2-2: udev 6, busnum 2, minor = 133 usb 2-2: New USB device found, idVendor=413c, idProduct=2005 usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0 usb 2-2: Product: DELL USB Keyboard usb 2-2: Manufacturer: DELL usb 2-2: usb_probe_device usb 2-2: configuration #1 chosen from 1 choice usb 2-2: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes usb 2-2: Successful Endpoint Configure command usb 2-2: adding 2-2:1.0 (config #1, interface 0) usbhid 2-2:1.0: usb_probe_interface usbhid 2-2:1.0: usb_probe_interface - got id input: DELL DELL USB Keyboard as /devices/pci0000:00/0000:00:15.1/0000:05:00.0/usb2/2-2/2-2:1.0/input/input10 generic-usb 0003:413C:2005.0006: input,hidraw0: USB HID v1.10 Keyboard [DELL DELL USB Keyboard] on usb-0000:05:00.0-2/input0 drivers/usb/core/inode.c: creating file '006' @@@ and upon removing it: hub 2-0:1.0: state 7 ports 2 chg 0000 evt 0004 hub 2-0:1.0: port 2, status 0100, change 0001, 12 Mb/s usb 2-2: USB disconnect, device number 6 usb 2-2: unregistering device usb 2-2: unregistering interface 2-2:1.0 xhci_hcd 0000:05:00.0: shutdown urb ffff880111017c00 ep1in-intr usb 2-2: usb_disable_device nuking all URBs hub 2-0:1.0: debounce: port 2: total 100ms stable 100ms status 0x100 hub 2-0:1.0: hub_suspend usb usb2: bus auto-suspend @@@ If I put "auto" in power/control I get this: xhci_hcd 0000:05:00.0: hcd_pci_runtime_suspend: 0 xhci_hcd 0000:05:00.0: PME# enabled @@@ Upon plugging in a keyboard nothing. @@@ If I put "on" in power/control leaving the keyboard plugged in, I get this: xhci_hcd 0000:05:00.0: PME# disabled xhci_hcd 0000:05:00.0: setting latency timer to 64 xhci_hcd 0000:05:00.0: hcd_pci_runtime_resume: 0 usb usb2: usb wakeup-resume usb usb2: usb auto-resume hub 2-0:1.0: hub_resume hub 2-0:1.0: port 2: status 0101 change 0001 hub 2-0:1.0: state 7 ports 2 chg 0004 evt 0000 hub 2-0:1.0: port 2, status 0101, change 0000, 12 Mb/s usb 2-2: new low speed USB device number 7 using xhci_hcd usb 2-2: skipped 1 descriptor after interface xhci_hcd 0000:05:00.0: WARN: short transfer on control ep usb 2-2: default language 0x0409 xhci_hcd 0000:05:00.0: WARN: short transfer on control ep xhci_hcd 0000:05:00.0: WARN: short transfer on control ep usb 2-2: udev 7, busnum 2, minor = 134 usb 2-2: New USB device found, idVendor=413c, idProduct=2005 usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0 usb 2-2: Product: DELL USB Keyboard usb 2-2: Manufacturer: DELL usb 2-2: usb_probe_device usb 2-2: configuration #1 chosen from 1 choice usb 2-2: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes usb 2-2: Successful Endpoint Configure command usb 2-2: adding 2-2:1.0 (config #1, interface 0) usbhid 2-2:1.0: usb_probe_interface usbhid 2-2:1.0: usb_probe_interface - got id input: DELL DELL USB Keyboard as /devices/pci0000:00/0000:00:15.1/0000:05:00.0/usb2/2-2/2-2:1.0/input/input11 generic-usb 0003:413C:2005.0007: input,hidraw0: USB HID v1.10 Keyboard [DELL DELL USB Keyboard] on usb-0000:05:00.0-2/input0 drivers/usb/core/inode.c: creating file '007' @@@ Setting power/wakeup to "enabled" (it was "disabled") has no effect on this behaviour. @@@ I changed power/control back to "auto" and "power/wakeup" to "enabled" @@@ Upon keyboard disconnect I get this: hub 2-0:1.0: state 7 ports 2 chg 0000 evt 0004 hub 2-0:1.0: port 2, status 0100, change 0001, 12 Mb/s usb 2-2: USB disconnect, device number 7 usb 2-2: unregistering device usb 2-2: unregistering interface 2-2:1.0 xhci_hcd 0000:05:00.0: shutdown urb ffff8801110a4480 ep1in-intr usb 2-2: usb_disable_device nuking all URBs hub 2-0:1.0: debounce: port 2: total 100ms stable 100ms status 0x100 hub 2-0:1.0: state 7 ports 2 chg 0000 evt 0004 hub 2-0:1.0: hub_suspend usb usb2: bus auto-suspend xhci_hcd 0000:05:00.0: hcd_pci_runtime_suspend: 0 xhci_hcd 0000:05:00.0: PME# enabled @@@ When plugged back in I get nothing. @@@ The only way I can bring it back at that point is by putting "on" back in /power/control. xhci_hcd 0000:05:00.0: PME# disabled xhci_hcd 0000:05:00.0: setting latency timer to 64 xhci_hcd 0000:05:00.0: hcd_pci_runtime_resume: 0 usb usb2: usb wakeup-resume usb usb2: usb auto-resume hub 2-0:1.0: hub_resume hub 2-0:1.0: port 2: status 0101 change 0001 hub 2-0:1.0: state 7 ports 2 chg 0004 evt 0000 hub 2-0:1.0: port 2, status 0101, change 0000, 12 Mb/s usb 2-2: new low speed USB device number 8 using xhci_hcd usb 2-2: skipped 1 descriptor after interface xhci_hcd 0000:05:00.0: WARN: short transfer on control ep usb 2-2: default language 0x0409 xhci_hcd 0000:05:00.0: WARN: short transfer on control ep xhci_hcd 0000:05:00.0: WARN: short transfer on control ep usb 2-2: udev 8, busnum 2, minor = 135 usb 2-2: New USB device found, idVendor=413c, idProduct=2005 usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0 usb 2-2: Product: DELL USB Keyboard usb 2-2: Manufacturer: DELL usb 2-2: usb_probe_device usb 2-2: configuration #1 chosen from 1 choice usb 2-2: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes usb 2-2: Successful Endpoint Configure command usb 2-2: adding 2-2:1.0 (config #1, interface 0) usbhid 2-2:1.0: usb_probe_interface usbhid 2-2:1.0: usb_probe_interface - got id input: DELL DELL USB Keyboard as /devices/pci0000:00/0000:00:15.1/0000:05:00.0/usb2/2-2/2-2:1.0/input/input12 generic-usb 0003:413C:2005.0008: input,hidraw0: USB HID v1.10 Keyboard [DELL DELL USB Keyboard] on usb-0000:05:00.0-2/input0 drivers/usb/core/inode.c: creating file '008' @@@ I get the same behaviour with 2.6.38.6 Dwight Schauer -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html