Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp498552pxb; Wed, 14 Apr 2021 22:41:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJykfnGuKlrTHsD7bvcNosGqDb3bwUjQeqGlXCDH9kjOJZjaI0ASadxfTs53sMcUtsjsUAEC X-Received: by 2002:a17:90a:8b91:: with SMTP id z17mr1921094pjn.73.1618465304386; Wed, 14 Apr 2021 22:41:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618465304; cv=none; d=google.com; s=arc-20160816; b=OPJkCWK7mpMtduV2M7zjbOshlNFuLD3PLpn7+L5Cgwf1p05Qo0UkPgL85pGG/UfHAY TRyt2hnBJJTUZazXFl4SUx2PhtkePV8iPCicoMofTBJ5Of92SECqttE0ktjcqxfPbTbo VMPQXcj0//35RGWqJwbcerCkCH55NWuWFQx/e/4IGEJvmIgU1PrxqxyNXcUeTpXLg89+ F5zfH3KVe+B2BJt/qtBIh8OoRvioVi5HfCl1HrivqkYjgmGrDH53ZoIqnaSo+EC19Cvq CwQilKffgfL6ukDYzQV18Idau6f6IsTRGW86dmSg9W5FE29uT2OuQYgcV9iQqhI7+JR7 /Srw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:from:references:in-reply-to :message-id:date:dkim-signature; bh=J5Anb4IhouUhWKXklWIUJu+HlRqHsaTiQnGv2UPRNd0=; b=wxtXB4UvaUoE9cCKvCUBvSHGExiEFt73Yg+GXAgqQRXoyXuO6fakhsAudCW457atEe 3kuhPi6MCuUT1cTDGC54qJBHBhim2v37sd8MBOTo1guCNYACPdHbiDBKIcx6dmUmdv/2 jgppwlPQtYrqcpFH5wUoTtsumbNgA5YzbNXJ+s1D9iZ5wRz5I+90pAjuoVz+HM4IjuWO zKUvCkYbTvrRxHDlNs7D/hgfifLdYb5SBHzTEnl4JIYGktUYeEBINeeArZCHZiW8nfoF hP36LxRcHytnX8d5uyTN0XCWl9QcbdhSE7GxpX/NEdOzLjnV4qOKgrPotgG2wOHWkSw6 EnFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=JwTdhvqy; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=synopsys.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q4si2155021pll.284.2021.04.14.22.41.32; Wed, 14 Apr 2021 22:41:44 -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=@synopsys.com header.s=mail header.b=JwTdhvqy; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=synopsys.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230242AbhDOFkL (ORCPT + 99 others); Thu, 15 Apr 2021 01:40:11 -0400 Received: from smtprelay-out1.synopsys.com ([149.117.87.133]:53710 "EHLO smtprelay-out1.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230239AbhDOFkK (ORCPT ); Thu, 15 Apr 2021 01:40:10 -0400 Received: from mailhost.synopsys.com (mdc-mailhost2.synopsys.com [10.225.0.210]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by smtprelay-out1.synopsys.com (Postfix) with ESMTPS id 9A828C0619; Thu, 15 Apr 2021 05:39:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1618465187; bh=LAuvakZevK94v8tt9XYT1Vjf9cbsK4oXGNWWW7dGB6U=; h=Date:In-Reply-To:References:From:Subject:To:Cc:From; b=JwTdhvqyrhj2Dpn9z2FzIHsuSx5rbdur0xiuXP3jZDYS866pbGVK0OM+ijcWtLd8a 7+OoCWH8MJv/Wz0qUxI7TT9Rpyy4T2feujhCaq++aym6us4DSOStgRClKjxKeDZtnX 6TC+h+hzEzF0Z+2mH9uI97d4F3nNhg+zhj4aVSzCLrJ+yBhsb+p8Vd535JQVRPFpwp a5+Oje340Nfk7YWEQ6mwLHEM9Pxk5BQuerQbM27TRBT5fTqXoNO+1GLC/I/7aADYF1 PCTSSPA+OmFrd5nZziJSvRLfRF0u2g0ACjC1mFH7hbXUf6n+y4hqX0bFcfQ8MphwbB ei0XVgQ8+7Rlg== Received: from razpc-HP (razpc-hp.internal.synopsys.com [10.116.126.207]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by mailhost.synopsys.com (Postfix) with ESMTPSA id 68498A005D; Thu, 15 Apr 2021 05:39:44 +0000 (UTC) Received: by razpc-HP (sSMTP sendmail emulation); Thu, 15 Apr 2021 09:39:43 +0400 Date: Thu, 15 Apr 2021 09:39:43 +0400 Message-Id: <9ef7ec0b843fcf4f897bf19bfb35f5ce6761d76c.1618464534.git.Arthur.Petrosyan@synopsys.com> In-Reply-To: References: X-SNPS-Relay: synopsys.com From: Artur Petrosyan Subject: [PATCH 03/15] usb: dwc2: Fix host mode hibernation exit with remote wakeup flow. To: John Youn , Felipe Balbi , Greg Kroah-Hartman , Artur Petrosyan , Minas Harutyunyan , Vardan Mikayelyan , Grigor Tovmasyan , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Artur Petrosyan Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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") Signed-off-by: Artur Petrosyan --- 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 cda3f931195d..ff945c40ef8a 100644 --- a/drivers/usb/dwc2/hcd.c +++ b/drivers/usb/dwc2/hcd.c @@ -5650,7 +5650,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.25.1