From patchwork Wed Jun 6 02:04:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Chen X-Patchwork-Id: 10449535 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3C1F760375 for ; Wed, 6 Jun 2018 02:06:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2A55529B4E for ; Wed, 6 Jun 2018 02:06:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1EF4429B54; Wed, 6 Jun 2018 02:06:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 71E2A29B4E for ; Wed, 6 Jun 2018 02:06:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752646AbeFFCGF (ORCPT ); Tue, 5 Jun 2018 22:06:05 -0400 Received: from mail-ve1eur01on0067.outbound.protection.outlook.com ([104.47.1.67]:38240 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752479AbeFFCGE (ORCPT ); Tue, 5 Jun 2018 22:06:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MsAvrF8VecfOLbTYqoScr9/W6x0EWVro+mH+z2Ay0X0=; b=Y1teLt+IMzFVjgiZ734Wwj53o8nVHVFzTPP+Y8S+rX1RJoTrnsG90cvF6vynyspBfUl7WZYPV4CONlH0mD+Yg5vmtQZinOC/zZcGzynlZexBhfKFuKqUs/+dOkDv7eoCp1t4JbPPgB2p1ijAj/w+4Tq71CoqVnpBz7X9NXXmKA4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=peter.chen@nxp.com; Received: from b29397-desktop.ap.freescale.net (119.31.174.66) by VI1PR04MB1454.eurprd04.prod.outlook.com (2a01:111:e400:5349::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.820.15; Wed, 6 Jun 2018 02:05:59 +0000 From: Peter Chen To: linux-usb@vger.kernel.org Cc: linux-imx@nxp.com, Peter Chen , Martin Blumenstingl Subject: [PATCH 1/1] usb: chipidea: host: fix disconnection detect issue Date: Wed, 6 Jun 2018 10:04:28 +0800 Message-Id: <20180606020428.3716-1-peter.chen@nxp.com> X-Mailer: git-send-email 2.14.1 MIME-Version: 1.0 X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: HK0P153CA0015.APCP153.PROD.OUTLOOK.COM (2603:1096:203:18::27) To VI1PR04MB1454.eurprd04.prod.outlook.com (2a01:111:e400:5349::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:VI1PR04MB1454; X-Microsoft-Exchange-Diagnostics: 1; VI1PR04MB1454; 3:qV/BwW/zcyq4Ld5KyVTPJcvE3ppK+F8dc3jiLRWODHFXB0B6pVteq9LMq7X5QewsrU2bIecaSbDQ6mCS2Wo5ua3Bjodwf4L++FxbaGf79TEdv46xxmo+fsVsBAnTr9yPl1bMHmQFea6Pdx1XujUGpJhW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qxvTL6wgjjrnIlOMwRgSd6se+/1aT06Fuu7pM6w3LBXgjiTQhs1fYyXo3T+ZqllfH5OPW2CoeUpTRRSH9NTwt6IHs9EmU7ULNvsogJspWVz6RmTZ9W1sewKuZVw4jetG01LBflKTGcEWQ03jYmyRtFcaOZ+Jb68Uw5gnu7TMcsWkaUrCC/oeYvQqhxyNtR9L; 4:QK7qhQKEVADEJ3EXNFvBplSs4aQAo2ot9WZM5AR60qPwS8qn3gp1WXJNG47C2YYJCAI1SXHoZInxFhWL3o35B+ZPIqxa2UcVrBRU0UixRAlchH1QxSTGuoAKJYooF3AnzRRXwkjXdjdBNQwhKfvy3/FQMm8npN7Xt8eKnm6LQBeMuKO1PObEeKxsLRnQ0Vm5dSEdEufQ9en3vlakqKIFO6Rki0zcqPjnX4rVQGn6hOcQJwyUA7AcuoiqOgcBiX5Zh6U7fLdJV2bxQg+08ENPqXciz/frQpuagZSiLftzOb9q3lF/vmSV1gGZNKGzthJyQ60oeeAOKo4Nrh3OmrHhSxjUyiTO2sXiHN7jE4cMP6LTHB6UAQZF0nRlHoCy5i8M X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(85827821059158)(8415204561270); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93001095)(3231254)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123560045)(6072148)(201708071742011)(7699016); SRVR:VI1PR04MB1454; BCL:0; PCL:0; RULEID:; SRVR:VI1PR04MB1454; X-Forefront-PRVS: 06952FC175 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(346002)(396003)(39860400002)(366004)(39380400002)(189003)(199004)(486006)(44832011)(59450400001)(6666003)(478600001)(81166006)(6506007)(476003)(316002)(54906003)(1076002)(4326008)(386003)(956004)(50226002)(105586002)(26005)(2906002)(7736002)(2361001)(106356001)(305945005)(2616005)(68736007)(25786009)(6512007)(16526019)(8936002)(186003)(8676002)(2351001)(97736004)(16586007)(47776003)(6486002)(51416003)(3846002)(6116002)(50466002)(48376002)(66066001)(53936002)(52116002)(36756003)(86362001)(6916009)(5660300001)(81156014); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB1454; H:b29397-desktop.ap.freescale.net; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR04MB1454; 23:Fc58ANnbKPRijLdNsa5o28hefq5H6f8jclHVtZXeD?= =?us-ascii?Q?HwIRjF9hEI/uOR0L18qIe1EgfBi7rihQlp8+A7Ac3vW+qAzYZzvbp18fI9Vd?= =?us-ascii?Q?yKDD8xv6cF+NWRMoIHW3duWmh6FuqtddOt+gmbZICQnr3Rl6Ctjqf1LP8QA7?= =?us-ascii?Q?gd7yULfZgFJxrYbvqVpzYQ7t/mrajCfC0Vt0e271k24stOSC0hFGdoi6gehX?= =?us-ascii?Q?mLVuyq51ZFpbZiDPrpznANxVW5If1aU1QIsP1OdiiGujHVoZDoaHXFXcTZXo?= =?us-ascii?Q?kDSf0ilcSgHjMR0c4C/iRanvvGhCBiqRcnhzmvqKC8Gs6SP63FyWVp4WuxWK?= =?us-ascii?Q?hEWY9433oC8sldjvpmifUTrNVM4RSx8qMnv1kkzAf9oMZGJujOpj1X6aWZUC?= =?us-ascii?Q?/Qq+R+IoxZwgu1lYxgdQHOcWV8SIWFAN0V6VW6VU2DroysB+g+dPoa7EJhcJ?= =?us-ascii?Q?48XeT3eFvUOdXKVsIvZantWYx9szoPahOlW7kEPHwxZrrcyce88087wpbURc?= =?us-ascii?Q?mN8TxZdc4/gtR/9otaicY6sHgGCZdLayOQUtoRc29zuomumMl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-Microsoft-Exchange-Diagnostics: 1; VI1PR04MB1454; 6:cos5R6W1egCfMczaXq/iNHTYRFXaMq8sGmJsXDTHq+62a5wZhxt6Jzlgf+flsCD2URKXwN+v+QLnXCbnG8jVoa/D99ZOZOhRx2ukRK3XHsUmtmzw6bVoysjvIT5m6grPpJWC7mPU1xCvd4UL1+7g9ZEQKvL61POFfAKOTzlJbJ2a8/3mBiD+THB9fsGqb0j1sfDRbAYl/tewQB+iLgazHWDkNqK6XTW2DySZjGFi1qkrYeK4VSvYYeKGBM8BtxpCwRUP6Y6TVH3ycYLJ7YXV52JUw3ahMfftFJF98rxyM8BTzW0Fzd9Mx8ESXJMuIHY5pkE2jSATrU9gDY1u/A+fJEldqEW2x0wumznnIcRI+fyn7i8BDyRREMUGdLmYjG9x14UONsq4TLaw3SKudeAhWgf08vZe7wBGmcd8KrKsJVe+WZ2dpeWXJAHPy4Iz0bynJ+2yWzD7nC+Za7XlDkyrwQ==; 5:oCIqVg5a455S1OcIc5jGRBaaPHn18aUzscPTShzazbxAnPngqkuEVB/5UyHQS16/8Co6SA6tfpuTrj96ZoeOobVn07Q/vVo59duYp6p0SmdojO/geXT2P/GS2J2IMB3DQehWhLYxtFqhiOxrukiKBmBlbrFG/eYUl0x1qFpMMOA=; 24:3o3N096l1zXisdhisW6HsybE3vtRenmgTSPtpY4Q3AbKeFjFuI4Xzv4hN2jyZCOOGlJi8uluLHnjkq/MlXREX32qQ16N7y2RwK/zf9RyYpo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR04MB1454; 7:EXmnslw0Xn7enAptpx50yw2pqUaTzOcWQwkxQ6a8y9k3BYhNCSne345pQgEMdxWYJjJAHD8VSqxLcrQF+v/w1ZNe4iqdsM6vbEpVKjb0pEWph0P924ZDz5eH0IUsNfroAYyXHttBg4uPlmxulSJCBJRDjr8FDTT3UEdDut+vq6mbBjYCSUZ2t19qIvykN2EZxsIuLaK3XVaZVTKuaU+dbIgNT0i9XJa4DSQ6PpGdOoZMZt2gm5TwApZ92TeJOT1G X-MS-Office365-Filtering-Correlation-Id: fe55e719-0331-4488-aa03-08d5cb520cf6 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2018 02:05:59.1635 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fe55e719-0331-4488-aa03-08d5cb520cf6 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB1454 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The commit 4e88d4c08301 ("usb: add a flag to skip PHY initialization to struct usb_hcd") delete the assignment for hcd->usb_phy, it causes usb_phy_notify_connect{disconnect) are not called, the USB PHY driver is not notified of hot plug event, then the disconnection will not be detected by hardware. Fixes: 4e88d4c08301 ("usb: add a flag to skip PHY initialization to struct usb_hcd") Cc: Martin Blumenstingl Reported-by: Mats Karrman Signed-off-by: Peter Chen Tested-by: Mats Karrman Acked-by: Martin Blumenstingl --- drivers/usb/chipidea/host.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c index af45aa3222b5..4638d9b066be 100644 --- a/drivers/usb/chipidea/host.c +++ b/drivers/usb/chipidea/host.c @@ -124,8 +124,11 @@ static int host_start(struct ci_hdrc *ci) hcd->power_budget = ci->platdata->power_budget; hcd->tpl_support = ci->platdata->tpl_support; - if (ci->phy || ci->usb_phy) + if (ci->phy || ci->usb_phy) { hcd->skip_phy_initialization = 1; + if (ci->usb_phy) + hcd->usb_phy = ci->usb_phy; + } ehci = hcd_to_ehci(hcd); ehci->caps = ci->hw_bank.cap;