Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2490785pxj; Mon, 10 May 2021 04:22:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzT+k6jT+0r++u9dA1BBxvT4v0lw+ADijWNViGzprNp+DC1fko+BLwKrnmX2H3Aay60YDOy X-Received: by 2002:a05:6e02:12cb:: with SMTP id i11mr20936305ilm.221.1620645749900; Mon, 10 May 2021 04:22:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620645749; cv=none; d=google.com; s=arc-20160816; b=jiKJHLZFQosDMB8yiL7jzeZmGdiKWN9VFB1P0ncnOPwomlAV1w6ZE1b8MaF7ngM7sX OKu872QZZzZNYN95cwSaljG23LdorBOLTkq7UFapaoFNoYJacCQBu9IXJG+gHgtqRAwJ LjMc+3eLdc8IMHNzP5i2uEq+fp0EDnD3sf6+ieWOkccfnUoQkO/S8fwqXgqyJ9GkHW3q VaVvbNQ+tBAVxJ2S/q1lRB64VvACdT6ScoZmpTrZH6KmJi4S9KZ4gF266DILVavWp1Ff zYPafD5HK1fkH36tG/6ZCpZstMHvfqSEmTEv1ZVjCauARgoI7SD25wR5snK0MmvAE3vS Z3XA== 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=WFMBsjwDEicjKCmFJYxhCh3+BFHYUmEw8UfxjwWOIl0=; b=eRQ+8wp+UYUhKXXyNoMDd43WBga8EdX/GzBJBG3bkF7EcgzlfIA/mPi9QKTk4oYdUv iI0UqBrd6ezeWByZISNR+uToXyu+6QutqjQjjRdAFU8qlNw/cFL6DJvCkNut8BTbq2kW g53J0b8a3BgHP6enVSyDg6uDr1sFxdFO8KYiOW7yoXTFxZtrDa7K0p3JWm8lm7zxMfFt ByxhA8J/GqcMxLMGxMREHerlUsSoXWbs1f+rzQB9vQVmZBETvJg/CCUf671cvOX4l0Sr oEO+quYVSM5aEIHefZnGp7N1jgF9brBN07dOjOQm3/eLWmaLF6bRpYrsnVUCY508iw/O /pgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="Q/4/xoy8"; 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 u11si6784320ill.6.2021.05.10.04.22.17; Mon, 10 May 2021 04:22:29 -0700 (PDT) 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="Q/4/xoy8"; 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 S238702AbhEJLSj (ORCPT + 99 others); Mon, 10 May 2021 07:18:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:52754 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233854AbhEJKzb (ORCPT ); Mon, 10 May 2021 06:55:31 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B923361C23; Mon, 10 May 2021 10:42:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620643367; bh=3Ufg7xo03ya1yrgPAz1RlfrVuRck0My3z2pCiLPXPmo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q/4/xoy8u3ESTpf9d2v0tKhByNZR4xqvp+/YhmX2JW8tety6mzGQUS0wB3mhPCFHr x6NodW/vxwHrQ5ekHpL+cp6QqsPCqAMLg6wMnN//WhjZLo8jDN42dqIE2UggrtPCHt w10d03OngnUsZG/TzqpF2sXke3NFNM+fGQ/9KhMU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Minas Harutyunyan , Artur Petrosyan Subject: [PATCH 5.10 287/299] usb: dwc2: Fix session request interrupt handler Date: Mon, 10 May 2021 12:21:24 +0200 Message-Id: <20210510102014.397584862@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210510102004.821838356@linuxfoundation.org> References: <20210510102004.821838356@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: Artur Petrosyan commit 42b32b164acecd850edef010915a02418345a033 upstream. According to programming guide in host mode, port power must be turned on in session request interrupt handlers. Fixes: 21795c826a45 ("usb: dwc2: exit hibernation on session request") Cc: Acked-by: Minas Harutyunyan Signed-off-by: Artur Petrosyan Link: https://lore.kernel.org/r/20210408094550.75484A0094@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman --- drivers/usb/dwc2/core_intr.c | 8 ++++++++ 1 file changed, 8 insertions(+) --- a/drivers/usb/dwc2/core_intr.c +++ b/drivers/usb/dwc2/core_intr.c @@ -307,6 +307,7 @@ static void dwc2_handle_conn_id_status_c static void dwc2_handle_session_req_intr(struct dwc2_hsotg *hsotg) { int ret; + u32 hprt0; /* Clear interrupt */ dwc2_writel(hsotg, GINTSTS_SESSREQINT, GINTSTS); @@ -327,6 +328,13 @@ static void dwc2_handle_session_req_intr * established */ dwc2_hsotg_disconnect(hsotg); + } else { + /* Turn on the port power bit. */ + hprt0 = dwc2_read_hprt0(hsotg); + hprt0 |= HPRT0_PWR; + dwc2_writel(hsotg, hprt0, HPRT0); + /* Connect hcd after port power is set. */ + dwc2_hcd_connect(hsotg); } }