Other Samsung 850 evo 500GB SSD: how to disable NCQ at boot?

I was trying to install PC-BSD but the installer freezes while copying files to the SSD. I tried to switch to other VTs to find out what was going on but the screen became corrupted.

The I tried installing DragonFlyBSD and the installer finished, probably only because there was less to install.
As I installed pkgs, disk errors started to appear about NCQ and trim.

I did some searching and found that many in-Windows-ok Samsung SSD have problems with filesystem corruption after ncq-enabled trim in linux. Some recent kernels have been patched to deal with this. I decided to test Lubuntu 15.04: it installed but after a few hours of intense-for-desktop disk activity, I discovered that dpkg-* binaries had been corrupted and were seg. faulting and apt-* scripts were failing. In syslog there were errors about NCQ.

So I reinstalled and immediately updated the from 3.19.0-15-generic (built sometime in April 2015, definitely before the Samsung NCQ problem was found) to the latest 3.19.0-28-generic before repeating the disk workout. (The testing is apt-get installing texlive while copying 128GB from my external drive to the SSD at about 1GB/min.)

Everything seemed fine but there were lots of messages in syslog:
Code:
ata1.00: failed to get NCQ Send/Recv Log Emask 0x1

Adding the boot parameter libata.force=noncq stopped the warnings about NCQ and everything seems fine with ncq disabled:

Code:
cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-3.19.0-28-generic
root=UUID=8e3b1891-8756-4db4-b77d-ed966b7ae738 ro
libata.force=noncq quiet splash vt.handoff=7

dmesg | grep noncq
ata1.00: FORCE: horkage modified (noncq)

lspci | grep SATA
00:1f.2 SATA controller: Intel Corporation
NM10/ICH7 Family SATA Controller [AHCI mode] (rev 02)

Is there a way to disable native command queue at boot in FreeBSD? Are there other problems with this drive/controller and BSD? It could be that the drive is just a dud?

Oh, and what the hell is "horkage?"
 
Not my expertise here but there looks to be a command to do so in the commit message for https://svnweb.FreeBSD.org/changeset/base/236437 by mav@.

From camcontrol(8):
negotiate ...
-T enable|disable Enable or disable tagged queueing for a device.

There's also some discussion on doing so in a custom /usr/local/etc/rc.d script that may be of value. This does mention a different command however so perhaps mav@ can clarify.
https://lists.FreeBSD.org/pipermail/freebsd-questions/2012-October/245569.html
 
Back
Top