From 23030355c6020688dda2e0c777e8aab467bc6ed5 Mon Sep 17 00:00:00 2001 From: Sean Bruno Date: Tue, 17 Jan 2017 14:52:48 +0000 Subject: [PATCH] Add 4k quirk for Micron 5100 and Intel S3610 SSDs Submitted by: Jason Wolfe MFH: 1 week Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D9209 --- sys/cam/ata/ata_da.c | 16 ++++++++++++++++ sys/cam/scsi/scsi_da.c | 13 +++++++++++++ 2 files changed, 29 insertions(+) diff --git a/sys/cam/ata/ata_da.c b/sys/cam/ata/ata_da.c index 45a27e281cf5..867cf96bb43b 100644 --- a/sys/cam/ata/ata_da.c +++ b/sys/cam/ata/ata_da.c @@ -511,6 +511,14 @@ static struct ada_quirk_entry ada_quirk_table[] = { T_DIRECT, SIP_MEDIA_FIXED, "*", "INTEL SSDSC2BW*", "*" }, /*quirks*/ADA_Q_4K }, + { + /* + * Intel S3610 Series SSDs + * 4k optimised & trim only works in 4k requests + 4k aligned + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "INTEL SSDSC2BX*", "*" }, + /*quirks*/ADA_Q_4K + }, { /* * Intel X25-M Series SSDs @@ -567,6 +575,14 @@ static struct ada_quirk_entry ada_quirk_table[] = { T_DIRECT, SIP_MEDIA_FIXED, "*", "Micron M5[15]0*", "MU01" }, /*quirks*/ADA_Q_NCQ_TRIM_BROKEN }, + { + /* + * Micron 5100 SSDs + * 4k optimised & trim only works in 4k requests + 4k aligned + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "Micron 5100 MTFDDAK*", "*" }, + /*quirks*/ADA_Q_4K + }, { /* * OCZ Agility 2 SSDs diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c index cad8f01a11cb..55f2386262a2 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -828,6 +828,11 @@ static struct da_quirk_entry da_quirk_table[] = { T_DIRECT, SIP_MEDIA_FIXED, "Hitachi", "H??????????E3*", "*" }, /*quirks*/DA_Q_4K }, + { + /* Micron Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "Micron 5100 MTFDDAK*", "*" }, + /*quirks*/DA_Q_4K + }, { /* Samsung Advanced Format (4k) drives */ { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "SAMSUNG HD155UI*", "*" }, @@ -1149,6 +1154,14 @@ static struct da_quirk_entry da_quirk_table[] = { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "INTEL SSDSC2BW*", "*" }, /*quirks*/DA_Q_4K }, + { + /* + * Intel S3610 Series SSDs + * 4k optimised & trim only works in 4k requests + 4k aligned + */ + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "INTEL SSDSC2BX*", "*" }, + /*quirks*/DA_Q_4K + }, { /* * Intel X25-M Series SSDs