Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4177135pxb; Mon, 8 Feb 2021 09:41:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJzN3MBbpoq7aArJ/7RI9uBkymk0sTU8CVjjxCgn2EbJQ6IIXP6tejt9Fh8dHOGaR7fR/MxM X-Received: by 2002:aa7:da8b:: with SMTP id q11mr17741521eds.325.1612806080356; Mon, 08 Feb 2021 09:41:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612806080; cv=none; d=google.com; s=arc-20160816; b=QU3evyh2+pOrSRLcgBNZUeSLvXFZIlWlTvhCM+BKmRwRiUH/jeBrh3fze/bGje21zR VKOY+rKiwxxDVuYkozFRwaL0kF/o7aB0T0J7zEEYo834qC/+NsLdnEKudglBRQpmHBmB +pICXsJwCs0uenZ160IWngtSYoi6fZzxfie+J4ZOa00Os89pqB/1ASDgd2ZOwxQAH/qF J5XTG4pTCT9vbrux5NEDt21VSRN0/vkHwiVxh6Z7mcqscaKZTUU0xksVrCueRbnQymAV DAuiMEJoIF61LsoZooPzx9Nk5qtHWRCdEvBn9KfPPw235EGECntdOVW2KVNRtwVD3AX5 1yoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=JFHDNeHXIojysfW3z4FiC04O6x56A7jcZ7a/AWzJMzY=; b=tB9sefRp6fHUOI6Q1ZH+stNisiEB+QXZelpZYk+3MCwMMkxcbLKtSUapNwFZSMeWtm XEy9oq677SuBl0PhxMuSMJWUA/Fy8h+5rfXHQ5zQrL7VNw99yw5M/KuPh0sjtL+mXH1i cJqGS6sP1cEbbEUiRWjYM1ovZo8brrg+XQdAdzCoIwaSzisByDoEGzGSP+V2hAP9uUle yCCL/t68gjKQfdUgGhEZb/Hdgu4qAmr5F1F7DIb/ALJOo5llrL3KP0ZB/4w6sIlwF3wW /s4jEtrQZB2d0CLgklIWt16VmY81/PDpmBxcS22Ij6NeQohFwbRE+iiMpbyfYoqb+S2a pN2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="rBE/CucI"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id sb11si10948785ejb.0.2021.02.08.09.40.55; Mon, 08 Feb 2021 09:41:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="rBE/CucI"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233747AbhBHRjv (ORCPT + 99 others); Mon, 8 Feb 2021 12:39:51 -0500 Received: from mail.kernel.org ([198.145.29.99]:60982 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231784AbhBHPSV (ORCPT ); Mon, 8 Feb 2021 10:18:21 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6438464EDF; Mon, 8 Feb 2021 15:12:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612797150; bh=qRuLJUMfiY7OZtwcty28WZv6RnVTdlnsWF+x0Y0dfDo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rBE/CucIalwir0u1BtabkI+ay15gTLLCfx0GeeRbem8XkM5CM4HZm1QPF0RdbN4xO LEqDc0RvEbi2k0SZ0tQnyDYfMy1ZJIrTU2Cdr/I3BPZgGe1N7k63TWlLyBEpUBIEkl EyIB5aIW9/Q//PC0cw9OOtdY3Wpl0/Hcb/EhMIkw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Gary Bisson Subject: [PATCH 5.10 010/120] usb: dwc3: fix clock issue during resume in OTG mode Date: Mon, 8 Feb 2021 15:59:57 +0100 Message-Id: <20210208145818.804591186@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210208145818.395353822@linuxfoundation.org> References: <20210208145818.395353822@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Gary Bisson commit 0e5a3c8284a30f4c43fd81d7285528ece74563b5 upstream. Commit fe8abf332b8f ("usb: dwc3: support clocks and resets for DWC3 core") introduced clock support and a new function named dwc3_core_init_for_resume() which enables the clock before calling dwc3_core_init() during resume as clocks get disabled during suspend. Unfortunately in this commit the DWC3_GCTL_PRTCAP_OTG case was forgotten and therefore during resume, a platform could call dwc3_core_init() without re-enabling the clocks first, preventing to resume properly. So update the resume path to call dwc3_core_init_for_resume() as it should. Fixes: fe8abf332b8f ("usb: dwc3: support clocks and resets for DWC3 core") Cc: stable@vger.kernel.org Signed-off-by: Gary Bisson Link: https://lore.kernel.org/r/20210125161934.527820-1-gary.bisson@boundarydevices.com Signed-off-by: Greg Kroah-Hartman --- drivers/usb/dwc3/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -1758,7 +1758,7 @@ static int dwc3_resume_common(struct dwc if (PMSG_IS_AUTO(msg)) break; - ret = dwc3_core_init(dwc); + ret = dwc3_core_init_for_resume(dwc); if (ret) return ret;