Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1663538

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

From Alan Stern <stern@rowland.harvard.edu>
Newsgroups linux.kernel
Subject Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller
Date 2017-06-12 16:20 +0200
Message-ID <tRyme-3aL-23@gated-at.bofh.it> (permalink)
References <tRuBY-R6-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

	http://marc.info/?l=linux-usb&m=149570231732519&w=2

On Mon, 12 Jun 2017, Kai-Heng Feng wrote:

> On Mon, Jun 12, 2017 at 3:04 PM, Kai-Heng Feng
> <kai.heng.feng@canonical.com> wrote:
> > On Fri, Jun 9, 2017 at 10:43 PM, Alan Stern <stern@rowland.harvard.edu> wrote:
> >> On Fri, 9 Jun 2017, Kai-Heng Feng wrote:
> >>
> >> Is this really the right solution?  Maybe it would be better to allow
> >> the controller to go into D3 provided no wakeup signal is needed.  You
> >> could do:
> >>
> >>                 device_set_wakeup_capable(&pdev->dev, 0);
> >
> > This doesn't work.
> > After applying this function, still nothing happens when devices get plugged in.
> > IIUC this function disable the wakeup function, but what I want to do
> > here is to have PME signal works even when runtime PM is enabled.

This may indicate a bug in either the PCI or USB stacks (or both!).  If 
a driver requires wakeup capability from runtime suspend but the device 
does not provide it, the PCI core should not allow the device to go 
into runtime suspend.  Or is that the driver's responsibility?

> > I also saw some legacy PCI PM stuff, so I also tried:
> > device_set_wakeup_capable(&pdev->dev, 1);
> > ...doesn't work either.
> >
> >>
> >> Another alternative is to put the controller into D2 instead of D3, but
> >> (1) I don't know how to do that, and (2) we don't know if wakeup
> >> signalling works any better in D2 than it does in D3.
> >
> > I'll try if D2 works.
> 
> Put the device into D2 instead of D3 can make the wakeup signaling
> work, i.e. USB devices can be correctly detected after plugged into
> EHCI port.
> 
> Do you think this alternative an acceptable workaround?

Yes, it is.  The difficulty is that I don't know how to tell the PCI 
core that the device should go in D2 during runtime suspend instead of 
D3.  Some sort of quirk may be needed -- perhaps Bjorn can help.

Alan Stern

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller Kai-Heng Feng <kai.heng.feng@canonical.com> - 2017-06-09 09:30 +0200
  Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller Alan Stern <stern@rowland.harvard.edu> - 2017-06-09 16:50 +0200
    Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller Kai-Heng Feng <kai.heng.feng@canonical.com> - 2017-06-12 09:10 +0200
      Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller Kai-Heng Feng <kai.heng.feng@canonical.com> - 2017-06-12 12:20 +0200
        Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller Alan Stern <stern@rowland.harvard.edu> - 2017-06-12 16:20 +0200
          Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller Kai-Heng Feng <kai.heng.feng@canonical.com> - 2017-06-13 06:30 +0200
            Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI  controller Bjorn Helgaas <helgaas@kernel.org> - 2017-06-13 19:30 +0200
              Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller Alan Stern <stern@rowland.harvard.edu> - 2017-06-14 21:00 +0200
                Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller Kai-Heng Feng <kai.heng.feng@canonical.com> - 2017-06-15 09:10 +0200
                Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI  controller Bjorn Helgaas <helgaas@kernel.org> - 2017-06-15 15:30 +0200
              Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller Kai-Heng Feng <kai.heng.feng@canonical.com> - 2017-06-15 09:00 +0200
                Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller Alan Stern <stern@rowland.harvard.edu> - 2017-06-15 16:20 +0200
                Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller Kai-Heng Feng <kai.heng.feng@canonical.com> - 2017-06-16 05:10 +0200
                Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller Kai-Heng Feng <kai.heng.feng@canonical.com> - 2017-06-16 18:20 +0200
                Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller Alan Stern <stern@rowland.harvard.edu> - 2017-06-16 19:40 +0200
                Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller Kai-Heng Feng <kai.heng.feng@canonical.com> - 2017-06-19 05:40 +0200
                Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI  controller Bjorn Helgaas <helgaas@kernel.org> - 2017-06-19 19:50 +0200
                Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller Alan Stern <stern@rowland.harvard.edu> - 2017-06-19 20:40 +0200
                Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-06-20 00:10 +0200

csiph-web