Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752547AbdFLKMp (ORCPT ); Mon, 12 Jun 2017 06:12:45 -0400 Received: from mail-wr0-f180.google.com ([209.85.128.180]:35776 "EHLO mail-wr0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752158AbdFLKMo (ORCPT ); Mon, 12 Jun 2017 06:12:44 -0400 MIME-Version: 1.0 In-Reply-To: References: <20170609072233.5594-1-kai.heng.feng@canonical.com> From: Kai-Heng Feng Date: Mon, 12 Jun 2017 18:12:42 +0800 Message-ID: Subject: Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller To: Alan Stern Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1275 Lines: 36 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 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. > > 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? > > Thanks for the review. >