git: 50aa22323424 - stable/14 - 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:13 UTC
The branch stable/14 has been updated by avg:

URL: https://cgit.FreeBSD.org/src/commit/?id=50aa22323424ccea00ef5d8f24e729a480cc77eb

commit 50aa22323424ccea00ef5d8f24e729a480cc77eb
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:12:53 +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 df44d2279fbe..ae691520e157 100644
--- a/sys/cam/scsi/scsi_da.c
+++ b/sys/cam/scsi/scsi_da.c
@@ -1396,6 +1396,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*)