From: Greg Kroah-Hartman Date: Wed, 17 Jun 2026 04:16:40 +0000 (+0530) Subject: drop some nvme 5.15 patches X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=19280668b499b4532f2a96c74a15f139da3eb4b5;p=thirdparty%2Fkernel%2Fstable-queue.git drop some nvme 5.15 patches --- diff --git a/queue-5.15/nvme-fix-discard-support-without-oncs.patch b/queue-5.15/nvme-fix-discard-support-without-oncs.patch deleted file mode 100644 index d2859425a1..0000000000 --- a/queue-5.15/nvme-fix-discard-support-without-oncs.patch +++ /dev/null @@ -1,52 +0,0 @@ -From d3205ab75e99a47539ec91ef85ba488f4ddfeaa9 Mon Sep 17 00:00:00 2001 -From: Keith Busch -Date: Mon, 3 Apr 2023 13:09:25 -0700 -Subject: nvme: fix discard support without oncs - -From: Keith Busch - -commit d3205ab75e99a47539ec91ef85ba488f4ddfeaa9 upstream. - -The device can report discard support without setting the ONCS DSM bit. -When not set, the driver clears max_discard_size expecting it to be set -later. We don't know the size until we have the namespace format, -though, so setting it is deferred until configuring one, but the driver -was abandoning the discard settings due to that initial clearing. - -Move the max_discard_size calculation above the check for a '0' discard -size. - -Fixes: 1a86924e4f46475 ("nvme: fix interpretation of DMRSL") -Reported-by: Laurence Oberman -Signed-off-by: Keith Busch -Reviewed-by: Niklas Cassel -Reviewed-by: Sagi Grimberg -Tested-by: Laurence Oberman -Signed-off-by: Christoph Hellwig -Signed-off-by: Greg Kroah-Hartman ---- - drivers/nvme/host/core.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - ---- a/drivers/nvme/host/core.c -+++ b/drivers/nvme/host/core.c -@@ -1718,6 +1718,9 @@ static void nvme_config_discard(struct g - struct request_queue *queue = disk->queue; - u32 size = queue_logical_block_size(queue); - -+ if (ctrl->dmrsl && ctrl->dmrsl <= nvme_sect_to_lba(ns, UINT_MAX)) -+ ctrl->max_discard_sectors = nvme_lba_to_sect(ns, ctrl->dmrsl); -+ - if (ctrl->max_discard_sectors == 0) { - blk_queue_flag_clear(QUEUE_FLAG_DISCARD, queue); - return; -@@ -1736,9 +1739,6 @@ static void nvme_config_discard(struct g - if (blk_queue_flag_test_and_set(QUEUE_FLAG_DISCARD, queue)) - return; - -- if (ctrl->dmrsl && ctrl->dmrsl <= nvme_sect_to_lba(ns, UINT_MAX)) -- ctrl->max_discard_sectors = nvme_lba_to_sect(ns, ctrl->dmrsl); -- - blk_queue_max_discard_sectors(queue, ctrl->max_discard_sectors); - blk_queue_max_discard_segments(queue, ctrl->max_discard_segments); - diff --git a/queue-5.15/nvme-fix-interpretation-of-dmrsl.patch b/queue-5.15/nvme-fix-interpretation-of-dmrsl.patch deleted file mode 100644 index dc0d9e5247..0000000000 --- a/queue-5.15/nvme-fix-interpretation-of-dmrsl.patch +++ /dev/null @@ -1,57 +0,0 @@ -From stable+bounces-242557-greg=kroah.com@vger.kernel.org Sat May 2 04:58:14 2026 -From: Sasha Levin -Date: Fri, 1 May 2026 19:27:43 -0400 -Subject: nvme: fix interpretation of DMRSL -To: stable@vger.kernel.org -Cc: Tom Yan , Christoph Hellwig , Sasha Levin -Message-ID: <20260501232744.4102493-1-sashal@kernel.org> - -From: Tom Yan - -[ Upstream commit 1a86924e4f464757546d7f7bdc469be237918395 ] - -DMRSLl is in the unit of logical blocks, while max_discard_sectors is -in the unit of "linux sector". - -Signed-off-by: Tom Yan -Signed-off-by: Christoph Hellwig -Stable-dep-of: 40f0496b617b ("nvme: respect NVME_QUIRK_DISABLE_WRITE_ZEROES when wzsl is set") -Signed-off-by: Sasha Levin -Signed-off-by: Greg Kroah-Hartman ---- - drivers/nvme/host/core.c | 6 ++++-- - drivers/nvme/host/nvme.h | 1 + - 2 files changed, 5 insertions(+), 2 deletions(-) - ---- a/drivers/nvme/host/core.c -+++ b/drivers/nvme/host/core.c -@@ -1736,6 +1736,9 @@ static void nvme_config_discard(struct g - if (blk_queue_flag_test_and_set(QUEUE_FLAG_DISCARD, queue)) - return; - -+ if (ctrl->dmrsl && ctrl->dmrsl <= nvme_sect_to_lba(ns, UINT_MAX)) -+ ctrl->max_discard_sectors = nvme_lba_to_sect(ns, ctrl->dmrsl); -+ - blk_queue_max_discard_sectors(queue, ctrl->max_discard_sectors); - blk_queue_max_discard_segments(queue, ctrl->max_discard_segments); - -@@ -2948,8 +2951,7 @@ static int nvme_init_non_mdts_limits(str - - if (id->dmrl) - ctrl->max_discard_segments = id->dmrl; -- if (id->dmrsl) -- ctrl->max_discard_sectors = le32_to_cpu(id->dmrsl); -+ ctrl->dmrsl = le32_to_cpu(id->dmrsl); - if (id->wzsl) - ctrl->max_zeroes_sectors = nvme_mps_to_sectors(ctrl, id->wzsl); - ---- a/drivers/nvme/host/nvme.h -+++ b/drivers/nvme/host/nvme.h -@@ -299,6 +299,7 @@ struct nvme_ctrl { - #endif - u16 crdt[3]; - u16 oncs; -+ u32 dmrsl; - u16 oacs; - u16 nssa; - u16 nr_streams; diff --git a/queue-5.15/nvme-respect-nvme_quirk_disable_write_zeroes-when-wzsl-is-set.patch b/queue-5.15/nvme-respect-nvme_quirk_disable_write_zeroes-when-wzsl-is-set.patch deleted file mode 100644 index e3f5fd6b83..0000000000 --- a/queue-5.15/nvme-respect-nvme_quirk_disable_write_zeroes-when-wzsl-is-set.patch +++ /dev/null @@ -1,45 +0,0 @@ -From stable+bounces-242556-greg=kroah.com@vger.kernel.org Sat May 2 04:58:05 2026 -From: Sasha Levin -Date: Fri, 1 May 2026 19:27:44 -0400 -Subject: nvme: respect NVME_QUIRK_DISABLE_WRITE_ZEROES when wzsl is set -To: stable@vger.kernel.org -Cc: Robert Beckett , Keith Busch , Sasha Levin -Message-ID: <20260501232744.4102493-2-sashal@kernel.org> - -From: Robert Beckett - -[ Upstream commit 40f0496b617b431f8d2dd94d7f785c1121f8a68a ] - -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 -Signed-off-by: Sasha Levin -Signed-off-by: Greg Kroah-Hartman ---- - drivers/nvme/host/core.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/nvme/host/core.c -+++ b/drivers/nvme/host/core.c -@@ -2952,7 +2952,7 @@ static int nvme_init_non_mdts_limits(str - if (id->dmrl) - ctrl->max_discard_segments = 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: diff --git a/queue-5.15/series b/queue-5.15/series index 85a22a7317..a1bb8aa261 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -266,8 +266,6 @@ alsa-aoa-i2sbus-clear-stale-prepared-state.patch media-rc-ttusbir-respect-dma-coherency-rules.patch alsa-aoa-skip-devices-with-no-codecs-in-i2sbus_resume.patch erofs-fix-the-out-of-bounds-nameoff-handling-for-trailing-dirents.patch -nvme-fix-interpretation-of-dmrsl.patch -nvme-respect-nvme_quirk_disable_write_zeroes-when-wzsl-is-set.patch media-rc-igorplugusb-heed-coherency-rules.patch sched-use-u64-for-bandwidth-ratio-calculations.patch alsa-core-fix-potential-data-race-at-fasync-handling.patch @@ -409,4 +407,3 @@ crypto-nx-fix-context-leak-in-nx842_crypto_free_ctx.patch media-rc-ttusbir-fix-inverted-error-logic.patch batman-adv-tp_meter-fix-tp_vars-reference-leak-in-receiver-shutdown.patch media-rc-igorplugusb-fix-control-request-setup-packet.patch -nvme-fix-discard-support-without-oncs.patch