From patchwork Fri Jul 3 06:25:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Chen X-Patchwork-Id: 11640935 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EB897913 for ; Fri, 3 Jul 2020 06:25:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CB92C208C7 for ; Fri, 3 Jul 2020 06:25:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="jrpMLHkA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726118AbgGCGZj (ORCPT ); Fri, 3 Jul 2020 02:25:39 -0400 Received: from mail-vi1eur05on2076.outbound.protection.outlook.com ([40.107.21.76]:12304 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725764AbgGCGZi (ORCPT ); Fri, 3 Jul 2020 02:25:38 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Qya/CDA8bm5WRQvVutE9sIg/htIocG2jLONcCeHUpDykC+1QECgIBiAJCoLvlGt7fskzRua4l8revyyjdAxMc6GFw4vP3Qz/P6eDvhvYTwlCXQSNSUcMBtPiOzXFAOjSabbfey8qoH6dPjCRK0aavtWhNRs0811rjIvyDfRJ4vqkt7dg/lRSRRoNrfP16j55Wg05H7MWbZNYqR+6eKPdD/Exd+XSNvvfVRqVsUqv+g/MZ9bjaFDXjcY9KwXiCydCPvS8Ks2Mor3pQ7NFWRDf2bsnLYrfvdVPES/DdCgg2rGsnEFCgq9JXXqSNYgiUVCqF8+BjKS8HsTgfNj5mbui/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nrmJ77HfR4eGaLItuVwkP6lz2EknILl9bHDMpfXWWxs=; b=IFhQLmOvQ2MmX48R/00pm5mwmLtMLibFs9FyexBQI8yaPG/eErCLQoDwbc+PeBmS0wy/3DUzVebyLtlBZDejlFtuyFD/gsAA6P2cYS9djcyb9puUrycbCZaXt1NbzrEEbj2tHfy1rIr698Di0kfk7zYczRgJczOz38XJagGr0FA+gRL+XJsykOjvL754mUuNtctEo0YW45foBK5I30HKhdt/BuZ/9uPxlZTbpjJLBw+zqxfEklqoAhYK+Ytq0lSvwhW362tw34WWJiAOVK9C5K/51RX145ARUdFgSwjIbBYYac1PfW3AYpCllo2z58WRCuarQ385VKJoOrNl+8pkcQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nrmJ77HfR4eGaLItuVwkP6lz2EknILl9bHDMpfXWWxs=; b=jrpMLHkArpwbK4gjJEC8x3Gb5K69J4EJZ8STlu6qqsk+XfQ8Zwk7L4h+XUuIyXGqGFSg+jFPjJjVAlSnnKjWh79M3/Q3v4gCbaBWl3Z17U9l4EyRfYAaMUTvj8NLzOI8lgWnwhp5em5aa2TLCMACSBRViXd4x4lAElJSHyD5g5s= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=nxp.com; Received: from AM7PR04MB7157.eurprd04.prod.outlook.com (2603:10a6:20b:118::20) by AM6PR04MB4758.eurprd04.prod.outlook.com (2603:10a6:20b:f::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.21; Fri, 3 Jul 2020 06:25:35 +0000 Received: from AM7PR04MB7157.eurprd04.prod.outlook.com ([fe80::1101:adaa:ee89:af2a]) by AM7PR04MB7157.eurprd04.prod.outlook.com ([fe80::1101:adaa:ee89:af2a%3]) with mapi id 15.20.3153.023; Fri, 3 Jul 2020 06:25:35 +0000 From: Peter Chen To: mathias.nyman@intel.com Cc: linux-usb@vger.kernel.org, gregkh@linuxfoundation.org, linux-imx@nxp.com, Peter Chen Subject: [PATCH 1/2] usb: host: xhci: avoid calling two contineous times for xhci_suspend Date: Fri, 3 Jul 2020 14:25:31 +0800 Message-Id: <20200703062532.29076-1-peter.chen@nxp.com> X-Mailer: git-send-email 2.17.1 X-ClientProxiedBy: SG2PR02CA0024.apcprd02.prod.outlook.com (2603:1096:3:17::36) To AM7PR04MB7157.eurprd04.prod.outlook.com (2603:10a6:20b:118::20) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from b29397-desktop.ap.freescale.net (119.31.174.67) by SG2PR02CA0024.apcprd02.prod.outlook.com (2603:1096:3:17::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.23 via Frontend Transport; Fri, 3 Jul 2020 06:25:33 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [119.31.174.67] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: c47d28c5-9be0-4dd8-341a-08d81f19e50d X-MS-TrafficTypeDiagnostic: AM6PR04MB4758: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6108; X-Forefront-PRVS: 045315E1EE X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: j/DlLATXeTExK3UQWw9Ao1BC9BTRSKdhOSciDzoU5QVvuEs4Hw9yCddDtCsCBw4B46NwAVaQeG//n/4uSzZS2aayz5N6fHAIxeZ9dYKIgyoqlcKgHVWJHOEtLFvlqLHYFvRWW+FbDCYvrhIysnPqy3G3V7rcBJBkm+9ZF5met3DMLBmwVAVQhcNd47SGMJPJJofuOPB4cDQzIswGBSKieBBzsnJzUPQyYjWynfxXdrnGGH6IqRHdE2VM9hW+GVOGFC0Vw2wSI/yraWtgR9vb6L6N1s0CHZYQNbHekyofdnkvO1hXARoEyR5WDl03+VQA X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7157.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(136003)(346002)(376002)(39860400002)(396003)(366004)(316002)(4326008)(478600001)(6512007)(956004)(2616005)(5660300002)(6486002)(36756003)(66556008)(66476007)(44832011)(1076003)(52116002)(66946007)(6916009)(16526019)(186003)(86362001)(26005)(2906002)(6506007)(83380400001)(8936002)(8676002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: /uWnxKLsgM1Zhw2BfJFcHZK4RYblFfsCLv6DTygpgj2C8aRRRiWAqc9YvM8lcdfj1jhnl9OodccwM9+YDbJTyHRmp4M03aFp85np0HuM/JGUEql+P1BJseazfuEJ0yQhj6FZhSf2ui2k7eXvWirKCf31TvFZCayy77s3iF1GyvD/Z2CjD/VtZVpeoK3mpiPwFNC8Yt4rBrVhDo0clZxSsnlbu2uDaDs+8Jtfa9OvO55KkKSMFI837iBFgVG17NBdEjxBGBRftiZwbSKOragK4pGw7ABM5RhL8ekFpZx62om7AJP3WQK1DBKToDMKd1MiZdQQzDMaTx+QI2s9WG8ViPFuSn4atY8UmoqDt4uv5xdDpAiOzh4CDesNw56oWqqTY/ug93tKSwePstDQrFhys/jx/qE4Rfwi44j9DLqach5FgZiZTxxs42LSogXaAU5vhH0rT8aXL+OYGvNgDacJSKPzfspAuPfgQTpE6vsYmE8= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c47d28c5-9be0-4dd8-341a-08d81f19e50d X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7157.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jul 2020 06:25:35.4120 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: O3HEOglio7sFlhPxC/OG2AAdQt5oDwiJH3q/VYMHVjLkxXlVBqSspidNh1BQimlGCQpsGQvy9Dgjs00wfGyiog== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB4758 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org If the xhci-plat.c is the platform driver, after the runtime pm is enabled, the xhci_suspend is called if nothing is connected on the port. When the system goes to suspend, it will call xhci_suspend again if USB wakeup is enabled. Since the runtime suspend wakeup setting is not always the same with system suspend wakeup setting, eg, at runtime suspend, we always need wakeup if the controller is in low power mode; but at suspend system, we may not need wakeup. So, we move the judgement after changing wakeup setting. Signed-off-by: Peter Chen --- drivers/usb/host/xhci.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index ed468eed299c..66c894626be6 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -982,12 +982,15 @@ int xhci_suspend(struct xhci_hcd *xhci, bool do_wakeup) xhci->shared_hcd->state != HC_STATE_SUSPENDED) return -EINVAL; - xhci_dbc_suspend(xhci); - /* Clear root port wake on bits if wakeup not allowed. */ if (!do_wakeup) xhci_disable_port_wake_on_bits(xhci); + if (!HCD_HW_ACCESSIBLE(hcd)) + return 0; + + xhci_dbc_suspend(xhci); + /* Don't poll the roothubs on bus suspend. */ xhci_dbg(xhci, "%s: stopping port polling.\n", __func__); clear_bit(HCD_FLAG_POLL_RH, &hcd->flags); From patchwork Fri Jul 3 06:25:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Chen X-Patchwork-Id: 11640937 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 81F0F912 for ; Fri, 3 Jul 2020 06:25:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 67C5A204EA for ; Fri, 3 Jul 2020 06:25:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="jmrvXm/H" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726184AbgGCGZn (ORCPT ); Fri, 3 Jul 2020 02:25:43 -0400 Received: from mail-vi1eur05on2061.outbound.protection.outlook.com ([40.107.21.61]:44736 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725764AbgGCGZm (ORCPT ); Fri, 3 Jul 2020 02:25:42 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=deeCbHkFzPvhmVxqe1KFT8XV2Gx6P7z1gKYkwWOblG281oQv+7a3FqG38ZRXOlCWVQDJcfvpIsCwy18MSoFboUHNZPBp/MpQhyyGDtpJHtFbDwGBRoczQNYCdp3dSPqoJn9tkY1PLDiJ0/xZ1psakgL72BW4tojv7+DoZkzKRK29CA7G0jNjG6bbzqmlvyuvL8984G5mjNtXIK4oOWd/zWDysrN6EGmboXD7xT/UxWvMlqjiRw703otP9Iv1kx1euzGpeBeKYoUdWpl5mIryOExSyifbeabum9HT1zWWcTySm2ihAEgZ58mKI9bIa3ktKtHgAsGkltqliDVo3mCk/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Z2BMQNTNf9FpeV9YJxt0NtBbY5k9Zi1d6+76PHiAhlY=; b=XBTWlHBMXXZMOLmAhHtAZQ30anMmE8TVhJ42Z+EcW4p6bhewwxmXYhgf2dabsGbi1LOftcco2X5o1NFxCWRjeyQFtQvQxMJNEqJIcNLup9EDIXMIxWahwbOfud6//VYSpHSg4lMJsbRTe7ENZMIzMM2thYDqyXUyyV33IUYT5Zlagrv/lEOZGK250oAyM78HHT1EPl5tu/XNzI7Yo1zUI+M8YpH946jFL0ewHWO/ZWKJnqEkswj4aq4GlU7a7/Cq0nrSPz5tFOJ87wsFyoUzCHKIQg5OF7uvMaobmOycmpi03exO9//P06R+76yATrq7AE3TPu/DAlEUBM8Np70u0Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Z2BMQNTNf9FpeV9YJxt0NtBbY5k9Zi1d6+76PHiAhlY=; b=jmrvXm/He0TzJSVfi5gTqSwYO53NwHZeNtsNCUwOgbzzWnvaycKHj+5oLGVsGs/TaYQZkfTcPPGMNbgiqkliftNtpFUaRsc6Wg0nWI8DAT4FGNBKoD9u1suX7OfjrcNL7wOeUqSZO23TqnoYUy0mtYtF1fiCtx273hDDk+/BOpQ= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=nxp.com; Received: from AM7PR04MB7157.eurprd04.prod.outlook.com (2603:10a6:20b:118::20) by AM6PR04MB4758.eurprd04.prod.outlook.com (2603:10a6:20b:f::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.21; Fri, 3 Jul 2020 06:25:39 +0000 Received: from AM7PR04MB7157.eurprd04.prod.outlook.com ([fe80::1101:adaa:ee89:af2a]) by AM7PR04MB7157.eurprd04.prod.outlook.com ([fe80::1101:adaa:ee89:af2a%3]) with mapi id 15.20.3153.023; Fri, 3 Jul 2020 06:25:39 +0000 From: Peter Chen To: mathias.nyman@intel.com Cc: linux-usb@vger.kernel.org, gregkh@linuxfoundation.org, linux-imx@nxp.com, Peter Chen Subject: [PATCH 2/2] usb: host: xhci-plat: add wakeup entry at /sys Date: Fri, 3 Jul 2020 14:25:32 +0800 Message-Id: <20200703062532.29076-2-peter.chen@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200703062532.29076-1-peter.chen@nxp.com> References: <20200703062532.29076-1-peter.chen@nxp.com> X-ClientProxiedBy: SG2PR02CA0024.apcprd02.prod.outlook.com (2603:1096:3:17::36) To AM7PR04MB7157.eurprd04.prod.outlook.com (2603:10a6:20b:118::20) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from b29397-desktop.ap.freescale.net (119.31.174.67) by SG2PR02CA0024.apcprd02.prod.outlook.com (2603:1096:3:17::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.23 via Frontend Transport; Fri, 3 Jul 2020 06:25:35 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [119.31.174.67] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 65011ca1-f7d6-40c1-fc6e-08d81f19e740 X-MS-TrafficTypeDiagnostic: AM6PR04MB4758: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3968; X-Forefront-PRVS: 045315E1EE X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GxNc0+aA7IEPy1yw0VwX5wszz14Eyf3R2ZQLz+L9Oxu8Pj0yMsNG0L+6mQCglFnnJtSXqwuuDyVhqC0gQLXjzvQlzrQp/FrGXxV253DmN8yBflskLm0DIUdTs7qelybXCfzQYPn+pjZyeabrLuvjoXkIfvEt4R3K/Qrkr/Ifi0Pt8ed4+1c/BfN0L9gnViG+NT5ZPJ9CdP6VWjb3yuQlTaiH35wvTNphgy+hwMiyqivwrYvDrBBSm/5t9rHMSDWHrXYgzby6qbBC3LFv4lwW5JD2Hx/ySAPdkpSGnebOx1AUQrv6PwOR4qLF82GrYLZbQiOgXDxUuZqBPElslEWJvg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7157.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(136003)(346002)(376002)(39860400002)(396003)(366004)(316002)(4326008)(478600001)(6512007)(956004)(2616005)(5660300002)(6486002)(36756003)(66556008)(66476007)(44832011)(1076003)(6666004)(52116002)(4744005)(66946007)(6916009)(16526019)(186003)(86362001)(26005)(2906002)(6506007)(83380400001)(8936002)(8676002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 2LnV2qTFXv6xHKB5Tdu1Idmp0iu5knwsnb4nHBVBn8mFilte/uXZAGBBR4hEUDXfrHEJxoAyFm40K8/iuDWQtQrePc+Y3nDKNTMzuuj4BkQH+rLhj4tXxN1PXbcD0+pyynH7a6tJW1pDmMOiGR8lMP8purnbBiv9YQ/z3o3PMh0AsQqoftd8ssgjxPKfI6BxPUuVA2ikuwGW6/kcFWPuaeUCsgISiNIbF16OhGryV8IFIOFoZlv1mvl2JIY4ZluiOCA0bzzfVOHoyllXHe6cQ0NZzbdmA6u1a4Ew1PzhXj3r6Gd2t4SZtP5t8Dz0zPqOYcqMk8ezJiI3oFS+eJqqjDBYNpu2Dst+l7oj9NMbtuEZDeyWqqOjvPbP68SL09Ywy4d+GcoTN0RqcZGk46scCF+YgUf0nbcgSzN3cg1qzU9NmmYLh0/05kwgHtzyqSsfm5gHmRwLz/MjvTqfzCg8QJ0xFU+0hsMbMEZ7v0FDMWw= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 65011ca1-f7d6-40c1-fc6e-08d81f19e740 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7157.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jul 2020 06:25:39.0301 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: /ewgMtwoby3AloWxNEbJFse3weUTj5ba83JbQNdSZj+is6jHXv68fumUt2rxJ3S4O3XQIVHMxaWVJ0WibpeMaA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB4758 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org After that, the user could enable controller as wakeup source for system suspend through /sys entry. Signed-off-by: Peter Chen --- drivers/usb/host/xhci-plat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index cebe24ec80a5..bb5d73f0a796 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c @@ -287,7 +287,7 @@ static int xhci_plat_probe(struct platform_device *pdev) *priv = *priv_match; } - device_wakeup_enable(hcd->self.controller); + device_set_wakeup_capable(hcd->self.controller, true); xhci->main_hcd = hcd; xhci->shared_hcd = __usb_create_hcd(driver, sysdev, &pdev->dev,