Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller

2017-06-19 Thread Kai-Heng Feng
On Tue, Jun 20, 2017 at 2:32 AM, Alan Stern wrote: > > It's possible that the test was invalid. Kai-Heng did not say whether > /sys/.../power/wakeup was set to "enabled" for both the EHCI controller > and the USB root hub beneath it, before the test was started. If >

Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller

2017-06-19 Thread Rafael J. Wysocki
On Monday, June 19, 2017 02:32:57 PM Alan Stern wrote: > On Mon, 19 Jun 2017, Bjorn Helgaas wrote: > > > > > Have you tested it with system suspend? That is, if you suspend the > > > > whole computer, does plugging or unplugging a USB device cause the > > > > system to wake up? > > > > > > No,

Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller

2017-06-19 Thread Alan Stern
On Mon, 19 Jun 2017, Bjorn Helgaas wrote: > > > Have you tested it with system suspend? That is, if you suspend the > > > whole computer, does plugging or unplugging a USB device cause the > > > system to wake up? > > > > No, the system will not wake up when plugging or unplugging. > > Tried

Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller

2017-06-19 Thread Bjorn Helgaas
On Mon, Jun 19, 2017 at 11:30:18AM +0800, Kai-Heng Feng wrote: > On Sat, Jun 17, 2017 at 1:30 AM, Alan Stern wrote: > > On Sat, 17 Jun 2017, Kai-Heng Feng wrote: > > > >> On Fri, Jun 16, 2017 at 11:07 AM, Kai-Heng Feng > >> wrote: > >> > On

Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller

2017-06-18 Thread Kai-Heng Feng
On Sat, Jun 17, 2017 at 1:30 AM, Alan Stern wrote: > On Sat, 17 Jun 2017, Kai-Heng Feng wrote: > >> On Fri, Jun 16, 2017 at 11:07 AM, Kai-Heng Feng >> wrote: >> > On Thu, Jun 15, 2017 at 10:12 PM, Alan Stern >>

Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller

2017-06-16 Thread Alan Stern
On Sat, 17 Jun 2017, Kai-Heng Feng wrote: > On Fri, Jun 16, 2017 at 11:07 AM, Kai-Heng Feng > wrote: > > On Thu, Jun 15, 2017 at 10:12 PM, Alan Stern > > wrote: > >> Those documents refer to a hardware bug with a workaround in the BIOS. >

Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller

2017-06-16 Thread Kai-Heng Feng
On Fri, Jun 16, 2017 at 11:07 AM, Kai-Heng Feng wrote: > On Thu, Jun 15, 2017 at 10:12 PM, Alan Stern > wrote: >> Those documents refer to a hardware bug with a workaround in the BIOS. >> Have you checked to see if your BIOS is up to date?

Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller

2017-06-15 Thread Kai-Heng Feng
On Thu, Jun 15, 2017 at 10:12 PM, Alan Stern wrote: > On Thu, 15 Jun 2017, Kai-Heng Feng wrote: > >> On Wed, Jun 14, 2017 at 1:28 AM, Bjorn Helgaas wrote: >> > >> > The lspci output [1] shows: >> > >> > 00:12.0 USB controller: Advanced Micro

Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller

2017-06-15 Thread Alan Stern
On Thu, 15 Jun 2017, Kai-Heng Feng wrote: > On Wed, Jun 14, 2017 at 1:28 AM, Bjorn Helgaas wrote: > > > > The lspci output [1] shows: > > > > 00:12.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB EHCI > > Controller (rev 39) (prog-if 20 [EHCI]) > >

Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller

2017-06-15 Thread Bjorn Helgaas
On Thu, Jun 15, 2017 at 03:02:25PM +0800, Kai-Heng Feng wrote: > On Thu, Jun 15, 2017 at 2:55 AM, Alan Stern wrote: > > On Tue, 13 Jun 2017, Bjorn Helgaas wrote: > > > >> [+cc Rafael, linux-pm] > >> > >> On Tue, Jun 13, 2017 at 12:21:15PM +0800, Kai-Heng Feng wrote: >

Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller

2017-06-15 Thread Kai-Heng Feng
On Thu, Jun 15, 2017 at 2:55 AM, Alan Stern wrote: > On Tue, 13 Jun 2017, Bjorn Helgaas wrote: > >> [+cc Rafael, linux-pm] >> >> On Tue, Jun 13, 2017 at 12:21:15PM +0800, Kai-Heng Feng wrote: >> > On Mon, Jun 12, 2017 at 10:18 PM, Alan Stern

Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller

2017-06-15 Thread Kai-Heng Feng
On Wed, Jun 14, 2017 at 1:28 AM, Bjorn Helgaas wrote: > > The lspci output [1] shows: > > 00:12.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB EHCI > Controller (rev 39) (prog-if 20 [EHCI]) > Capabilities: [c0] Power Management version 2 > Flags:

Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller

2017-06-14 Thread Alan Stern
On Tue, 13 Jun 2017, Bjorn Helgaas wrote: > [+cc Rafael, linux-pm] > > On Tue, Jun 13, 2017 at 12:21:15PM +0800, Kai-Heng Feng wrote: > > On Mon, Jun 12, 2017 at 10:18 PM, Alan Stern > > wrote: > > > Let's get some help from people who understand PCI well. > > > > >

Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller

2017-06-13 Thread Bjorn Helgaas
[+cc Rafael, linux-pm] On Tue, Jun 13, 2017 at 12:21:15PM +0800, Kai-Heng Feng wrote: > On Mon, Jun 12, 2017 at 10:18 PM, Alan Stern > wrote: > > Let's get some help from people who understand PCI well. > > > > Here's the general problem: Kai-Heng has a PCI-based USB

Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller

2017-06-12 Thread Kai-Heng Feng
On Mon, Jun 12, 2017 at 10:18 PM, Alan Stern wrote: > Let's get some help from people who understand PCI well. > > Here's the general problem: Kai-Heng has a PCI-based USB host > controller that advertises wakeup capability from D3, but it doesn't > assert PME# from D3

Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller

2017-06-12 Thread Alan Stern
Let's get some help from people who understand PCI well. Here's the general problem: Kai-Heng has a PCI-based USB host controller that advertises wakeup capability from D3, but it doesn't assert PME# from D3 when it should. For "lspci -vv" output, see

Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller

2017-06-12 Thread Kai-Heng Feng
On Mon, Jun 12, 2017 at 3:04 PM, Kai-Heng Feng wrote: > On Fri, Jun 9, 2017 at 10:43 PM, Alan Stern wrote: >> On Fri, 9 Jun 2017, Kai-Heng Feng wrote: >> >> Is this really the right solution? Maybe it would be better to allow >> the

Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller

2017-06-12 Thread Kai-Heng Feng
On Fri, Jun 9, 2017 at 10:43 PM, Alan Stern wrote: > On Fri, 9 Jun 2017, Kai-Heng Feng wrote: > >> As Alan Stern points out [1], the PME signal is not enabled when >> controller is in D3, therefore it's not being woken up when new deivces >> get plugged in. >> >>

Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller

2017-06-09 Thread Alan Stern
On Fri, 9 Jun 2017, Kai-Heng Feng wrote: > As Alan Stern points out [1], the PME signal is not enabled when > controller is in D3, therefore it's not being woken up when new deivces > get plugged in. > > Workaround this bug by preventing the controller enters D3 power state. > > [1]

[PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller

2017-06-09 Thread Kai-Heng Feng
As Alan Stern points out [1], the PME signal is not enabled when controller is in D3, therefore it's not being woken up when new deivces get plugged in. Workaround this bug by preventing the controller enters D3 power state. [1] https://www.spinics.net/lists/linux-usb/msg157462.html