Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp1031211rdb; Fri, 2 Feb 2024 11:11:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IHDO2LSDGAUQ+ef0Ah+zuzcXrYU+QoaYwZQSzg2SmjauAjZzZa6E6U+j4ssrzcX0VJMlcoO X-Received: by 2002:a17:902:d905:b0:1d4:e237:2c3f with SMTP id c5-20020a170902d90500b001d4e2372c3fmr2576983plz.28.1706901095674; Fri, 02 Feb 2024 11:11:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706901095; cv=pass; d=google.com; s=arc-20160816; b=UHT1H/6Gqi6ehU7WWLPcfhMPg0yHE6u3FWPyfPhuNTN8bzpyIMGKQzeoUpRFEjStAb Fx3FT9asnbeVsP7vO66lEvnhNWgfd+fHs9ewhXjhYHQLqc4JXf+uTrR6gFEhI8YIgWB+ JXWyqXqeKyVl8IN83/rLbk4uGVjQUNCYD078EwRC45Y9e6Z59goBSmStwyY3cANhe2wd +pU+rCqRKIDWo7C1L/wco3pRLxaaa9yzEi+apzzguH2RV+KeXxKFcnTXsB3z279lQTXh K/bgSThonJpdRl13uBV3BpL+v8vGA50hXpBcJR/WMJ0eOVOoz98KvfAI5TESCnrkmjqw EzyA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=WSAHmv2z4qKymTq72bmIqI8bw0NQ5uUyh0tlaEM4Pts=; fh=rgLswTsbV06wZGzNUzrFG5fouz5jeunguKnGEdfu/aA=; b=iMj1g/lFN9ROFVJlqhKgSrM/fGpSuvUkLhx3pAMGiCd1beHm8Yk00HSNxaHuID+pUB eHBmXTHVI6MkrLX1fYkGlgSodDgYQ8uVRIo1joPNQ6vnUt5SSFVUZPniDAHi30c5FQMR aC9c2nYOoAFPFzZQSFbF6skgId9NgpEDlSWXsCDg9uSfCXj0MhDSMeWxt3Q7rBx3FTxF L5gjO0sSH3MXEyQNhSacd2TAPReurhFV+QIm5ir0vRHxBYc3aKcmwOLOptyKt4lcJve6 /uJ2DErNV8aFPkdf1UncgT6KatNsoJo4RPSsj/K/RTSvWlBWG4ZEj1inV/vrDpamwICv qJmA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=gxGIDKUy; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-49966-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49966-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=1; AJvYcCUC6XQ5vZdR77WpxK5koa9AFS21jjlqDEXPJHGKwVsvxCIdO8Cg10CZN+K1QSUIJLBULI8RN/gC9cnAEyd37lQn/lKZlBkY4agw+XoHBA== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id o25-20020a637319000000b005dbf4ba5fb7si1604495pgc.283.2024.02.02.11.11.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 11:11:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49966-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=gxGIDKUy; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-49966-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49966-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 3BD82B24335 for ; Fri, 2 Feb 2024 14:49:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 183F1140771; Fri, 2 Feb 2024 14:49:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="gxGIDKUy" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 553473C0E; Fri, 2 Feb 2024 14:49:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706885379; cv=none; b=jNQJ1y/2ikZvlNk7dhxTkKddymWScRSaCM1vfXjCPJECFwkdennfbpba4maudM+an5K2JQioeEIcdgQf4dR9XmUjQvvHOe5wQGFaGI2AeGdW3GSHr02gXDWRNt80JZdXZYo3cXWsRJdh2+V8MP4lLUP5lpBY3lHmWQJcIphcnjU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706885379; c=relaxed/simple; bh=GLWVv2wG1W5Docrd2ffJlZ62lITTa59KuRjNqA7Jq/Q=; h=Message-ID:Date:MIME-Version:To:Cc:References:From:Subject: In-Reply-To:Content-Type; b=nHWr1fFFu28CkJafcvUnkXmxWZDoIbKtOzdUQCbue3qiOpRMYnTdLZVn3rpfcOw5BR8UiNyrlfL5VTQqqP+OafbNtqYq3ZYMVFqwWUnarVt5hW4A/gfkEeAlaMzklDxk+hC21bcd6I/o/tGIywozImSjlQMwPZvq+1nYdMXJ3hI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=gxGIDKUy; arc=none smtp.client-ip=198.175.65.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706885377; x=1738421377; h=message-id:date:mime-version:to:cc:references:from: subject:in-reply-to:content-transfer-encoding; bh=GLWVv2wG1W5Docrd2ffJlZ62lITTa59KuRjNqA7Jq/Q=; b=gxGIDKUy9IFQ6Z2iPyDi30ZpFLwxRk6tTjf0BIXWsL8Tu3A9pOff6smS 9mR7VoRE3IYUyvI1tcJNLbiI9m5pLsADGzyO/bB7dGz0+9SECTtUDb4YM D8i0qMW696TbggIXqv4vLYfBBmLBjY56ujwIDHC0nJXgHyMOsDGSAVODP h36V0NLog3pbpE0nBu4jEqZKNgIbRIPL0MNWDcI6bf0r5dJv5R7mZm101 UBjTbhcAmKhF89pr5svhvlHDzRpAsULTQI6XO214sQdRL1OwW73DV5Vkb 4fG5o2+uanzSpcArTQdvIBBhdEYEsjripa6t/K767wVM6exaUyEhmaseR Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10971"; a="355827" X-IronPort-AV: E=Sophos;i="6.05,238,1701158400"; d="scan'208";a="355827" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Feb 2024 06:49:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10971"; a="823227502" X-IronPort-AV: E=Sophos;i="6.05,238,1701158400"; d="scan'208";a="823227502" Received: from mattu-haswell.fi.intel.com (HELO [10.237.72.199]) ([10.237.72.199]) by orsmga001.jf.intel.com with ESMTP; 02 Feb 2024 06:49:31 -0800 Message-ID: <70412f57-b59a-3a46-6853-4312991c19e5@linux.intel.com> Date: Fri, 2 Feb 2024 16:51:06 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.13.0 Content-Language: en-US To: Guan-Yu Lin , gregkh@linuxfoundation.org, mathias.nyman@intel.com, stern@rowland.harvard.edu, royluo@google.com, benjamin.tissoires@redhat.com, hadess@hadess.net, heikki.krogerus@linux.intel.com, grundler@chromium.org, oneukum@suse.com, dianders@chromium.org, yajun.deng@linux.dev Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, USB , Linux PM list , "Rafael J. Wysocki" References: <20240202084815.3064391-1-guanyulin@google.com> From: Mathias Nyman Subject: Re: [PATCH] usb: host: enable suspend-to-RAM control in userspace In-Reply-To: <20240202084815.3064391-1-guanyulin@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2.2.2024 10.42, Guan-Yu Lin wrote: > In systems with both a main processor and a co-processor, asynchronous > controller management can lead to conflicts. For example, the main > processor might attempt to suspend a USB device while the co-processor > is actively transferring data. To address this, we introduce a new > sysfs entry, "disable_suspend2ram", which allows userspace to control > the suspend-to-RAM functionality of devices on a specific USB bus. > Since the userspace has visibility into the activities of both > processors, it can resolve potential conflicts. > > Signed-off-by: Guan-Yu Lin > --- Doesn't setting this new disable_suspend2ram break system suspend on all other systems except this one? On any system with a PCI xHC we end up trying to suddenly stop the xHC host with all connected usb devices still fully up and running. In the xhci platform device case again nothing will be stopped or suspended, but PM framework assumes everything is suspended correctly. So then xHC either continues running and generates interrupts, or it might be abruptly powered off if the bus above it suspends. (For example if the xhci platform device is created by a PCI DWC3, and it goes to D3 state) EHCI and other hosts face similar issues with trying to suspend the controller when the devices connected to it are fully up and running. To me it looks like this whole co-processor case needs to be developed and designed into the pm framework Thanks Mathias