Module Name: src Committed By: simonb Date: Sat Jan 18 11:22:49 UTC 2020
Modified Files: src/share/man/man4: wd.4 src/sys/dev/ata: wd.c Log Message: Revert kern/54790 and kern/54855 NCQ fix that penalised all Samsung EVO 860 drives. ok jdolecek@ To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/share/man/man4/wd.4 cvs rdiff -u -r1.455 -r1.456 src/sys/dev/ata/wd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/share/man/man4/wd.4 diff -u src/share/man/man4/wd.4:1.23 src/share/man/man4/wd.4:1.24 --- src/share/man/man4/wd.4:1.23 Tue Jan 14 09:30:34 2020 +++ src/share/man/man4/wd.4 Sat Jan 18 11:22:49 2020 @@ -1,4 +1,4 @@ -.\" $NetBSD: wd.4,v 1.23 2020/01/14 09:30:34 wiz Exp $ +.\" $NetBSD: wd.4,v 1.24 2020/01/18 11:22:49 simonb Exp $ .\" .\" .\" Copyright (c) 1994 James A. Jegers @@ -85,22 +85,6 @@ Default to false. .El .Sh NOTES Certain -.Tn Samsung -.Tn 860 EVO -SSD drives have firmware bug which causes interface CRC errors when NCQ -ATA commands are used. -For this reason NCQ is disabled for these drives by default. -Affected drives include, but are not limited to: -.Pp -.Bl -tag -width Ds -offset indent -compact -.It Samsung SSD 860 EVO 500GB -.It Samsung SSD 860 EVO 1TB -.El -.Pp -It is recommended to not use the EVO SSD drives, and replace them -with other models. -.Pp -Certain .Tn Seagate .Tn Barracuda drives sold around 2003 have a known firmware bug leading to corrupted Index: src/sys/dev/ata/wd.c diff -u src/sys/dev/ata/wd.c:1.455 src/sys/dev/ata/wd.c:1.456 --- src/sys/dev/ata/wd.c:1.455 Tue Jan 14 21:08:06 2020 +++ src/sys/dev/ata/wd.c Sat Jan 18 11:22:49 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: wd.c,v 1.455 2020/01/14 21:08:06 jdolecek Exp $ */ +/* $NetBSD: wd.c,v 1.456 2020/01/18 11:22:49 simonb Exp $ */ /* * Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved. @@ -54,7 +54,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.455 2020/01/14 21:08:06 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.456 2020/01/18 11:22:49 simonb Exp $"); #include "opt_ata.h" #include "opt_wd.h" @@ -231,9 +231,8 @@ static void bad144intern(struct wd_softc #endif #define WD_QUIRK_SPLIT_MOD15_WRITE 0x0001 /* must split certain writes */ -#define WD_QUIRK_BAD_NCQ 0x0002 /* drive NCQ support broken */ -#define WD_QUIRK_FMT "\20\1SPLIT_MOD15_WRITE\2BAD_NCQ" +#define WD_QUIRK_FMT "\20\1SPLIT_MOD15_WRITE\2FORCE_LBA48" /* * Quirk table for IDE drives. Put more-specific matches first, since @@ -260,11 +259,14 @@ static const struct wd_quirk { * Seagate Barracuda Serial ATA V family. * */ - { "ST3120023AS", WD_QUIRK_SPLIT_MOD15_WRITE }, - { "ST380023AS", WD_QUIRK_SPLIT_MOD15_WRITE }, - { "ST360015AS", WD_QUIRK_SPLIT_MOD15_WRITE }, - { "Samsung SSD 860 EVO *", WD_QUIRK_BAD_NCQ }, - { NULL, 0 } + { "ST3120023AS", + WD_QUIRK_SPLIT_MOD15_WRITE }, + { "ST380023AS", + WD_QUIRK_SPLIT_MOD15_WRITE }, + { "ST360015AS", + WD_QUIRK_SPLIT_MOD15_WRITE }, + { NULL, + 0 } }; static const struct wd_quirk * @@ -373,10 +375,6 @@ wdattach(device_t parent, device_t self, if (wd->sc_quirks & WD_QUIRK_SPLIT_MOD15_WRITE) { aprint_error_dev(self, "drive corrupts write transfers with certain controllers, consider replacing\n"); } - - if (wd->sc_quirks & WD_QUIRK_BAD_NCQ) { - aprint_error_dev(self, "drive NCQ support broken, NCQ disabled, consider replacing\n"); - } } if ((wd->sc_params.atap_multi & 0xff) > 1) { @@ -2183,7 +2181,7 @@ wd_sysctl_attach(struct wd_softc *wd) return; } - wd->drv_ncq = ((wd->sc_quirks & WD_QUIRK_BAD_NCQ) == 0) ? true : false; + wd->drv_ncq = true; if ((error = sysctl_createv(&wd->nodelog, 0, NULL, NULL, CTLFLAG_READWRITE, CTLTYPE_BOOL, "use_ncq", SYSCTL_DESCR("use NCQ if supported"),