Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1657606imm; Tue, 22 May 2018 07:26:00 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoRubgPfbzvdIMcqOYiT5UiOK9IAIP0dzB9L4oaz9voH+kbIOeAsDYiUUG6DnrannxxK7ld X-Received: by 2002:a17:902:a616:: with SMTP id u22-v6mr25499648plq.186.1526999160645; Tue, 22 May 2018 07:26:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526999160; cv=none; d=google.com; s=arc-20160816; b=epeKDKJF7npoIdrmHFxHx3kxpGtxNBzbTD9kM7ldOU/UwOrf+KQwT8/5MOqV9yLnYO FRpoJwmq0eZoTR086Ed4IsYzgEoQiAyt0pWxCCc39vkPXoqr+PFm+9D2mL9nNZ2zX1s0 CFx1W1R9jDLHmIFrKJyrQ2qkk/m9jqgERJRiyT8AZSxbMRuCs/2hefZG+XThTVRXyI1W 9o15GMs8v2B4Nw0HkaOf8yQIr9XRBObzluYKhqdFeEN/A95WXjj2/A7lg3iI+pIyr1/R rF/bVsSWILrmN+TMRqdkiExnrQc5Uv3xccZMkl3GEGl9ZsgWitg5VFunAK4fcazHB4UW FgNA== 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 :arc-authentication-results; bh=IihlR9Yip9f9/OEYZht7FTFfTpF9X94lgLZOsMjtvQw=; b=Jjzu88U/w6xmttn3Mx+1NqpJKHcdAe28mWKjAdaQtNJHab/Kme+V3RO51qpgJWZ00N uILeZxx8Izeu0R6DXeVV2LlDyfPp6s+lpyWMEQQO+cVbrC0aUtkDMfdkGhUHnwGmUfFA /5wpJ/opIhL99zQLV3uDrqYFmFMONJs+nDP3QO2QpyzuhjjFp+LwETum+hyvdEXJYzja suplUehxpVLUBD2eemnPrY0z/YbBbRmzq8oKD7E/wqcazus/7SMGzWZYTHVioVHwoAUT G3HyPfhZURpyMdFrK8pNAebmzS0MZGjPOjH44GiKnLDru69hcqmqFKL/Co5RRUfQ0FOF ByIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=NASOVZRX; 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 u19-v6si7480705pgv.79.2018.05.22.07.25.45; Tue, 22 May 2018 07:26:00 -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=NASOVZRX; 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 S1751630AbeEVOY6 (ORCPT + 99 others); Tue, 22 May 2018 10:24:58 -0400 Received: from smtprelay.synopsys.com ([198.182.37.59]:49522 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751586AbeEVOYz (ORCPT ); Tue, 22 May 2018 10:24:55 -0400 Received: from mailhost.synopsys.com (mailhost2.synopsys.com [10.13.184.66]) by smtprelay.synopsys.com (Postfix) with ESMTP id D79021E0490; Tue, 22 May 2018 16:24:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1526999094; bh=yssth9a34w/gHTQquYN4xRS8OKwecPqlDhqg2pTiBgc=; h=From:To:CC:Subject:Date:References:From; b=NASOVZRXoDw/Pgue5FQs1T7YaFO+mSkIW4xndvE0mw2gCm2s90WamNtrCXSim96xd vEJR5sL3fm3oLZgPdc6U9YjzjZIuqK2qId3Rm2rwaZsXDETJvEd05lJ4dyWF7ujzhP SbHbtv0omKQRSbRVgBgcjAiYx7yUivqXpjNovPZWNQeDJCO0Qez5ggbf6S8fo3cc78 RZnGTLBfIcwap8egdNiSD+Co/lYhY6ToRLHpOYMcT0RWFWbluiadRFPUdqZHi2kFHQ Ved4tBsOV367lIdW/t0hT1gbCRuFiX66H/eRHn5eSjK4Q/pJMfAI7EeqVU+lTcpZY+ iQg6yY1Haq9xw== Received: from US01WXQAHTC1.internal.synopsys.com (us01wxqahtc1.internal.synopsys.com [10.12.238.230]) by mailhost.synopsys.com (Postfix) with ESMTP id 32EE634A3; Tue, 22 May 2018 07:24:53 -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; Tue, 22 May 2018 07:24:51 -0700 Received: from AM04WEMBXA.internal.synopsys.com ([fe80::79c3:55f2:1f20:5bf4]) by am04wehtcb.internal.synopsys.com ([::1]) with mapi id 14.03.0361.001; Tue, 22 May 2018 18:24:48 +0400 From: Minas Harutyunyan To: John Stultz , Minas Harutyunyan CC: lkml , John Youn , Vardan Mikayelyan , Artur Petrosyan , Grigor Tovmasyan , Felipe Balbi , "linux-usb@vger.kernel.org" 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: AQHT7ws4+xyvQUj0rEqQiAqvmDphzw== Date: Tue, 22 May 2018 14:24:47 +0000 Message-ID: <410670D7E743164D87FA6160E7907A560131356C4E@am04wembxa.internal.synopsys.com> References: <1526690943-8211-1-git-send-email-john.stultz@linaro.org> <410670D7E743164D87FA6160E7907A5601313531E1@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.70.67] 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= Please provide log with debug enabled configuration.=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= dwc2 driver loaded when some device connected to OTG port?=0A= And below message printed after disconnect the device from OTG port?=0A= =0A= >>> [ 42.240973] dwc2 f72c0000.usb: dwc2_restore_host_registers: no host = registers to restore=0A= >>> [ 42.249066] dwc2 f72c0000.usb: dwc2_host_exit_hibernation: failed to= restore host registers=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= Switching ports between OTG and Host ports via TS3USB221 Switch =0A= performing automatically or by some SW tool?=0A= =0A= >>>=0A= >>> And plugging in the OTG port, we would see:=0A= >>> [ 46.046557] WARNING: CPU: 3 PID: 6 at drivers/usb/dwc2/gadget.c:260 = dwc2_hsotg_init_fifo+0x194/0x1a0=0A= >>> [ 46.055761] CPU: 3 PID: 6 Comm: kworker/u16:0 Not tainted 4.17.0-rc5= -00030-ge67da8c #231=0A= >>> [ 46.055767] Hardware name: HiKey Development Board (DT)=0A= >>> [ 46.055784] Workqueue: dwc2 dwc2_conn_id_status_change=0A= >>> ...=0A= >>>=0A= >> Could you please send full log to debug.=0A= > =0A= > Full dmesg log attached.=0A= > =0A= > I unplugged the usb-otg port at 136=0A= > and replugged it back in at 141=0A= > =0A= > =0A= >>> p->uframe_sched =3D false;=0A= >>> p->change_speed_quirk =3D true;=0A= >>> + p->power_down =3D false;=0A= >>=0A= >> power_down declared as int, suggested to update as follow:=0A= >> p->power_down =3D DWC2_POWER_DOWN_PARAM_NONE;=0A= >>=0A= >> This can be accepted as temporary solution until we will fully debug=0A= >> hibernation feature for HiKey platform.=0A= > =0A= > Ok, will re-send with the suggested change above.=0A= > =0A= > thanks=0A= > -john=0A= > =0A= =0A=