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 6500739C001 for ; Fri, 1 May 2026 11:02:36 +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=1777633356; cv=none; b=KgXrEYfRN1yJil1+uwdHtgdvjVlAGlyMHZye0DICd4QoxmFVTvkMbzaIUYcHNUWhAfeA41SxvCnFvM5tCP3KQM43HobZxhavJPhO6mPjIrX3ENMKVZmJzgd0nyftluiUzPT+yZBwu10+RcriduuyWHcT68shQFgRoCul1OHLWdA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777633356; c=relaxed/simple; bh=glOQBQm7HtFbEWLCaL/6EIg3p26x3apOof2dPg04V5c=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=d+ebtd59WcRD2IqPidZOTIthdvLSMQsweRz7OG/KfD2OgkIQVLAUhZjoqnMWco19uAVp5D3hGV7M5kTgrZcF75HHd6ksBZD0fl5knr20+kYRvmAolaNpaOx3la69xw7j8fVs2F4iIhWcwXRU1dPubvXR6JTDPJqq1GAw3e66Vf4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Iq94K9SG; 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="Iq94K9SG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EF2AEC2BCB7; Fri, 1 May 2026 11:02:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1777633356; bh=glOQBQm7HtFbEWLCaL/6EIg3p26x3apOof2dPg04V5c=; h=Subject:To:Cc:From:Date:From; b=Iq94K9SGSZfbG6WmbQXhtDebmky0UsC+t+w+iYfZ5nGD4bBOmByMVLhZhZrBMcNvS MnIzwxe6KdqRHsRiyWXrt/4wEjus7IfINnZ+VeqtN3611rm7lCsVKJeWDYXAqVqOQo Npbf9X9eNy/g1yGME9KWMXYhxXO6LmIBiDiRBYRg= Subject: FAILED: patch "[PATCH] nvme: respect NVME_QUIRK_DISABLE_WRITE_ZEROES when wzsl is" failed to apply to 5.15-stable tree To: bob.beckett@collabora.com,kbusch@kernel.org Cc: From: Date: Fri, 01 May 2026 13:02:33 +0200 Message-ID: <2026050133-dipped-hedge-8292@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=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 5.15-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-5.15.y git checkout FETCH_HEAD git cherry-pick -x 40f0496b617b431f8d2dd94d7f785c1121f8a68a # git commit -s git send-email --to '' --in-reply-to '2026050133-dipped-hedge-8292@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 40f0496b617b431f8d2dd94d7f785c1121f8a68a Mon Sep 17 00:00:00 2001 From: Robert Beckett Date: Fri, 20 Mar 2026 19:22:08 +0000 Subject: [PATCH] nvme: respect NVME_QUIRK_DISABLE_WRITE_ZEROES when wzsl is set The NVM Command Set Identify Controller data may report a non-zero Write Zeroes Size Limit (wzsl). When present, nvme_init_non_mdts_limits() unconditionally overrides max_zeroes_sectors from wzsl, even if NVME_QUIRK_DISABLE_WRITE_ZEROES previously set it to zero. This effectively re-enables write zeroes for devices that need it disabled, defeating the quirk. Several Kingston OM* drives rely on this quirk to avoid firmware issues with write zeroes commands. Check for the quirk before applying the wzsl override. Fixes: 5befc7c26e5a ("nvme: implement non-mdts command limits") Cc: stable@vger.kernel.org Signed-off-by: Robert Beckett Assisted-by: claude-opus-4-6-v1 Signed-off-by: Keith Busch diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index d2256fa95685..b42d8768d297 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -3419,7 +3419,7 @@ static int nvme_init_non_mdts_limits(struct nvme_ctrl *ctrl) ctrl->dmrl = id->dmrl; ctrl->dmrsl = le32_to_cpu(id->dmrsl); - if (id->wzsl) + if (id->wzsl && !(ctrl->quirks & NVME_QUIRK_DISABLE_WRITE_ZEROES)) ctrl->max_zeroes_sectors = nvme_mps_to_sectors(ctrl, id->wzsl); free_data: