Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751612AbdFIHWm (ORCPT ); Fri, 9 Jun 2017 03:22:42 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:34786 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751512AbdFIHWk (ORCPT ); Fri, 9 Jun 2017 03:22:40 -0400 From: Kai-Heng Feng To: stern@rowland.harvard.edu Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Kai-Heng Feng Subject: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller Date: Fri, 9 Jun 2017 15:22:33 +0800 Message-Id: <20170609072233.5594-1-kai.heng.feng@canonical.com> X-Mailer: git-send-email 2.13.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 912 Lines: 28 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 Signed-off-by: Kai-Heng Feng --- drivers/usb/host/ehci-pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c index 93326974ff4b..616685f83954 100644 --- a/drivers/usb/host/ehci-pci.c +++ b/drivers/usb/host/ehci-pci.c @@ -181,6 +181,8 @@ static int ehci_pci_setup(struct usb_hcd *hcd) if (pdev->device == 0x7808) { ehci->use_dummy_qh = 1; ehci_info(ehci, "applying AMD SB700/SB800/Hudson-2/3 EHCI dummy qh workaround\n"); + + pdev->dev_flags |= PCI_DEV_FLAGS_NO_D3; } break; case PCI_VENDOR_ID_VIA: -- 2.13.0