Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp262568rdb; Thu, 16 Nov 2023 19:38:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IEqC1UQ3WyjAl25SOzDBAu8Zy8gda8AsxzC7/S45X8llnUnOAh8PdQwNrboLJG7+zWT0aTL X-Received: by 2002:a17:902:b618:b0:1cc:449b:689e with SMTP id b24-20020a170902b61800b001cc449b689emr10305328pls.20.1700192321452; Thu, 16 Nov 2023 19:38:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700192321; cv=none; d=google.com; s=arc-20160816; b=j8T50IDeMS19wU4VqUvrdgY+nRMsrn6HahLqVSR7Vld2lMju2qMwqwPffV5zXzkMy/ jPLzZeqTkbxGcLDbU4i1iZJjUIhmyqr/WjzwlOBDrcIx1zFNtyUuejY8ErpBcoq1bxhX /kt+l5RaGnmnpUsU68bqNfElCZn0ZEllH/u7/inDEHMNh98OSYR56GuArSvyy2xzeMpF s8x4LYDCj9RVr9rXtQ98wGEccXYa0GB1aBNp3b28Pj951ZsFqezOdNUS5TXHWMfxlFkQ hSZ8hO2+471tGQgN8/KqwS5J2GP0NQXRCeZbZSyOwKI3ymNoRUh3yAefwPyzc4lxU4H9 pB5g== 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=/RMX4aRqlAkPvGhngWbd1DGiPI7J9mcsV0b142Uyl2k=; fh=l1lbJQws2gunzeUtQILKiaP2ScHHWVOey+Ae6gWnc/o=; b=k7H34QZN0JYtnHUopScv42fOYan6kEHoID7DZFEnxTS/WlzH65p+1QNgGvj16+w6t/ zZWqMpg77FTt/rb4RxodWhFJvYawDss5Y4OIke7jhpRnnFE/b1xA9sGWig0kBAG88sJ2 86uLrYyahH1YtyqlC1BY6do3HK+stWZfbOpMormsGBULy3ITu0YdUGNeYUyhFew9+N3y gQrBKhK86M+SwbEo84WL/MtF8nvBtlN7rsFoRh7Z7Jsv7yyMpz5rApu/qeJf7PAceqsP dkJgeLBwoxh+eJsLuIX0zZE3SZYw+n+MDWot/1An+KbfZkE7fGLmUNt7AAsORZtZ6IyW RYWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=m0Bbp8Ae; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id d3-20020a170903230300b001ce5b86d0dbsi987761plh.414.2023.11.16.19.38.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 19:38:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=m0Bbp8Ae; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (Postfix) with ESMTP id DD6638269C5A; Thu, 16 Nov 2023 19:38:37 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229901AbjKQDic (ORCPT + 99 others); Thu, 16 Nov 2023 22:38:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbjKQDib (ORCPT ); Thu, 16 Nov 2023 22:38:31 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8AF058E for ; Thu, 16 Nov 2023 19:38:27 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4256BC433C8; Fri, 17 Nov 2023 03:38:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700192307; bh=pT1BzgitY92OrK+bcmiH4d/YlOWx34mfM/YbnLtCb3E=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=m0Bbp8AeEm3UxtlqyPQPLRXg82ZM0TQdcnipmtkwDsW+4DZZ50ef9wqoevPWRMyOG NBSYb1Z9XXmbs5+n7QfFGUO8kgfQLZWvV9aDb29YrpsIr2iACm0euhAKpAp/OEfPDl AgsmzhqcQB+jAWtbYKx0229xVosdWvyY6DH4jKPCHNRbl8UlzbuKk3pNhxXmuuglC5 1psVDWzt8iYqPiYmUeyXKmo0e7i0w9WRB5jgyG+FwAm13aI0LQdkOB8EFVEhvv+Y06 5M9zzp4DvSz7C0NdWKBdufjSxOG2ItZyIgjiGZewM6zkksVTCzN48QyWHT8+NrNCtJ gnypkcvrJuraA== Date: Fri, 17 Nov 2023 11:38:14 +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: <20231117033814.GA485583@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> 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.3 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 groat.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 (groat.vger.email [0.0.0.0]); Thu, 16 Nov 2023 19:38:38 -0800 (PST) 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: > > On 23-11-13 15:26:59, Th?o Lebrun wrote: > > > The controller is not being reconfigured at resume. Change resume to > > > redo hardware config if quirk CDNS3_RESET_ON_RESUME is active. > > > > Current logic has power off judgement, see cdns3_controller_resume for > > detail. > > Indeed! Thanks for the pointer. I had not noticed that, those patches > come from an older kernel which didn't have it. That'll make for less > changes; patches 4 & 5 can go away. > > > > + 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); } -- Thanks, Peter Chen