From patchwork Thu Jun 30 02:06:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hui Wang X-Patchwork-Id: 642308 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 3rg2yw5jh2z9sD5; Thu, 30 Jun 2016 12:08:56 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1bIRPN-0001Kw-5W; Thu, 30 Jun 2016 02:08:49 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1bIRPH-0001Ki-A5 for kernel-team@lists.ubuntu.com; Thu, 30 Jun 2016 02:08:43 +0000 Received: from [222.130.133.235] (helo=localhost.localdomain) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1bIRPG-00013k-GH; Thu, 30 Jun 2016 02:08:43 +0000 From: Hui Wang To: kernel-team@lists.ubuntu.com Subject: [vivid PATCH] usb: xhci: Makefile: move xhci-pci and xhci-plat-hcd after xhci-hcd Date: Thu, 30 Jun 2016 10:06:38 +0800 Message-Id: <1467252398-14973-1-git-send-email-hui.wang@canonical.com> X-Mailer: git-send-email 1.9.1 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: kernel-team-bounces@lists.ubuntu.com From: "Lu, Baolu" BugLink: http://bugs.launchpad.net/bugs/1597564 Module xhci-pci and xhci-plat-hcd depend on xhci-hcd. Module xhci-hcd should be put at a place before xhci-pci and xhci-plat-hcd. Otherwise, xhci_hcd_init() might be executed after other functions in xhci-hcd if they are all selected to be built in. Signed-off-by: Lu Baolu Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 8451a34ff6c7c756e9e0f0094a3ba856c9734e5d) Signed-off-by: Hui Wang --- This patch is only needed by vivid kernel, the xenial kernel already had this patch. With this patch, the ECHI host controller will be registerd to USB host bus1 and XHCI host controllers will be registered to USB host bus2 and bus3, when reboot or shutdown, the system will call XHCI_shutdown() first, in this situation the system will not hang. Without this patch, the XHCI will be registered to USB host bus1 and bus2, the EHCI will be registered to USB host bus3, when reboot or shutdown, the system will call EHCI_shutdown() first, the system will hang inside the EHCI_shutdown(). According to the explanation of Intel side, this problem has something to do with port switching between EHCI and xHCI controller, before EHCI and XHCI drivers are loaded, the USB pci code will switch over ports from EHCI to XHCI if possible at boot, so the port belongs to XHCI now, if EHCI_shutdown() is called first, it will try to turn off a port that does not belong to it, then the system hang. If XHCI_shutdown() is called first, it will give back the port to EHCI, then EHCI_shutdown() will not hang. drivers/usb/host/Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile index d6216a4..bd9a828 100644 --- a/drivers/usb/host/Makefile +++ b/drivers/usb/host/Makefile @@ -28,9 +28,6 @@ obj-$(CONFIG_USB_WHCI_HCD) += whci/ obj-$(CONFIG_PCI) += pci-quirks.o -obj-$(CONFIG_USB_XHCI_PCI) += xhci-pci.o -obj-$(CONFIG_USB_XHCI_PLATFORM) += xhci-plat-hcd.o - obj-$(CONFIG_USB_EHCI_HCD) += ehci-hcd.o obj-$(CONFIG_USB_EHCI_PCI) += ehci-pci.o obj-$(CONFIG_USB_EHCI_HCD_PLATFORM) += ehci-platform.o @@ -65,6 +62,8 @@ obj-$(CONFIG_USB_OHCI_HCD_PXA27X) += ohci-pxa27x.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o obj-$(CONFIG_USB_XHCI_HCD) += xhci-hcd.o +obj-$(CONFIG_USB_XHCI_PCI) += xhci-pci.o +obj-$(CONFIG_USB_XHCI_PLATFORM) += xhci-plat-hcd.o obj-$(CONFIG_USB_SL811_HCD) += sl811-hcd.o obj-$(CONFIG_USB_SL811_CS) += sl811_cs.o obj-$(CONFIG_USB_U132_HCD) += u132-hcd.o