Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp310548pxj; Thu, 20 May 2021 09:50:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTnuAc7zbjAJT3irjFzE4tF8GwqRY95T6EDQkQnaVmmxwU9Ok/AVFz9B8SOsHUNMkXdBsc X-Received: by 2002:a17:906:ce49:: with SMTP id se9mr5846618ejb.92.1621529412607; Thu, 20 May 2021 09:50:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621529412; cv=none; d=google.com; s=arc-20160816; b=EkoxOHzXMsZ0sJJiKPtnjr46864fYr0+bmr+Rhanf0Y4RTisaLBezniRAd50UCCUP+ ASD2/6KObP2d8hw/d6Ga9zT8VbP1rYpXAaHJrWD74dD5D7N78iZ3GK2ij1HcK2usL/SZ X1OE9C3oCA2dxuwd6JGKmUHZcYNfqFZ6y4mUePqqBcjl1LwOB9pP7wLb4HuU4cAkRE6b tGaHnZMsQlPOkaG6NJufqKcTUXx5ukhYw1d5lt4R5G6sqBMMC3OgnXLDNCcm5sEOa3vI VaXiOiBfze+7ihC/0t0vCpoPKE1LMwFnxZgLzMIk+UDJBBKtwEt2mBGnfWtf4bitTyca Ot5g== 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=Ddv+gZhyqJb7WnaCKLeFM0VoVp6WoI+HGrgs8IVNsiQ=; b=T7xm73EsyQbKRpf+J79IoWblqmbGngZRNwnGxI+SpSyeFJkc4tugZuMoq+9iwuVaSJ rlTP2BdkAdEXkIsvRsCYgaDSVgkI6jY3zZBd4OGzPxZHglBEFvup4AI8lbbCaD+RXkAK NPPY0wxDFUNxNyyeFf1/6zp/SIOBhpFEDjCWccZoAOV65vPT1qNWdbXrqnf5BnKvtppg A0CsREGB9qI8EvZmyKd7fE/gVXVUu3+Mw/ZOmZvzrGgnBarbKz4qbAyzji6J6tdH424m 7Y1EGAq+LdEtb7kSHmnjYSwUl2Pk3U3ioc/BSk1M91Nl9ojuPJIjUuE8UMLigCOoTrcZ 9jdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=t0jA5mEV; 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 c7si2911993ejd.399.2021.05.20.09.49.48; Thu, 20 May 2021 09:50:12 -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=t0jA5mEV; 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 S233209AbhETJuk (ORCPT + 99 others); Thu, 20 May 2021 05:50:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:47342 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233433AbhETJr6 (ORCPT ); Thu, 20 May 2021 05:47:58 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A15EE613F9; Thu, 20 May 2021 09:34:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621503270; bh=3GvK6IdFfpr0M4VNNzbYiiMkr/Q/DR3Xvlrb7qN4ivE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=t0jA5mEV97Wov3XfEvPpkAxhYnl3cWbErLCVtngO0jQKdsjeQkXlPOoxEbcx/iSJm o15yzSGhwq2oXIuHb4kNwZe/LtUJ3Ga+vo1IXCaFWbPoNhKrzqzpugqxjSwDJj0bP2 N5OcQyTBbxhxxn4uOg5jenrqhtpS3m8ie4upV53c= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Minas Harutyunyan , Artur Petrosyan Subject: [PATCH 4.19 111/425] usb: dwc2: Fix session request interrupt handler Date: Thu, 20 May 2021 11:18:00 +0200 Message-Id: <20210520092135.097811695@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092131.308959589@linuxfoundation.org> References: <20210520092131.308959589@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 @@ -312,6 +312,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); @@ -332,6 +333,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); } }