From patchwork Fri Jul 20 03:25:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hal Emmerich X-Patchwork-Id: 10535905 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 A0A32600F4 for ; Fri, 20 Jul 2018 03:25:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8544B29D61 for ; Fri, 20 Jul 2018 03:25:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8362D29D57; Fri, 20 Jul 2018 03:25:18 +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 DE26C29ACD for ; Fri, 20 Jul 2018 03:25:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726454AbeGTELU (ORCPT ); Fri, 20 Jul 2018 00:11:20 -0400 Received: from box.halemmerich.com ([172.104.217.94]:38101 "EHLO box.halemmerich.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726439AbeGTELU (ORCPT ); Fri, 20 Jul 2018 00:11:20 -0400 Received: from authenticated-user (box.halemmerich.com [172.104.217.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by box.halemmerich.com (Postfix) with ESMTPSA id 3CC0E21A5E for ; Thu, 19 Jul 2018 22:25:13 -0500 (CDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=halemmerich.com; s=mail; t=1532057113; bh=LnjM80MslLsfPbAw0yBOhJ5oAnTPZO8HyoUjHv7W6dg=; h=Subject:From:To:References:Date:In-Reply-To:From; b=J23J0y4R0p1hKDi+ShkAAGC5JtK3O9kX20daH6m2C6BMuJdL8A4/rMN8t+cJ6aV3U VHAg5mcxuF6l/flI6M5OloaxO7E+ALK2fXnjhInIpkDE+qH9xVMwF6U/WwdcXlwwHW 5+QK/+SatPWR0OQzjJEqaD8luRJfYy+/iDSt90Y5PKMTKtYynKwIoMCsD1Mlnhg0SZ 77e+2vUZ8K0W22lRQnNvRbyT5Syri1jBzHbnr2kFoPHqNyrM5mvGcrd6vr8hegXqK6 eMnGZ3kPFVlM4QebZgzFCp5TzdoKoMpCJDx4kYgEVuEPKyDOf3ckRAF8frwQN1mvQ4 dqAPdVYWAjhBw== Subject: [PATCH] usb: dwc2: disable power_down on rockchip devices From: Hal Emmerich To: linux-usb@vger.kernel.org References: <74ceff0c-cfba-27c6-8f2f-7cc4657edbad@gmail.com> <74b9d418-8fcb-09c0-4ff9-0c34d3837341@halemmerich.com> Message-ID: <3c89f0fc-349d-c378-2412-fcedff10bbf0@halemmerich.com> Date: Thu, 19 Jul 2018 22:25:12 -0500 MIME-Version: 1.0 In-Reply-To: <74b9d418-8fcb-09c0-4ff9-0c34d3837341@halemmerich.com> Content-Language: en-US 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 From 04fbf78e4e569bf872f1ffcb0a6f9b89569dc913 Mon Sep 17 00:00:00 2001 From: Hal Emmerich Date: Thu, 19 Jul 2018 21:48:08 -0500 Subject: [PATCH] usb: dwc2: disable power_down on rockchip devices  The bug would let the usb controller enter partial power down,  which was formally known as hibernate, upon boot if nothing was plugged  in to the port. Partial power down couldn't be exited properly, so any  usb devices plugged in after boot would not be usable.  Before the name change, params.hibernation was false by default, so  _dwc2_hcd_suspend() would skip entering hibernation. With the  rename, _dwc2_hcd_suspend() was changed to use  params.power_down  to decide whether or not to enter partial power down.  Since params.power_down is non-zero by default, it needs to be set  to 0 for rockchip devices to restore functionality.  This bug was reported in the linux-usb thread:  REGRESSION: usb: dwc2: USB device not seen after boot  The commit that caused this regression is:  6d23ee9caa6790aea047f9aca7f3c03cb8d96eb6 Signed-off-by: Hal Emmerich Acked-by: Minas Harutyunyan ---  drivers/usb/dwc2/params.c | 1 +  1 file changed, 1 insertion(+) -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c index f03e41879224..492607adc506 100644 --- a/drivers/usb/dwc2/params.c +++ b/drivers/usb/dwc2/params.c @@ -82,6 +82,7 @@ static void dwc2_set_rk_params(struct dwc2_hsotg *hsotg)         p->host_perio_tx_fifo_size = 256;         p->ahbcfg = GAHBCFG_HBSTLEN_INCR16 <<                 GAHBCFG_HBSTLEN_SHIFT; +       p->power_down = 0;  }  static void dwc2_set_ltq_params(struct dwc2_hsotg *hsotg)