From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 0BF01421890 for ; Tue, 20 Jan 2026 13:07:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768914435; cv=none; b=LOLjVXoi0Vt9WZGoXknU6OHcEEz7Aq3jYtELK0u8ryCge2pQnHwLNFRhBXc0iFknMvoRHn/6WEoZPC651FkpzLPRNVBJA5aeHGl/E4K8wh1YEZ+VoRy+o/AbJ7oDt1sh3qjneoJoHJQnamvnLR7yy/9xL0yo304NIx5q1RqJZ+o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768914435; c=relaxed/simple; bh=UlB5yRzWjbd9rzx2/3ilE/naB7En8NATr8OJu1uls4M=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=RjKkgoJg+tw5tmpyUqObBzzqvAy76UfX+TPk78g7eC199/uNGqqZRXw5sKPmJmYkU3fg0BrTJaA6i3cygPH+jghxdsH2NlvJBULM2HiB+0zRFNd8p123LC85F7uCcVuoQsrXW4AqGwF3B+/IRcFY+4SZshGzy6dJM0AaYPPckyc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=yrdacjqk; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="yrdacjqk" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3B278C16AAE; Tue, 20 Jan 2026 13:07:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1768914434; bh=UlB5yRzWjbd9rzx2/3ilE/naB7En8NATr8OJu1uls4M=; h=Subject:To:Cc:From:Date:From; b=yrdacjqkn2nafkg2GmHOO3ebPI/3t0U59EDayCpv/Kvy8bvYHfnPO+CB3/Lv48WiN bXPCPAwiChunAQPXIS50aoEjng67KVyJq5UKC4M+zf3cMoGx4kshla8UqrTAGBn5cZ dV7AmNWXrGIaL86CIeA03xQ9pDjq1Mk4NYpEhWpE= Subject: FAILED: patch "[PATCH] nvme: fix PCIe subsystem reset controller state transition" failed to apply to 6.6-stable tree To: nilay@linux.ibm.com,dwagner@suse.de,kbusch@kernel.org Cc: From: Date: Tue, 20 Jan 2026 14:07:11 +0100 Message-ID: <2026012011-happily-padded-148c@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The patch below does not apply to the 6.6-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.6.y git checkout FETCH_HEAD git cherry-pick -x 0edb475ac0a7d153318a24d4dca175a270a5cc4f # git commit -s git send-email --to '' --in-reply-to '2026012011-happily-padded-148c@gregkh' --subject-prefix 'PATCH 6.6.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 0edb475ac0a7d153318a24d4dca175a270a5cc4f Mon Sep 17 00:00:00 2001 From: Nilay Shroff Date: Wed, 14 Jan 2026 12:54:13 +0530 Subject: [PATCH] nvme: fix PCIe subsystem reset controller state transition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The commit d2fe192348f9 (“nvme: only allow entering LIVE from CONNECTING state”) disallows controller state transitions directly from RESETTING to LIVE. However, the NVMe PCIe subsystem reset path relies on this transition to recover the controller on PowerPC (PPC) systems. On PPC systems, issuing a subsystem reset causes a temporary loss of communication with the NVMe adapter. A subsequent PCIe MMIO read then triggers EEH recovery, which restores the PCIe link and brings the controller back online. For EEH recovery to proceed correctly, the controller must transition back to the LIVE state. Due to the changes introduced by commit d2fe192348f9 (“nvme: only allow entering LIVE from CONNECTING state”), the controller can no longer transition directly from RESETTING to LIVE. As a result, EEH recovery exits prematurely, leaving the controller stuck in the RESETTING state. Fix this by explicitly transitioning the controller state from RESETTING to CONNECTING and then to LIVE. This satisfies the updated state transition rules and allows the controller to be successfully recovered on PPC systems following a PCIe subsystem reset. Cc: stable@vger.kernel.org Fixes: d2fe192348f9 ("nvme: only allow entering LIVE from CONNECTING state") Reviewed-by: Daniel Wagner Signed-off-by: Nilay Shroff Signed-off-by: Keith Busch diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index 29e715d5b8f3..58f3097888a7 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -1532,7 +1532,10 @@ static int nvme_pci_subsystem_reset(struct nvme_ctrl *ctrl) } writel(NVME_SUBSYS_RESET, dev->bar + NVME_REG_NSSR); - nvme_change_ctrl_state(ctrl, NVME_CTRL_LIVE); + + if (!nvme_change_ctrl_state(ctrl, NVME_CTRL_CONNECTING) || + !nvme_change_ctrl_state(ctrl, NVME_CTRL_LIVE)) + goto unlock; /* * Read controller status to flush the previous write and trigger a