From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B9683242D62 for ; Tue, 25 Nov 2025 16:14:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764087285; cv=none; b=jNvFj+8HEVJTraWRR9LuqO9hHbmxB8BbALZ4LBzFcG3adKFJ3QaHl55PR1zisUIaUDC3Ws4f5UtkZktYliO8IRciIlYlpuE0xIQt0yaSJku6qSkQDNJFNOGiOFel4Xt5e2firjktGsuRFcfmIEsYePMaRJURILNPOAxhetKQVXM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764087285; c=relaxed/simple; bh=7WpdqrsxKc58eqdMOT/GfNUzGo38GTGSCp96a60kVdU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GNcx9kmIMmiG5duIetJ/L5mQsaGhgxFT5bzJR09q8EcpKNyyuuAIotpGv6ltZDCSwECA//q5MEKCY6Uwsy0lFTiefhyWT+eTg2ZxuGEyjZzpdOB24GYgeUcjBFAAI+0asuRGhNk+AzSl5uMU6YiR/ZVUx+Y54A32NIJ0QxlgQxQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=WdWboLe6; arc=none smtp.client-ip=209.85.210.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="WdWboLe6" Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-7b89c1ce9easo6689932b3a.2 for ; Tue, 25 Nov 2025 08:14:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1764087283; x=1764692083; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=BS22/Jgjgk8LyIJMs2VxEyscWALwx2agFhzMZn6bbEo=; b=WdWboLe6k5MY1+5QgdeV8N6a4a/lw+oAOkLuYWAipkAE4GBPSyYIg9/EULlV/mjob/ w9rSyJztFdKqDUtEUW+aFDjYAEIKQUUnFlghn10Ww07UI4cst6z4vz0IwXm3/bJqhkk0 L+KXU63ZNt8UtUMLDQ57O6IoRkF7MiXB6gZFc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764087283; x=1764692083; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BS22/Jgjgk8LyIJMs2VxEyscWALwx2agFhzMZn6bbEo=; b=IqTC1OwUXNZMvxZVYFEPfz3ifTMMAZEBdMNeJOl0tV6yHqd+W2XLWF6dghnIkuGF7O ooungc0Mg/D1YF9NNIslqYhvkRDitcfCPFVucsHaaME9abfhF2ysh19DMthWJs138lgk ply9Tib7LxaQAQnw55lbL9cD44dpD/J8+TEODss+VQbYg2JO2RNcOekPOezNKAq/Cs34 ld5gPZe4fn154b0kbLJm2Rcp9pJTcnI7n3IAEgVuTBYHr8kbAiaAxT9Qn1EFLo1foiu1 JR1CUl65WNUJ2mJswn4pCYL8xfErAlrvFI/ffF31z/914P32BY1Kx+0M1ngrQ0N4o7Qq WO/g== X-Forwarded-Encrypted: i=1; AJvYcCUxJTLww4Hq/+rB3OQlxs2uQ6O/Dl97P9aDne7Bx8MoJR1Q64YrIVbJt4NERcnM5hI8mqG/zhu4in4cl/0=@vger.kernel.org X-Gm-Message-State: AOJu0YyBvmC30nAJgkmDZLyzUesHAM6cqIzG5Iqdgrztf3rcLH8ZIv2K FmLDlyaBbwFVPSMOWjiOGKqJeKKy4xrM6o3D+ify7pVLY2h0tb1dYoC50W8un6DqMg== X-Gm-Gg: ASbGncv59kxdVv+Ku8YTz9R8IlI4onbKSz7/XbALOrhc7odDEnD57vLWOu7VO2l/yco PORjStyS/hGxqLNM5RJ8TPij/q7+dvsPNyvds8WSwrqIhvnMZZ4AWqnMMzjsiOdN4GhW8IocJgZ mJ77DeRqniGKOSIf1wvLDDFTqb4GJf/oXGZmp/t9TqjwMkVkXDh7ETyG0X4DBgUE/E011eCTkNV WFlzCoKrtca+1VK5UWvjuCk0kuIprF7j8nUgL8zs16WsriFsDdjzmxpmW3u2W+QbFV0NCJMJtl2 YFe6yig5FIlZz2V/JBrPAaSazRTqx+zAg64RNuRobWNiTUQ241NeGK6Gh7rL45cysAnzmfPghsZ C8ey+VWXnMtXg/eZHJDv4cvMVGsGbNN3XfGMiXU6fPGxonDesAzgMTSbshfbsBJ5ZHVOGRkUWOZ 5EceBHGZQM+86zAnClFEGKE3WwPYjgBWeGZDkvEET8nqNznw== X-Google-Smtp-Source: AGHT+IHXwLO4qNaJvPVHWCGuBXPcsFgzsSjBBHzxsy8o1WTDGbCMGBLQXUoIz6DkSJEImlVVulsTxQ== X-Received: by 2002:a05:7022:e19:b0:119:e569:f262 with SMTP id a92af1059eb24-11c9d7185c7mr11638583c88.11.1764087282717; Tue, 25 Nov 2025 08:14:42 -0800 (PST) Received: from localhost ([2a00:79e0:2e7c:8:62e0:9ddd:dee9:122b]) by smtp.gmail.com with UTF8SMTPSA id a92af1059eb24-11c93e3e784sm61789747c88.5.2025.11.25.08.14.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 25 Nov 2025 08:14:42 -0800 (PST) Date: Tue, 25 Nov 2025 08:14:39 -0800 From: Brian Norris To: Bjorn Helgaas Cc: Lukas Wunner , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-pm@vger.kernel.org, "Rafael J . Wysocki" , Ilpo =?iso-8859-1?Q?J=E4rvinen?= Subject: Re: [PATCH v4] PCI/PM: Prevent runtime suspend before devices are fully initialized Message-ID: References: <20251023140901.v4.1.I60a53c170a8596661883bd2b4ef475155c7aa72b@changeid> 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: <20251023140901.v4.1.I60a53c170a8596661883bd2b4ef475155c7aa72b@changeid> Hi Bjorn, On Thu, Oct 23, 2025 at 02:09:01PM -0700, Brian Norris wrote: > Today, it's possible for a PCI device to be created and > runtime-suspended before it is fully initialized. When that happens, the > device will remain in D0, but the suspend process may save an > intermediate version of that device's state -- for example, without > appropriate BAR configuration. When the device later resumes, we'll > restore invalid PCI state and the device may not function. > > Prevent runtime suspend for PCI devices by deferring pm_runtime_enable() > until we've fully initialized the device. [...] > Link: https://lore.kernel.org/all/20251016155335.1.I60a53c170a8596661883bd2b4ef475155c7aa72b@changeid/ > Signed-off-by: Brian Norris > Cc: > Reviewed-by: Rafael J. Wysocki (Intel) > --- > > Changes in v4: > * Move pm_runtime_set_active() too > > Changes in v3: > * Add Link to initial discussion > * Add Rafael's Reviewed-by > * Add lengthier footnotes about forbid vs allow vs sysfs > > Changes in v2: > * Update CC list > * Rework problem description > * Update solution: defer pm_runtime_enable(), instead of trying to > get()/put() > > drivers/pci/bus.c | 4 ++++ > drivers/pci/pci.c | 2 -- > 2 files changed, 4 insertions(+), 2 deletions(-) I'm wondering what the status of this patch is, as the next merge window is approaching. It fixes a critical bug for me, and it has had plenty of review. Thanks, Brian