Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4601974pxj; Wed, 12 May 2021 09:02:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyck9T8dWMdFY2uIN6TqkZ1asGa18g7i+yohoWlUUgC1vZFRMCZPDrVCagYLNXYWlfO5gfa X-Received: by 2002:a4a:c316:: with SMTP id c22mr28565349ooq.65.1620835371704; Wed, 12 May 2021 09:02:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620835371; cv=none; d=google.com; s=arc-20160816; b=tKoXEdYltJ56pOETOu2b8BzhPkfzfT06cieVoyEQQU88pcIV8oA2EzCkc5+8yX3KVf siDMTXx6dj8MwfPB314bGTLr/0rWOG5uTvf7N454dMxDAoBRh5U2cvaFIdKLQFkECjYy AJnLbkBCXuHMJApigH3cXgNAC78RChDQr22wboDsm6GEaYx28Roj2uCo2STSRUdQ0CMU ykNz5oVVhdxEbXKbWBYwVVhQyKcMqxE1kzI4SUey410PwEK9n+SdzWvVz/rxBW1ghe5G c89KsCWKT0XWSKq/vSdkdZylVRZtDXBariBkIfhSUNN3/haD9r8NqC3/Mg/+6HO2jnhZ BmPQ== 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=KIKhs1ei8hUe8+nLMeMykGaoj8nxtDoXr1Mq6rH9xUE=; b=ylvCoVuhNCc4lpM8Rm1feHS3q8UstebYfmr840TcwYJIAROuuM6HTIs8l1rz/WNvBK pKpeLvP6xwHAM42JhIyt1xd22a0i1q9r7C3+iLo6J7+EtniDaAkAUjHLwIMsDq35JoDl iQXsZAeB9MMQdPGgSLd/NURWxwfXDmGH6/nHX8EBMOW+4TE7a0+OVeUCrSnz4CF8Rhnw SR9YN2suuWsDsDC9n9Ar8gpGpDhxx0fnWrbUai/f+fqZuk3IHkjaOYC1jePcnJsyQXhP RZRr3MBnZcabwinu4LxWe7nEvhxkxJZPLdfTAlYvMGc9W2QYYPVqk0levT+cYqxIllkn 8q5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=z3uD2Ig9; 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 m3si255448ote.193.2021.05.12.09.02.37; Wed, 12 May 2021 09:02:51 -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=z3uD2Ig9; 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 S236244AbhELQCh (ORCPT + 99 others); Wed, 12 May 2021 12:02:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:38874 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235524AbhELP2Z (ORCPT ); Wed, 12 May 2021 11:28:25 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 532AA61C1D; Wed, 12 May 2021 15:13:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620832412; bh=OYIUApjaaVmbsEilTr41bv7FpvqpKCxAILLk0ATblJs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=z3uD2Ig9YM6aRbQj7UNw7HBTYWYeitrRZA7ETjqvJewmuFAsSHywaYt9hraYBGdym erwOgNFbpGi9j8sbf1uM76ahSHQ6CPMzt+oTDbJKiA2P707CMli/nQUVQbKF88630s V15aD14UYVCRxJ/E1y8sfg5gQZMwMjsjUZqCzeSk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Minas Harutyunyan , Artur Petrosyan , Sasha Levin Subject: [PATCH 5.10 270/530] usb: dwc2: Fix host mode hibernation exit with remote wakeup flow. Date: Wed, 12 May 2021 16:46:20 +0200 Message-Id: <20210512144828.685547774@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512144819.664462530@linuxfoundation.org> References: <20210512144819.664462530@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 [ Upstream commit c2db8d7b9568b10e014af83b3c15e39929e3579e ] Added setting "port_connect_status_change" flag to "1" in order to re-enumerate, because after exit from hibernation port connection status is not detected. Fixes: c5c403dc4336 ("usb: dwc2: Add host/device hibernation functions") Acked-by: Minas Harutyunyan Signed-off-by: Artur Petrosyan Link: https://lore.kernel.org/r/20210416124707.5EEC2A005D@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/usb/dwc2/hcd.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c index 1a9789ec5847..6af1dcbc3656 100644 --- a/drivers/usb/dwc2/hcd.c +++ b/drivers/usb/dwc2/hcd.c @@ -5580,7 +5580,15 @@ int dwc2_host_exit_hibernation(struct dwc2_hsotg *hsotg, int rem_wakeup, return ret; } - dwc2_hcd_rem_wakeup(hsotg); + if (rem_wakeup) { + dwc2_hcd_rem_wakeup(hsotg); + /* + * Change "port_connect_status_change" flag to re-enumerate, + * because after exit from hibernation port connection status + * is not detected. + */ + hsotg->flags.b.port_connect_status_change = 1; + } hsotg->hibernated = 0; hsotg->bus_suspended = 0; -- 2.30.2