From patchwork Sun Oct 21 20:53:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hal Emmerich X-Patchwork-Id: 10651607 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 E4E4414E5 for ; Sun, 21 Oct 2018 20:53:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D412728744 for ; Sun, 21 Oct 2018 20:53:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C774C287D5; Sun, 21 Oct 2018 20:53:47 +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 3681328744 for ; Sun, 21 Oct 2018 20:53:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728073AbeJVFJS (ORCPT ); Mon, 22 Oct 2018 01:09:18 -0400 Received: from box.halemmerich.com ([172.104.217.94]:40069 "EHLO box.halemmerich.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727256AbeJVFJS (ORCPT ); Mon, 22 Oct 2018 01:09:18 -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 34E301E0D1; Sun, 21 Oct 2018 15:53:41 -0500 (CDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=halemmerich.com; s=mail; t=1540155221; bh=qq4HAPWK19PJogkTwn+ZYpE+3kVEi91XJDamP3zaFy0=; h=To:From:Subject:Date:From; b=rS/Yy6u4vtnVMdVir3tMs9lXDNvjROUYKgVOl9fXJSQUTtuujROfQRUhMYB4ME4sZ Ae2i52dsBkk4RTRdxeJG1e/8sKiChomNzEVst7R08tYpSVjosm+Xhv3Hszk+B9tCqw sgDSHPzHfdeXcDtUwxTwU9+FyXIqRSuzdAdwrNXkZv80n4CvcKhnrmvHSUJIm0Bi36 FUT7dvh+S9Q0yMkks4uU2LVWJfZrFOSd5cn2dPfvOMd/2YMSUMNyOb20El9Of9oP8s jpo0v4f26RqL3ufzT+0paslDrfMOCQuH8hcFQ/LF5y9kzn9WI9QhmzzJfbgg/ZIll8 sdlPSgWKE8Drg== To: felipe.balbi@linux.intel.com, linux-usb@vger.kernel.org, hminas@synopsys.com From: Hal Emmerich Subject: [PATCH] usb: dwc2: disable power_down on rockchip devices Message-ID: Date: Sun, 21 Oct 2018 15:53:40 -0500 MIME-Version: 1.0 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 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)