git: 2e88c5c4b426 - stable/13 - scsi_da: add 4K quirks for Samsung SSD 860 and 870

From: Andriy Gapon <avg_at_FreeBSD.org>
Date: Sat, 16 Mar 2024 15:16:37 UTC
The branch stable/13 has been updated by avg:

URL: https://cgit.FreeBSD.org/src/commit/?id=2e88c5c4b4263d23c16a0a1baee881db83a30773

commit 2e88c5c4b4263d23c16a0a1baee881db83a30773
Author:     Andriy Gapon <avg@FreeBSD.org>
AuthorDate: 2024-02-19 10:16:47 +0000
Commit:     Andriy Gapon <avg@FreeBSD.org>
CommitDate: 2024-03-16 15:13:13 +0000

    scsi_da: add 4K quirks for Samsung SSD 860 and 870
    
    Although the actual flash page size is either 8K or 16K for those
    devices (according to different sources of various reliability), they
    seem to be optimized for the "industry-standard" emulated 4K block size.
    
    To do: consolidate very similar Samsung SSD entries for 830 - 870
    models.
    
    (cherry picked from commit b7dce5b8e988f47784c55aa096541deda7b1aaeb)
---
 sys/cam/scsi/scsi_da.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c
index 260db5efd545..5782d414bd42 100644
--- a/sys/cam/scsi/scsi_da.c
+++ b/sys/cam/scsi/scsi_da.c
@@ -1395,6 +1395,22 @@ static struct da_quirk_entry da_quirk_table[] =
 		{ T_DIRECT, SIP_MEDIA_FIXED, "ATA", "Samsung SSD 850*", "*" },
 		/*quirks*/DA_Q_4K
 	},
+	{
+		/*
+		 * Samsung 860 SSDs
+		 * 4k optimised & trim only works in 4k requests + 4k aligned
+		 */
+		{ T_DIRECT, SIP_MEDIA_FIXED, "ATA", "Samsung SSD 860*", "*" },
+		/*quirks*/DA_Q_4K
+	},
+	{
+		/*
+		 * Samsung 870 SSDs
+		 * 4k optimised & trim only works in 4k requests + 4k aligned
+		 */
+		{ T_DIRECT, SIP_MEDIA_FIXED, "ATA", "Samsung SSD 870*", "*" },
+		/*quirks*/DA_Q_4K
+	},
 	{
 		/*
 		 * Samsung 843T Series SSDs (MZ7WD*)