From patchwork Fri Oct 26 14:38:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hal Emmerich X-Patchwork-Id: 10657455 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C587913A9 for ; Fri, 26 Oct 2018 14:38:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ACDB22C83F for ; Fri, 26 Oct 2018 14:38:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AB4F92C8EF; Fri, 26 Oct 2018 14:38:10 +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.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 236DC2C8E3 for ; Fri, 26 Oct 2018 14:38:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727372AbeJZXP0 (ORCPT ); Fri, 26 Oct 2018 19:15:26 -0400 Received: from box.halemmerich.com ([172.104.217.94]:59645 "EHLO box.halemmerich.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726243AbeJZXP0 (ORCPT ); Fri, 26 Oct 2018 19:15:26 -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 57C231E113; Fri, 26 Oct 2018 09:38:07 -0500 (CDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=halemmerich.com; s=mail; t=1540564687; bh=ONijSO2mqNT9RIi4VGiy3RXRg85CpuV8sJpTRsOs5Ws=; h=Subject:References:To:From:Date:In-Reply-To:From; b=Rm1Nx4KfYiMtnoIQuPcn0/eB3JiXwNM2CUkY1gjezEYerZV+8zUtUcG+jD5J7qqlx du+9hd7vbHEDLNOwzXO6qZeIONz8xfDv+lnn1GLMQTM2NmTe+J5OOdkIRpeA8+BzVG q5LyocUCgARvvOuLkvZCzQ8Xr8s7UFdfBEm5/w0qPZFjSypMNCRsM6YFpnUh9220kB GAjZjQY+RuA2KOKfOITWHm951pHNKEIQXCkfyWwBLhcqJR8frtI28WqXWYHut+kOab EykylcwhJaQTETzzZXxUpDELZHXEdqPFuypCiOOiLBjeKlB1wWylKkKPqVvSUKtYCi F0/uZpvNQUIIQ== Subject: [RESEND PATCH v2] usb: dwc2: disable power_down on rockchip for regression References: To: felipe.balbi@linux.intel.com, linux-usb@vger.kernel.org, hminas@synopsys.com From: Hal Emmerich X-Forwarded-Message-Id: Message-ID: Date: Fri, 26 Oct 2018 09:38:06 -0500 MIME-Version: 1.0 In-Reply-To: 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 Acked-by: Minas Harutyunyan for v2 --- drivers/usb/dwc2/params.c | 1 + 1 file changed, 1 insertion(+) -- 2.11.0 diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c index bf7052e037d6..09292dc977e4 100644 --- a/drivers/usb/dwc2/params.c +++ b/drivers/usb/dwc2/params.c @@ -81,6 +81,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)