From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 61721C5AE59 for ; Thu, 5 Jun 2025 08:47:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0D0C010E84A; Thu, 5 Jun 2025 08:47:04 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="ZMoh8JMq"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8434610E0CA for ; Wed, 4 Jun 2025 15:43:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1749051786; x=1780587786; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=KBvw1K5sntUXh/9Sm7OBz9ypq0dkXEpUOjGj1PVTgew=; b=ZMoh8JMqCn4N4jYSDyrjCH0+wa6qkZ5J2YvR5Y55HFtZ5Vlp7YvhUVEO +QWAGkmglNn6tb+jkxrH5otOX65xyCMJN4CO9PAZPNPtmXoDCQc7pqsoD ZM04qicy6OhYzMU79CE/WD2rwdRfxoT3w7Wa94XeoA8pdquAJE2IJEo3a VLtBz10bpEOVx0Au2Yuw5ilP8w6bhp92+ArVEoJ3+4HurH1MrPTTTWM5w wV/qNi5i2vFlglkaAnfQtWPq1JmsW4sTzGqgE4jbXCOXCgqSnfN7tdtff E6NbeA15OzVaHO5JBrQO0Q5Xj9J7bFYl43oP5WYpW8JzQ/5Mnld+uOspB Q==; X-CSE-ConnectionGUID: D9VlcAhETqei0ec/62ed5A== X-CSE-MsgGUID: NM1sHlMpRKGIS/bwlX3zOQ== X-IronPort-AV: E=McAfee;i="6800,10657,11454"; a="54805235" X-IronPort-AV: E=Sophos;i="6.16,209,1744095600"; d="scan'208";a="54805235" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 08:43:06 -0700 X-CSE-ConnectionGUID: Hv+B9f7XStyUfmL40SnJng== X-CSE-MsgGUID: mdH1lAQOTdeUENpSGK9z6g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.16,209,1744095600"; d="scan'208";a="145557168" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa008.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 08:42:50 -0700 Date: Wed, 4 Jun 2025 18:42:47 +0300 From: Raag Jadav To: "Rafael J. Wysocki" Cc: Mario Limonciello , Denis Benato , mahesh@linux.ibm.com, oohall@gmail.com, bhelgaas@google.com, linux-pci@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, ilpo.jarvinen@linux.intel.com, lukas@wunner.de, aravind.iddamsetty@linux.intel.com, "amd-gfx@lists.freedesktop.org" , Alex Deucher Subject: Re: [PATCH v4] PCI: Prevent power state transition of erroneous device Message-ID: References: <552d75b2-2736-419f-887e-ce2692616578@kernel.org> <6f23d82c-10cc-4d70-9dce-41978b05ec9a@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Mailman-Approved-At: Thu, 05 Jun 2025 08:47:02 +0000 X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" On Fri, May 30, 2025 at 07:49:26PM +0200, Rafael J. Wysocki wrote: > On Fri, May 30, 2025 at 7:23 PM Raag Jadav wrote: > > On Fri, May 23, 2025 at 05:23:10PM +0200, Rafael J. Wysocki wrote: > > > On Wed, May 21, 2025 at 1:27 PM Rafael J. Wysocki wrote: > > > > On Wed, May 21, 2025 at 10:54 AM Raag Jadav wrote: > > > > > On Tue, May 20, 2025 at 01:56:28PM -0500, Mario Limonciello wrote: > > > > > > On 5/20/2025 1:42 PM, Raag Jadav wrote: > > > > > > > On Tue, May 20, 2025 at 12:39:12PM -0500, Mario Limonciello wrote: ... > > > > > > From the driver perspective it does have expectations that the parts outside > > > > > > the driver did the right thing. If the driver was expecting the root port > > > > > > to be powered down at suspend and it wasn't there are hardware components > > > > > > that didn't power cycle and that's what we're seeing here. > > > > > > > > > > Which means the expectation set by the driver is the opposite of the > > > > > purpose of this patch, and it's going to fail if any kind of error is > > > > > detected under root port during suspend. > > > > > > > > And IMV this driver's expectation is questionable at least. > > > > > > > > There is no promise whatsoever that the device will always be put into > > > > D3cold during system suspend. > > > > > > For instance, user space may disable D3cold for any PCI device via the > > > d3cold_allowed attribute in sysfs. > > > > > > If the driver cannot handle this, it needs to be fixed. > > > > Thanks for confirming. So should we consider this patch to be valid > > and worth moving forward? > > It doesn't do anything that would be invalid in principle IMV. > > You need to consider one more thing, though: It may be necessary to > power-cycle the device in order to kick it out of the erroneous state > and the patch effectively blocks this if I'm not mistaken. > > But admittedly I'm not sure if this really matters. Wouldn't something like bus reset (SBR) be more predictable? Raag