Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1148853rdb; Tue, 30 Jan 2024 09:12:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IFeUkVRLmQs2cBMgEjzyWto0+9ugxGW6XowKmPG3R53EiyDFiiZz3p5OEC9JYXE1wFNpAKj X-Received: by 2002:a17:906:81d5:b0:a2c:fe9d:98bb with SMTP id e21-20020a17090681d500b00a2cfe9d98bbmr6922328ejx.29.1706634759866; Tue, 30 Jan 2024 09:12:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706634759; cv=pass; d=google.com; s=arc-20160816; b=BOHJfSmkrPg7WbeofFCCZ174mJ0od2ASQrxJV8Do2MIqoCWPZYJL6qZ3DR2NaAEsnk /pBUrAUiXYDEMB2W8KuyziXejkcC5eN4egz2N5V1zq3g4Q6q/8oRSusaklxJWj3XW56x cbC/6lfeTNSZFTfwA7EZK4SRmtiMr/ChjF+5U9AIYMg9oBAmjin54qpE8F3kODGBV9hx nxYJfB7dnUsQVII7a2GFUwcEMQL38c8U8HJDlSdPMQ1gjkuU0AamGxuYE1C2NeOdaOCg af9P8Q6gV6lHIgI2OtnF6AbuGo3Lf2EqYx2v6XKlQP7Z3DPqw/e3VhXC+s1RZgMYB0Pu Lvkw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=3w1kQkFM6wOk+HoVE2k3GhMhBGrsypfyY0JIvPWxrTk=; fh=e0AeEPNnBbwYPfvbrNAs/zyE/Pv3xcEig3QUW0KI9LM=; b=GVVGjKDIdrlqHR3FWQW2yuJwhTVla1JAoVOShwYVXdyCZoADO5SsFXQ0cTvXc4Jofm tD9AP7Cu16xAqSZs9uZmIh+wG+u5lfAVpnkKv8WAL62I9tqMezeYlmwU/pwfV/pAHa4i VKFus//okeZdQjyuqh0HQOIerwaQPs5h1FdTANDelt/T8vG9SMTToKZbjRkGifQ7ddeE +jYLoZmm3b9s/WkKA1yHsRmUHv/XVDYQTno9QMal1wIukur4TxOlDtojFSEZ8FQT2obO xUalHC3HvAXtBNQm3yiFmOLCmTKLOKL5pZAM3GUywKr5NzRfjbExGSjO4fvi0dlpGOcF 508g== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=netrider.rowland.org); spf=pass (google.com: domain of linux-kernel+bounces-45021-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45021-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=harvard.edu Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id h8-20020a17090619c800b00a34a1ab1039si4665839ejd.966.2024.01.30.09.12.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 09:12:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-45021-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=netrider.rowland.org); spf=pass (google.com: domain of linux-kernel+bounces-45021-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45021-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=harvard.edu Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 9B0DF1F220EF for ; Tue, 30 Jan 2024 17:12:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5AF33129A7D; Tue, 30 Jan 2024 17:12:28 +0000 (UTC) Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by smtp.subspace.kernel.org (Postfix) with SMTP id D376F76C6A for ; Tue, 30 Jan 2024 17:12:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.131.102.5 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706634747; cv=none; b=WmYfiEvlh5YN7bXNgjT8DaMU2R5fhXaMi1PiQuhjQ8LZYLlHjHr/GA5+5wh1mJ9pwPvOeGo0Sc36Flg4XIxgYNCTIv5qil9UhT9SPa+0sOPY3ry5BdaDeUBgAcMR91ZOB9Mlnj/v3zSVOuhNH7C0I4TPl+nA+vIymxJy5m+kZuw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706634747; c=relaxed/simple; bh=hR47GmGj2RdK1d7gKYDeYQwmG0DVJI+5y0VYDSSUr5M=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=heHxMyv983lW+L3FBS0ZXWbXtTRHwljxcTbjJkqjSWpyfFO3ghCiL16oVzpW5c0ucyTUHQwaaekMUWvIrVWoFAAftDD/r+Wy6K+D9qJ2p2BxvtmjIwtFGoFNai1WquW64EeoZppTQQZ24iyQv5x1YR8Frce8AswYSpTU3uoi1WE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=rowland.harvard.edu; spf=pass smtp.mailfrom=netrider.rowland.org; arc=none smtp.client-ip=192.131.102.5 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=rowland.harvard.edu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=netrider.rowland.org Received: (qmail 410195 invoked by uid 1000); 30 Jan 2024 12:12:19 -0500 Date: Tue, 30 Jan 2024 12:12:19 -0500 From: Alan Stern To: Guan-Yu Lin Cc: gregkh@linuxfoundation.org, mathias.nyman@intel.com, royluo@google.com, hadess@hadess.net, benjamin.tissoires@redhat.com, heikki.krogerus@linux.intel.com, oneukum@suse.com, grundler@chromium.org, yajun.deng@linux.dev, dianders@chromium.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, badhri@google.com, albertccwang@google.com, pumahsu@google.com Subject: Re: [PATCH] [RFC] usb: host: Allow userspace to control usb suspend flows Message-ID: <0e4221b5-bafe-4bea-b533-0ed8add81ef1@rowland.harvard.edu> References: <20240130064819.1362642-1-guanyulin@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240130064819.1362642-1-guanyulin@google.com> On Tue, Jan 30, 2024 at 06:47:13AM +0000, Guan-Yu Lin wrote: > In a system with sub-system engaged, the controllers are controlled by What is a sub-system and how does it become engaged? > both the main processor and the co-processor. Chances are when the main > processor decides to suspend the USB device, the USB device might still > be used by the co-processor. In this scenario, we need a way to let > system know whether it can suspend the USB device or not. We introduce a > new sysfs entry "deprecate_device_pm" to allow userspace to control the > device power management functionality on demand. As the userspace should > possess the information of both the main processor and the co-processor, > it should be able to address the conflict mentioned above. This description and the comments and documentation in the patch all talk about "device power management". But in fact the patch only affects system power management; it does not affect runtime power management. Also, "deprecate_device_pm" does not seem like a very good name. You're not deprecating power management; you're just disabling it temporarily. You should find a better name. Do you really want your new flag to affect device suspend during hibernation? Does the co-processor remain powered when the system is powered off and unplugged? Do you really want the new sysfs flag to be present even on systems that don't have a co-processor? Why does this affect only the USB subsystem? Can't the co-processor use other, non-USB, devices on the system? Alan Stern