From patchwork Fri Oct 31 03:11:19 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Rui X-Patchwork-Id: 5201881 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D1F2F9F349 for ; Fri, 31 Oct 2014 03:14:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ECD60201ED for ; Fri, 31 Oct 2014 03:14:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 133EF201B4 for ; Fri, 31 Oct 2014 03:14:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933559AbaJaDNo (ORCPT ); Thu, 30 Oct 2014 23:13:44 -0400 Received: from mail-bn1on0143.outbound.protection.outlook.com ([157.56.110.143]:13568 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S934093AbaJaDNS (ORCPT ); Thu, 30 Oct 2014 23:13:18 -0400 Received: from BY2PR02CA0027.namprd02.prod.outlook.com (10.141.216.17) by BY2PR02MB201.namprd02.prod.outlook.com (10.242.232.12) with Microsoft SMTP Server (TLS) id 15.1.6.9; Fri, 31 Oct 2014 03:13:15 +0000 Received: from BY2FFO11FD024.protection.gbl (2a01:111:f400:7c0c::110) by BY2PR02CA0027.outlook.office365.com (2a01:111:e400:2c40::17) with Microsoft SMTP Server (TLS) id 15.1.11.14 via Frontend Transport; Fri, 31 Oct 2014 03:13:15 +0000 Received: from atltwp01.amd.com (165.204.84.221) by BY2FFO11FD024.mail.protection.outlook.com (10.1.15.213) with Microsoft SMTP Server id 15.1.6.13 via Frontend Transport; Fri, 31 Oct 2014 03:13:14 +0000 X-WSS-ID: 0NEAGY1-07-7XT-02 X-M-MSG: Received: from satlvexedge02.amd.com (satlvexedge02.amd.com [10.177.96.29]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by atltwp01.amd.com (Axway MailGate 5.3.1) with ESMTPS id 29085CAE608; Thu, 30 Oct 2014 22:13:12 -0500 (CDT) Received: from SATLEXDAG02.amd.com (10.181.40.5) by SATLVEXEDGE02.amd.com (10.177.96.29) with Microsoft SMTP Server (TLS) id 14.3.195.1; Thu, 30 Oct 2014 22:13:13 -0500 Received: from SCYBEXDAG03.amd.com (10.34.11.13) by SATLEXDAG02.amd.com (10.181.40.5) with Microsoft SMTP Server (TLS) id 14.3.195.1; Thu, 30 Oct 2014 23:13:13 -0400 Received: from hr-ub.amd.com (10.237.75.143) by SCYBEXDAG03.amd.com (10.34.11.13) with Microsoft SMTP Server id 14.3.195.1; Fri, 31 Oct 2014 11:13:10 +0800 From: Huang Rui To: Felipe Balbi , Alan Stern , "Bjorn Helgaas" , Greg Kroah-Hartman CC: Paul Zimmerman , Heikki Krogerus , Sergei Shtylyov , Jason Chang , Vincent Wan , Tony Li , , , , , Huang Rui Subject: [PATCH v5 8/8] usb: dwc3: point host-mode hibernation enablement not device-mode Date: Fri, 31 Oct 2014 11:11:19 +0800 Message-ID: <1414725079-11490-9-git-send-email-ray.huang@amd.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1414725079-11490-1-git-send-email-ray.huang@amd.com> References: <1414725079-11490-1-git-send-email-ray.huang@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:165.204.84.221; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(428002)(189002)(199003)(77156001)(101416001)(97736003)(107046002)(31966008)(229853001)(50226001)(36756003)(15975445006)(76176999)(105586002)(106466001)(102836001)(68736004)(95666004)(15395725005)(120916001)(85306004)(4396001)(33646002)(104166001)(99396003)(87286001)(47776003)(20776003)(46102003)(80022003)(86362001)(85852003)(50466002)(19580405001)(15202345003)(19580395003)(76482002)(92566001)(92726001)(48376002)(44976005)(62966002)(21056001)(77096002)(88136002)(50986999)(53416004)(93916002)(64706001)(87936001)(84676001)(89996001)(2171001)(6606295002); DIR:OUT; SFP:1102; SCL:1; SRVR:BY2PR02MB201; H:atltwp01.amd.com; FPR:; MLV:sfv; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:BY2PR02MB201; X-Forefront-PRVS: 03818C953D Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Authentication-Results: spf=none (sender IP is 165.204.84.221) smtp.mailfrom=Ray.Huang@amd.com; X-OriginatorOrg: amd4.onmicrosoft.com Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since the discussion of below thread, current enablement works for host-mode, device-mode hibernation is not implemented yet. http://marc.info/?l=linux-usb&m=141452396814414&w=2 Signed-off-by: Huang Rui --- drivers/usb/dwc3/core.c | 7 ++++++- drivers/usb/dwc3/gadget.c | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 8753792..a785fdd 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -512,8 +512,13 @@ static int dwc3_core_init(struct dwc3 *dwc) reg &= ~DWC3_GCTL_DSBLCLKGTNG; break; case DWC3_GHWPARAMS1_EN_PWROPT_HIB: - /* enable hibernation here */ dwc->nr_scratch = DWC3_GHWPARAMS4_HIBER_SCRATCHBUFS(hwparams4); + /* + * Enable hibernation here. + * + * Enabling this bit so that host-mode hibernation will + * work, device-mode hibernation is not implemented yet. + */ reg |= DWC3_GCTL_GBLHIBERNATIONEN; break; default: diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 01e22d7..398c12f 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -2300,7 +2300,7 @@ static void dwc3_gadget_conndone_interrupt(struct dwc3 *dwc) /* * When dwc3 revisions >= 2.40a, LPM Erratum is enabled and * DCFG.LPMCap is set, core responses with an ACK and the - * BESL value in the LPM token is less than or equal to lPM + * BESL value in the LPM token is less than or equal to LPM * NYET threshold. */ WARN_ONCE(dwc->revision < DWC3_REVISION_240A