Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp284900rdf; Tue, 21 Nov 2023 02:42:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IEObUMNOvWE52JNa8d683UH2t+lnUZYx7MOb95eFABsSOC6wE+mME7cD4BR38CCJd7XKEg7 X-Received: by 2002:a05:6808:ece:b0:3b5:6549:ea49 with SMTP id q14-20020a0568080ece00b003b56549ea49mr13632849oiv.31.1700563377011; Tue, 21 Nov 2023 02:42:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700563376; cv=none; d=google.com; s=arc-20160816; b=nAxmX5DHtNgaEPQpLncUKbWM0ecjVKRvSHVCcKaTDaxhL9Bmlc2HaliJRSqHfU+vax lTPEpfUimJhNhXvtvnK6ja8vvKJxq6rkO2sSHbI/x/gztYxbXiaa6cyzDKnkCQTybr5K oGF8LvO2alusDBzP7kJQ7jYDuJsIue+u+EsD9ccGXbS8eAWTGbmIixL0G5XAcAnoh+ga HSNmyc8Pc6VJLWFJ6r34PGhVn6amkwYL/tg1mmaJAlZHi9q4es9d43dwGhMsbyvcsbX8 OPZyu6stf3jo/W17yEq2rC/s0/KmzC2bbZw4tdlVcEo8OtqYHQE7ojZu6SVdOdpZY9bu hQ+w== 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=fy7BC+3ngAIfN1ShwD4pq5Ih55ycWiQ7BCjyrYYqkSE=; fh=lfW/s002Ohgzd6SSN0Agbe3LEM7aC6tp2ABnlc5KOX4=; b=B6V0mWO9rYAOfCz5QWt7f1cWqzQzPXp4hAvhW3Xod015SaGpn6i8OB9Aw9l+5/8ltE CiuPMBepRhw43e8fLF1nz2o4cDQw2eCw5k2BU9fKXojoVT9zf4gl6zgqirJXOpiKAasd ZavVLaDevdhYsE6IBWQuZg3yMYTpQ0d1UoAdfXhvSOiaSfiuaQdtlV8zBUgWEXqzzjMd mU9/XUgdZYfBLBe1o02TUJ82wOJHGHvvTEM+AKk+9SARKM2fnbr8Wje2YLerv5dfuy07 hxJ2Xn4UICWoDmC85UCxqjCAYxq6wP2C+FF/vO/sSFmdBA9MVdzth4CuBf+NRvyrJ+kk Fvag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=D4vK5vs4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id i64-20020a639d43000000b00563d791d978si9725484pgd.750.2023.11.21.02.42.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 02:42:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=D4vK5vs4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id C2C9580D31C3; Tue, 21 Nov 2023 02:41:40 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233829AbjKUKlP (ORCPT + 99 others); Tue, 21 Nov 2023 05:41:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233818AbjKUKlM (ORCPT ); Tue, 21 Nov 2023 05:41:12 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BED2911C for ; Tue, 21 Nov 2023 02:41:08 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 42018C433C8; Tue, 21 Nov 2023 10:41:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700563268; bh=6ssmz9Fzj5B5OmCb07mIm3SGwRw9YGJdqqjNOMzjqjI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=D4vK5vs4oL3icSXZydnqDM56wAeOdVXHDrdnc5HGhc07aObDsKuXDA6nPc9Kb/AjO tFTsFjQsYLFV6t2wKtWlJRyz8RSctyacMs0ecueARCS6ikBk4balsn1z9IN/cBBhf5 b8a4mu42V8h2H1j9aw4XOLMiz4gg1lBZeQc8Rcqdpa7CAMwhGOZUPS43Aoercery22 A+VWLfY9me9tZNzztinOEcud0MxToeqAgO3RzE+vgDoV0GfSa1VN6plMRXx4ONNNBw 52A1UllKq6WlZhEA3yy3s6mPDMlPFWkKB4LuyaHcT/uK52CcIyMSq30d/3K552YJil 8xS4+R7zYbMxg== Date: Tue, 21 Nov 2023 18:40:56 +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, ThomasPetazzonithomas.petazzoni@bootlin.com, =?iso-8859-1?Q?Gr=E9gory?= Clement Subject: Re: [PATCH v2 5/7] usb: cdns3: add quirk to platform data for reset-on-resume Message-ID: <20231121104056.GA541474@nchen-desktop> References: <20231120-j7200-usb-suspend-v2-0-038c7e4a3df4@bootlin.com> <20231120-j7200-usb-suspend-v2-5-038c7e4a3df4@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20231120-j7200-usb-suspend-v2-5-038c7e4a3df4@bootlin.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Tue, 21 Nov 2023 02:41:40 -0800 (PST) On 23-11-20 18:06:05, Th?o Lebrun wrote: > The cdns3 host role does not care about reset-on-resume. xHCI however > reconfigures itself in silence rather than printing a warning about a > resume error. Related warning example: > > [ 16.017462] xhci-hcd xhci-hcd.1.auto: xHC error in resume, USBSTS 0x401, Reinit > > Allow passing a CDNS3_RESET_ON_RESUME quirk flag from cdns3 pdata down > to xHCI pdata. The goal is to allow signaling about reset-on-resume > behavior from platform wrapper drivers. > > When used, remote wakeup is not expected to work. > > Signed-off-by: Th?o Lebrun Acked-by: Peter Chen > --- > drivers/usb/cdns3/core.h | 1 + > drivers/usb/cdns3/host.c | 3 +++ > 2 files changed, 4 insertions(+) > > diff --git a/drivers/usb/cdns3/core.h b/drivers/usb/cdns3/core.h > index 81a9c9d6be08..7487067ba23f 100644 > --- a/drivers/usb/cdns3/core.h > +++ b/drivers/usb/cdns3/core.h > @@ -44,6 +44,7 @@ struct cdns3_platform_data { > bool suspend, bool wakeup); > unsigned long quirks; > #define CDNS3_DEFAULT_PM_RUNTIME_ALLOW BIT(0) > +#define CDNS3_RESET_ON_RESUME BIT(1) > }; > > /** > diff --git a/drivers/usb/cdns3/host.c b/drivers/usb/cdns3/host.c > index 6164fc4c96a4..28c4d1deb231 100644 > --- a/drivers/usb/cdns3/host.c > +++ b/drivers/usb/cdns3/host.c > @@ -91,6 +91,9 @@ static int __cdns_host_init(struct cdns *cdns) > if (cdns->pdata && (cdns->pdata->quirks & CDNS3_DEFAULT_PM_RUNTIME_ALLOW)) > cdns->xhci_plat_data->quirks |= XHCI_DEFAULT_PM_RUNTIME_ALLOW; > > + if (cdns->pdata && (cdns->pdata->quirks & CDNS3_RESET_ON_RESUME)) > + cdns->xhci_plat_data->quirks |= XHCI_RESET_ON_RESUME; > + > ret = platform_device_add_data(xhci, cdns->xhci_plat_data, > sizeof(struct xhci_plat_priv)); > if (ret) > > -- > 2.42.0 > -- Thanks, Peter Chen