I've merged the NCQ branch to HEAD.
NCQ is supported on ahcisata(4), siisata(4), and mvsata(4) Gen IIe at this moment.
The code was quite extensively tested on that harware on amd64. Other archs and drivers compile, but I had no way to test them. Particularily, I had no chance to really test any real IDE disks, neither any non-PCI controller attachments. If you are in position to confirm them working, I'd appreciate it.
Please report any problems, I'll fix any potential fallout ASAP.
Performance wise, I've tested so far only sequential I/O via fio and dd with cache enabled. I observed very mild (>2%, 72.7->74.8 MB/s) performance increase for spinning rust HDD, but quite big increase for SSD (350->450 MB/s). With disabled disk cache, or random I/O, NCQ will probably have more effect.