Re: Runtime PM enabled EHCI does not respond to device plugging.

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

 



On Wed, 24 May 2017, Kai-Heng Feng wrote:

> On Wed, May 24, 2017 at 12:43 AM, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
> >>
> >> Output of `cat /sys/kernel/debug/usb/usbmon/1u`:
> >> Runtime PM disabled as attachment.
> >
> > When you say "runtime PM disabled", you mean that it is disabled for
> > the EHCI controller but enabled for other devices, right?
> 
> Yes, disabled for the ehci-hcd. Runtime PM is enabled for ehci-pci.
> 
> >
> >> It's empty when runtime PM is enabled.
> >
> > And nothing shows up in the dmesg log either?  This suggests that the
> > PME signal isn't working properly.
> >
> > Try doing this: With runtime PM enabled, plug in a device.  When
> > nothing happens, do:
> >
> >         lspci -v -s 00:12.0
> >
> > The output should show whether the controller is sending a wakeup
> > signal.  Does it cause the device to be detected?
> 
> No.
> 
> 00:12.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB
> EHCI Controller (rev 39) (prog-if 20 [EHCI])
>         Subsystem: Dell FCH USB EHCI Controller
>         Flags: 66MHz, medium devsel, IRQ 18
>         Memory at fe769000 (32-bit, non-prefetchable) [size=256]
>         Capabilities: [c0] Power Management version 2
>         Capabilities: [e4] Debug port: BAR=1 offset=00e0
>         Kernel driver in use: ehci-pci
> 
> > If it doesn't, run lsusb.  That definitely should wake up the
> > controller and cause the device to be detected.  Then run the lspci
> > command again.  Let's see what the output from these commands shows.
> 
> I plugged an optical mouse to test:
> lsusb or "lsusb -s 001:001" does nothing, the mouse is not shown in
> lsusb. The optical light is off.
> "lsusb -s 001:001 -v" wakes up the controller and make the mouse to be
> detected, the mouse is in lsusb and works correctly.
> Once I turned on runtime PM on the mouse, it no longer works. The
> optical light is still on but it did not response to movement or
> click.
> 
> This is the lspci right after I use "lsusb -s 001:001 -v" to wake up
> the controller:
> 00:12.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB
> EHCI Controller (rev 39) (prog-if 20 [EHCI])
>         Subsystem: Dell FCH USB EHCI Controller
>         Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 18
>         Memory at fe769000 (32-bit, non-prefetchable) [size=256]
>         Capabilities: [c0] Power Management version 2
>         Capabilities: [e4] Debug port: BAR=1 offset=00e0
>         Kernel driver in use: ehci-pci

My mistake; we need to see the information from "lspci -vv -s 00:12.0" 
with two "v"'s, not just one.

There's another piece of information you can collect.  Mount a 
debugfs filesystem at /sys/kernel/debug, and then copy the contents of 
the file

	/sys/kernel/debug/usb/ehci/0000:00:12.0/registers

Do this while the controller is still asleep (after the mouse is
plugged in) and then again after it is awake.

Alan Stern

--
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



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux