From patchwork Fri Sep 28 02:58:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hal Emmerich X-Patchwork-Id: 10618905 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 1924B15A6 for ; Fri, 28 Sep 2018 03:05:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 065E82B629 for ; Fri, 28 Sep 2018 03:05:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EAE422B79C; Fri, 28 Sep 2018 03:05: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 68B622B629 for ; Fri, 28 Sep 2018 03:05:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728530AbeI1J0j (ORCPT ); Fri, 28 Sep 2018 05:26:39 -0400 Received: from box.halemmerich.com ([172.104.217.94]:43279 "EHLO box.halemmerich.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728499AbeI1J0j (ORCPT ); Fri, 28 Sep 2018 05:26:39 -0400 X-Greylist: delayed 369 seconds by postgrey-1.27 at vger.kernel.org; Fri, 28 Sep 2018 05:26:39 EDT 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 6B6671E393; Thu, 27 Sep 2018 21:59:00 -0500 (CDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=halemmerich.com; s=mail; t=1538103540; bh=LnjM80MslLsfPbAw0yBOhJ5oAnTPZO8HyoUjHv7W6dg=; h=To:From:Subject:Date:From; b=sZnmILaP2QpeSnJeXkd4Mp2haAElSssRNg21Nub4W9QYpktFL+txnJ5B2CVP6lnR2 jx/4cDwTFmlAlsowSvxTQBgYzJrRmyyPFPCeFioY0JFqZ/eVRrhHqjBHzdBfaGaYzw Gu/gAyBWb2CSNFous+Snty4FH5IZcd2RqeZiEsSpLE25tzo06IahK8bbpZbDh46Gw3 ctNqEpY1ClBkeu9Kpf/Ni4yV1cO7K+sPiuj4vMezl8rD4RrdSUyCIld+Qj/yNN/W67 rnIhpmZvkgyE5yob6ZnYyYSPy/reTLFW6ENH7cg3zsAt4fE2xFPfzRD2bmUsN7ywLn +kfLgJjfYCfCA== To: hminas@synopsys.com, linux-usb@vger.kernel.org From: Hal Emmerich Subject: [PATCH] usb: dwc2: disable power_down on rockchip devices Message-ID: Date: Thu, 27 Sep 2018 21:58:59 -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 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 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)