Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2067173imm; Thu, 20 Sep 2018 07:18:30 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ+P6WDTZDjnS5Hj2yRW6CI5scpQM2dhCA6VXcQDFL5WRNVQ4Jqg8vL1uKOfk3VYmO8iCg9 X-Received: by 2002:a63:5204:: with SMTP id g4-v6mr36928439pgb.274.1537453110512; Thu, 20 Sep 2018 07:18:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537453110; cv=none; d=google.com; s=arc-20160816; b=w1NxnbvKKSMPxbnqLE2D+YeIgI5fFuddiFyIKeLogBZ46pTmkoAgRejEho5mp6ZNds xcXZithfRaYYSAXOgmczYH2g5HsyHErIu1C0j8xytNGiySYiEEKEodCgGgLkBD700bVk tZ/8CbgYgUowcr0KTZlrXjCMyJQc+Q5Xvy6IU8+Ttf/XZD0kab2wFlFYcHWFiWp1Knuq FotMEPhVuH+g77oW2e9xH/snVNCWux1XjuPCZZG4IUvXzSmF7QPVJ49ER/jvQm4wCrgN wHmfqnJ+OKkBXbMO6Sz3LUoUbiuEFJ+MoTC3B/i3bViIF942YY1oyVHWhgMKijRqHeqA 26Bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:references:message-id:date :thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=6xQzVOwKVUOrjGdyt+aqdq9RxaA1tf8vgfgovWlmdO4=; b=ffjOK/VlXnr8ICUQSEs/IPCBrsS4pag/aNzKdnX9P0kulVAYxU5CMha6IZQCGNZIhe lyoAudPSFw6Jbu4G3DCS2I5NH3y5KTukBo5yIWGan7vAuoPuVbX5ARc66HSqfqK6l19T C+0M8DlpULC97UsIGtPrQD6QXTDNplyW6Fz0tJ6Xe/ypV26Gl5CLlmduCnLVIkvDDsYA Nnx2v/Rr54b14snPRK+KAv5KnNIKQP/idma1O1/Ks0kJ4svjk06tMI0Q+TLcq+cKfbBv ucMmavZxe3l8s8376DMbTOmcP1kCMIGu6WrgiPkPFbh7pryPnUZW7NpBmIe1rEeSvgOr AIsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=bm4oCCbu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n8-v6si23941419pgl.101.2018.09.20.07.18.14; Thu, 20 Sep 2018 07:18:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=bm4oCCbu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732638AbeITUB2 (ORCPT + 99 others); Thu, 20 Sep 2018 16:01:28 -0400 Received: from us01smtprelay-2.synopsys.com ([198.182.60.111]:49110 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730955AbeITUB2 (ORCPT ); Thu, 20 Sep 2018 16:01:28 -0400 Received: from mailhost.synopsys.com (mailhost3.synopsys.com [10.12.238.238]) by smtprelay.synopsys.com (Postfix) with ESMTP id 0706410C10A6; Thu, 20 Sep 2018 07:17:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1537453066; bh=zsBHOhLVohr7OcaQq3fOxdE6nhPN5+KuIYWWTghXlgE=; h=From:To:CC:Subject:Date:References:From; b=bm4oCCbuxDtIAMzw07qgfZj1LPDFpbRxdHJrn1wUyTPCWzORSZEJgaGBBQWZWgKlL LQLL2LC03EVyXztHF1P/0K7YeNxMmL4HIcedqTmA1NYn4NRKVf6Iw/+HVTUZvsENl8 Pd5TEqRdpA4ewm3JBPAvpUl0KqfWA6xkWeXCvqDBsHu3h4ZM6SAqniOAMmBO+nGV88 hoQPy8zxw46nyDUX2pvRgxL+9MTtP2wGrAUWNZxV5IysiuP5PlBOov6rUZT7wLQ+yi ismC8nHFaWZu5anHiaMPIoHDNWwikvrTw64TAsj/JZOi9bmhjLbFHtDMJEIRk5kTkP skxHAFgUyW3CA== Received: from US01WXQAHTC1.internal.synopsys.com (us01wxqahtc1.internal.synopsys.com [10.12.238.230]) by mailhost.synopsys.com (Postfix) with ESMTP id AF39A30F0; Thu, 20 Sep 2018 07:17:45 -0700 (PDT) Received: from AM04WEHTCB.internal.synopsys.com (10.116.16.192) by US01WXQAHTC1.internal.synopsys.com (10.12.238.230) with Microsoft SMTP Server (TLS) id 14.3.361.1; Thu, 20 Sep 2018 07:17:45 -0700 Received: from AM04WEMBXB.internal.synopsys.com ([fe80::1006:bcdd:1b7:579b]) by am04wehtcb.internal.synopsys.com ([::1]) with mapi id 14.03.0361.001; Thu, 20 Sep 2018 18:17:42 +0400 From: Artur Petrosyan To: John Stultz , Minas Harutyunyan CC: lkml , John Youn , Artur Petrosyan , Felipe Balbi , "linux-usb@vger.kernel.org" , Manivannan Sadhasivam Subject: Re: [PATCH] usb: dwc2: Fix HiKey regression caused by power_down feature Thread-Topic: [PATCH] usb: dwc2: Fix HiKey regression caused by power_down feature Thread-Index: AQHT7ws4O+8B/axYs0CeMD+6l4m0jQ== Date: Thu, 20 Sep 2018 14:17:42 +0000 Message-ID: <3AD91E696667BF4BA728303C178E8A63532AAF6D@am04wembxb.internal.synopsys.com> References: <1526690943-8211-1-git-send-email-john.stultz@linaro.org> <410670D7E743164D87FA6160E7907A5601313531E1@am04wembxa.internal.synopsys.com> <410670D7E743164D87FA6160E7907A560131356C4E@am04wembxa.internal.synopsys.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.116.104.32] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi John,=0A= =0A= On 5/23/2018 01:57, John Stultz wrote:=0A= > On Tue, May 22, 2018 at 7:24 AM, Minas Harutyunyan=0A= > wrote:=0A= >> Hi John,=0A= >>=0A= >> Please provide log with debug enabled configuration.=0A= > =0A= > Ok. Attached.=0A= > For dmesg-broken.log: OTG removed at 77, and OTG plugged in at 82=0A= > For dmesg-with-patch.log: OTG removed at 31, OTG plugged in at 38.=0A= > =0A= > Note with the dmesg-with-patch (using my patch), things seem to be=0A= > working ok. Though in the example above it may look odd, as usually it=0A= > switches to to host mode, then when it detects a low speed device (a=0A= > mouse which I had plugged in), it will reset to switch to low-speed,=0A= > but I didn't wait long enough for the reset to complete and the mouse=0A= > to be detected before re-plugging in the OTG port.=0A= > =0A= >> On 5/21/2018 11:41 PM, John Stultz wrote:=0A= >>> On Mon, May 21, 2018 at 1:45 AM, Minas Harutyunyan=0A= >>> wrote:=0A= >>>> Hi John,=0A= >>>>=0A= >>>> On 5/19/2018 4:49 AM, John Stultz wrote:=0A= >>>>> In 4.17-rc, commit 03ea6d6e9e1f ("usb: dwc2: Enable power down")=0A= >>>>> caused the HiKey board to not correctly handle switching between=0A= >>>>> usb-gadget and usb-host mode.=0A= >>>>>=0A= >>>>> Unplugging the OTG port would result in:=0A= >> OTG port you mean MicroAB, Correct?=0A= > =0A= > Correct.=0A= > =0A= >> dwc2 driver loaded when some device connected to OTG port?=0A= > =0A= > Yes, I normally boot with the board plugged in to OTG as a=0A= > peripheral/gadget for adb.=0A= > =0A= >> And below message printed after disconnect the device from OTG port?=0A= >>=0A= >>>>> [ 42.240973] dwc2 f72c0000.usb: dwc2_restore_host_registers: no hos= t registers to restore=0A= >>>>> [ 42.249066] dwc2 f72c0000.usb: dwc2_host_exit_hibernation: failed = to restore host registers=0A= > =0A= > Correct.=0A= > =0A= >>>>> And the USB-host ports would not function.=0A= >> USB-host ports - you mean 2 USB A-ports, connected to TS3USB221 HUB?=0A= > =0A= > Correct.=0A= > =0A= >> Switching ports between OTG and Host ports via TS3USB221 Switch=0A= >> performing automatically or by some SW tool?=0A= > =0A= > Its done automatically, when the OTG cable is detected it the host=0A= > ports are disabled and when the OTG port is empty the host ports are=0A= > enabled.=0A= > =0A= > Let me know if you need anything else!=0A= > =0A= > thanks=0A= > -john=0A= > =0A= =0A= Please apply the patch set with this cover letter "[PATCH 0/3] usb: =0A= dwc2: Fix hibernation for switching between host and device modes."=0A= =0A= Enable the power down on his devices. Let me know if you still see any =0A= issue. If there is no issue, please provide Tested-by tag.=0A= =0A= =0A= Regards,=0A= Artur=0A=