Skip to content
Henryk Paluch edited this page Dec 14, 2023 · 1 revision

AHCI

AHCI (Advanced Host Controller Interface) is hardware standard for portable SATA controllers. Having just single AHCI driver in operating system it should be possible to use any AHCI compliant SATA controller. Please see official https://en.wikipedia.org/wiki/Advanced_Host_Controller_Interface for details on AHCI.

NOTE: There exists also xHCI which is similar standard for USB Controller.

I decided to buy on to:

  • avoid issues with FreeBSD (corrupting data on MCP 55 SATA Controller), NetBSD (hanging when SATA 3 drive is connected to SATA 2 MCP 55 Controller) and possibly others.
  • utilize full SATA 3 speed for fast drives (Seagate Iron Wolf HDD, and few SSDs)

Paradoxically I encountered also new problem:

  • AHCI "community" driver was dropped from VMware ESXi 5.5 (but MCP 55 is there up to ESXi 6.0 as sata_nv)

ASMedia 1164

Recently I bought PCIe AHCI SATA 3.0 controller, here:

Probably matches this:

Here are details from Linux host

$  lspci -s 03:00.0 -v

03:00.0 SATA controller: ASMedia Technology Inc. Device 1164 (rev 02) (prog-if 01 [AHCI 1.0])
	Subsystem: ZyDAS Technology Corp. Device 2116
	Flags: bus master, fast devsel, latency 0, IRQ 24, NUMA node 0
	Memory at fcefe000 (32-bit, non-prefetchable) [size=8K]
	Memory at fcefc000 (32-bit, non-prefetchable) [size=8K]
	Expansion ROM at fce00000 [disabled] [size=512K]
	Capabilities: [40] Power Management version 3
	Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+
	Capabilities: [80] Express Endpoint, MSI 00
	Capabilities: [100] Advanced Error Reporting
	Capabilities: [130] Secondary PCI Express
	Kernel driver in use: ahci
	Kernel modules: ahci

dmesg -t | fgrep -i ahci

ahci 0000:03:00.0: version 3.0
ahci 0000:03:00.0: SSS flag set, parallel bus scan disabled
ahci 0000:03:00.0: AHCI 0001.0301 32 slots 24 ports 6 Gbps 0xffff0f impl SATA mode
ahci 0000:03:00.0: flags: 64bit ncq sntf stag pm led clo only pio sxs deso sadm sds apst 
...

I'm unable to dump PCI ROM (rom file in SYSFS) - it always says "Invalid argument"

Known issues

Insufficient LED current

There is insufficient current to drive HDD LEDs. Although there is pinhead connector for HDD LEDs (dedicated LED for each channel - 4 in total) it does now work with some LEDs that require higher voltage and/or current. Depending on technology LEDs may very wide requirement of threshold voltage (roughly from 1.3V to 2.5V). I had found with DMM that without load the voltage is just 1.8V and it quickly drops when under load. In my case it is able to drive some very new bright LEDs but not typical LEDs on HDD bay (for example Icy Box 168SK-B and/or on older PC Case.

Dropped ESXi 5.5+ driver

ESXi 5.5+ dropped "community" AHCI driver (ported from Linux). There exists community workaround (but not yet for this ASMedia1164, because its PCI VID:DID is not on the list yet). Plase see ESXi 6 AHCI for details.

OS Support

Good:

  • Linux, FreeBSD, NetBSD, OpenBSD, recent (!) Windows - all looks fine.

Bad:

  • ESXi 5.5 dropped community AHCI driver (stolen from Linux kernel). There is unofficial patch (see ESXi 6 AHCI, but it does not include this card yet.
  • Did not test old Windows - it is likely that XP, 2003 or even Vista may have issues.

Resources

Here are my wiki pages mentioning AHCI:

Clone this wiki locally