Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2011019rdb; Sun, 19 Nov 2023 21:45:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IEQA6nQMMboN5re+NIHUaEGIbj3LLk8dW5CaLtgB7IFypM43JWB8r0icv/lWeCwKQx/IyOv X-Received: by 2002:a05:6808:2395:b0:3b5:e67a:7cd2 with SMTP id bp21-20020a056808239500b003b5e67a7cd2mr6824071oib.8.1700459116241; Sun, 19 Nov 2023 21:45:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700459116; cv=none; d=google.com; s=arc-20160816; b=Kp8FKmaMrAmI4jKKOq/q0QevWv0nQxzd6SNpJ700slZYstuWZCgDaSHl7ybkM9Sfyp Z+y1txzBzdPyRn/q6GRgqvLTwQ41P6TX7WQlZB1pOOewNASiNBCA5c9dI8XbfCaNF7tC GbSRkhOuOEDXSviu1uDyYCbSOH9ZOjkQM+86hb94cZJPld8IBiEwnu5gPEOklgNifyVK 9GsJD58gLnQR8/uEcxduK7EFbkQ1paYrENxIGS9Yk523X/ZqqpvMM8d2BSWEgn2TIFCH YhI4/tEtD89nNmnCJ/52e+f97HILUAsMP9TRW4vZu+y6lRma4oLDPaR9BWzmoqaiYfPj 7K5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=QhO+o9zRYZc8+2ToGW/1wD/Nc/VBPXsRzpeDOflDMH4=; fh=l1lbJQws2gunzeUtQILKiaP2ScHHWVOey+Ae6gWnc/o=; b=DQ3tZRIk5PMFju46Zsp7dgzpL17I51lz6lqKpmHdWuShHFX+mxw1n9HUxIuJnUNSjg d99PlwwTcmkELfuZYLNPuSxOcMVQSJJSpKxY2sUk3Tvb7r1k9GbLAoW9sd9sIvSdbuFM z11sVjul9ZaN1Tj1QQjO+n2l6hLxCzYvZp2C1xlyxvffJJfrlJuZoDdw5CNGeHSaGvTo w1RtqjOXb78VFVal7qvEwxnR8VHkaS532bW5l7cE9KQ2CklSN/htvqihQ4W9CqsARFNS /l5N8K25Qq6NCCClm5bgpPl+4bsmXEXGWEDV4dUHmJvJaWL/nJXh/N9hg6hZqA6uJRS4 8Jvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aQMf0xcb; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id m187-20020a6326c4000000b005adba954597si7369911pgm.504.2023.11.19.21.45.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Nov 2023 21:45:16 -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=@kernel.org header.s=k20201202 header.b=aQMf0xcb; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id A6A2680A7768; Sun, 19 Nov 2023 21:45:12 -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 S231932AbjKTFou (ORCPT + 99 others); Mon, 20 Nov 2023 00:44:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230033AbjKTFot (ORCPT ); Mon, 20 Nov 2023 00:44:49 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF04A13E for ; Sun, 19 Nov 2023 21:44:45 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 84432C433C8; Mon, 20 Nov 2023 05:44:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700459085; bh=xMwd22goVNx0T6tDO3m4JjyUIDZiEW0Rduv+odROm9k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=aQMf0xcbls1MTU8bgulVhh9gj9GLtEDuCuqqGFi/H+xj8tOcl4CSt/zdM6W0nVU8Z IXizWTy0vBfPt1LnX6gD98br/oI7LsfZz1D8Uk6PtdY1Gfs2cvTwg6/gbrNTWB1QKL oISVuegEoa31Af8qizAqcL3SDaNCiTTL9VNOyEebnCuvWoJNRNXMacp/aerOMJ6QPM pV4UVQhlwcm5vmYQgQTukENVMBf0u1J9AcnvT0eRLMAb1RPBkaM8iZr+jaM9q8jN7K 6LthYoE9VGf76PQLkUeLBgDhDzm+R6zBapN0LVgB7XuuQElK0Aj4X0orXswwxnua4M wAZVMBnZ9F6BA== Date: Mon, 20 Nov 2023 13:44:34 +0800 From: Peter Chen To: =?iso-8859-1?Q?Th=E9o?= Lebrun Cc: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Roger Quadros , Pawel Laszczak , Nishanth Menon , Vignesh Raghavendra , Tero Kristo , linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 4/6] usb: cdns3: support power-off of controller when in host role Message-ID: <20231120054434.GA518673@nchen-desktop> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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]); Sun, 19 Nov 2023 21:45:12 -0800 (PST) On 23-11-17 10:58:12, Th?o Lebrun wrote: > Hello, > > On Fri Nov 17, 2023 at 4:38 AM CET, Peter Chen wrote: > > On 23-11-14 12:10:18, Th?o Lebrun wrote: > > > Hello, > > > > > > 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 |= XHCI_RESET_ON_RESUME | XHCI_SUSPEND_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. > > > > > > 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 = 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. > Yes. I know some xHCI controllers have powered off during suspend will hit it, just would like to confirm if it is the same with yours. If you don't want remote wakeup, it is most probably the same with quirks you set. -- Thanks, Peter Chen