From patchwork Tue Jul 5 04:34:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hui Wang X-Patchwork-Id: 644455 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 3rk9yY6lHjz9sXy; Tue, 5 Jul 2016 14:34:29 +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 1bKI3y-0002wY-Na; Tue, 05 Jul 2016 04:34:22 +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 1bKI3u-0002wF-Ra for kernel-team@lists.ubuntu.com; Tue, 05 Jul 2016 04:34:18 +0000 Received: from [123.114.40.168] (helo=[192.168.1.103]) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1bKI3u-0007eG-65 for kernel-team@lists.ubuntu.com; Tue, 05 Jul 2016 04:34:18 +0000 Subject: Fwd: [vivid PATCH] usb: xhci: Makefile: move xhci-pci and xhci-plat-hcd after xhci-hcd References: <1467252398-14973-1-git-send-email-hui.wang@canonical.com> To: kernel-team@lists.ubuntu.com From: Hui Wang X-Forwarded-Message-Id: <1467252398-14973-1-git-send-email-hui.wang@canonical.com> Message-ID: <577B38C5.1080402@canonical.com> Date: Tue, 5 Jul 2016 12:34:13 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <1467252398-14973-1-git-send-email-hui.wang@canonical.com> 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: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: kernel-team-bounces@lists.ubuntu.com Hello, Will someone review and merge this patch? Thanks, Hui. -------- Forwarded Message -------- 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 From: Hui Wang To: kernel-team@lists.ubuntu.com CC: hui.wang@canonical.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