Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp400175rdb; Fri, 17 Nov 2023 01:58:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IGbycmPVfu8z3DxKf+XJZZIUgDZqZw+urQa8jIb0ZdK2jQswAKO/5QfVntdtpC/EXM14ljs X-Received: by 2002:a05:6a00:179c:b0:6c4:d628:2143 with SMTP id s28-20020a056a00179c00b006c4d6282143mr17939025pfg.31.1700215133991; Fri, 17 Nov 2023 01:58:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700215133; cv=none; d=google.com; s=arc-20160816; b=evfVE/IJdCAkbXHOdIpw8Uionh4Dh0LYIE2X9mepwZ53JN+hyOXz1ZcZ6WY9TIiClo QlNY+F3Ysh2x7EZhi2j5wC894nba42loCczP0gW42cukzJDdKrajqiLQcdUm/2C1KXlB mY6muurwJw9dg5aGaWOGpZ0altfilnanDWxlR2j37lerAIesZiM+hsEod9P6ffSB3CaZ nLrzOvTzZ+85PEygZnDzguAsOHjl/cueMPUjplaZ/R1euoGtnRMI/CzX1ZyaD+jotLFc uOryVJlpr6JPudp6LTn03qsMDtQ1STsDYH9JpeLZZbjYmTnRWWoehK8+n4e1dcdXzoxe /uyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:references:subject:from:to:cc :message-id:date:content-transfer-encoding:mime-version :dkim-signature; bh=P4oNQfBYlP0AUFjj519pmqm6CCbxiBl1lNX7nXCCgt0=; fh=kZDC8/jpHwf/Yu9MVDmovi4gjpDK7svA3ehLLHG/xH0=; b=DdfiJPIUsaJYI05WY3YGdTv6ZYcr5b+DwTI9WYgknNwxBEyAmX6OnqyOT0K1SFA8bt qC9okdJ4ve1jUsiSinT8k6/dTVKHDix8Gfgf3uwwkF4tUvk98h0F4L4KpEpoAzWKXtG6 e8a5KiTF8ElM/l37Fhj4KPnBozjGPcWYFRH6c29LDSilgLmL9mJEOj1etRr7nSr1FxNh 2uTgVPuLHRDc4mTz6DpH8Jpr8gp9odtKobUUzThUXRYApov+L78XwokcbQLDdalH4ciG VJjRw1HSwnfcqnpvRwe66iQInCEqcr4xpXyZznQb+b5cOt99dFZqPFCS1J+GuVKFVR+S CxRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=EVJLxhTO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id fd42-20020a056a002eaa00b006be1a0457d9si1742434pfb.10.2023.11.17.01.58.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Nov 2023 01:58:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=EVJLxhTO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 9B94F8207278; Fri, 17 Nov 2023 01:58:50 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235737AbjKQJ6l (ORCPT + 99 others); Fri, 17 Nov 2023 04:58:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235732AbjKQJ6T (ORCPT ); Fri, 17 Nov 2023 04:58:19 -0500 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::225]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42986CE; Fri, 17 Nov 2023 01:58:14 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 8D1311C000C; Fri, 17 Nov 2023 09:58:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1700215093; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=P4oNQfBYlP0AUFjj519pmqm6CCbxiBl1lNX7nXCCgt0=; b=EVJLxhTOOVfvd33Q80JnB+XnSjByT68Q3jMleNJjJUxeIFxwaMM7KtWiP3rhrh17K7hJjl sCvVVbITb/hJeupyFUxjrBmn7Xn5shTxVixdaOAQYsm024OTXLKACmyT4/v3eeBoEQOGWz jDOUZlj/HXfFA6g3o+wz299a0RVrjBoAIrPXiqAzpTsRkS1e0vjhkmot05yXW43PhSclBr qSc2HZ0daoGKLuTZ7371FKP5/6qFozzliywTaE3KPTLI/NvIJ8wK2LQywM8W9k1AXLJ7bD EnGKye/pSQG8peGAvI9WQSCJGBiUXsZGcOs6E6WQNwWUOICxwo9fxfK2LMOxdA== Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 17 Nov 2023 10:58:12 +0100 Message-Id: Cc: "Greg Kroah-Hartman" , "Rob Herring" , "Krzysztof Kozlowski" , "Conor Dooley" , "Roger Quadros" , "Pawel Laszczak" , "Nishanth Menon" , "Vignesh Raghavendra" , "Tero Kristo" , , , , To: "Peter Chen" From: =?utf-8?q?Th=C3=A9o_Lebrun?= Subject: Re: [PATCH 4/6] usb: cdns3: support power-off of controller when in host role X-Mailer: aerc 0.15.2 References: <20231113-j7200-usb-suspend-v1-0-ad1ee714835c@bootlin.com> <20231113-j7200-usb-suspend-v1-4-ad1ee714835c@bootlin.com> <20231114083838.GC64573@nchen-desktop> <20231117033814.GA485583@nchen-desktop> In-Reply-To: <20231117033814.GA485583@nchen-desktop> X-GND-Sasl: theo.lebrun@bootlin.com X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 17 Nov 2023 01:58:50 -0800 (PST) Hello, On Fri Nov 17, 2023 at 4:38 AM CET, Peter Chen wrote: > On 23-11-14 12:10:18, Th=C3=A9o Lebrun wrote: > > Hello, > >=20 > > On Tue Nov 14, 2023 at 9:38 AM CET, Peter Chen wrote: > > > > + if (cdns->pdata && cdns->pdata->quirks & CDNS3_RESET_ON_RESUME) > > > > + cdns->xhci_plat_data->quirks |=3D XHCI_RESET_ON_RESUME | XHCI_SU= SPEND_RESUME_CLKS; > > > > + > > > > > > If you set this flag, how could you support the USB remote wakeup > > > request? In that case, the USB bus does not expect re-enumeration. > >=20 > > We didn't support remote USB wakeup. Only S2R mattered in our case and > > USB remote wakeup wasn't a possibility. > > Without this patch, will below be hit for your platform: > > /* re-initialize the HC on Restore Error, or Host Controller Error */ > if (temp & (STS_SRE | STS_HCE)) { > reinit_xhc =3D true; > if (!xhci->broken_suspend) > xhci_warn(xhci, "xHC error in resume, USBSTS 0x%x, Reinit\n", temp); > } Yes it hits. The warning as well. How big of an issue is that? My understanding is that this is the expected behavior with reset on resume if we don't explicitely pass the flag XHCI_RESET_ON_RESUME. I don't think we should be having the broken_suspend bit set as its mentioning some specific quirk on AMD hardware. Is the only expected difference inbetween having CDNS3_RESET_ON_RESUME & not having it is resume time? For reference, the status read is 0x411 ie STS_HALT | STS_PCD | STS_SRE. xhc_state is zero. Regards, -- Th=C3=A9o Lebrun, Bootlin Embedded Linux and Kernel engineering https://bootlin.com