1.\" $OpenBSD: ahci.4,v 1.7 2008/04/19 01:18:39 djm Exp $ 2.\" 3.\" Copyright (c) 2006 David Gwynne <dlg@openbsd.org> 4.\" 5.\" Permission to use, copy, modify, and distribute this software for any 6.\" purpose with or without fee is hereby granted, provided that the above 7.\" copyright notice and this permission notice appear in all copies. 8.\" 9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14.\" TORTIOUS ACTION, ARISING OUT OF 15.\" PERFORMANCE OF THIS SOFTWARE. 16.\" 17.Dd November 28, 2014 18.Dt AHCI 4 19.Os 20.Sh NAME 21.Nm ahci 22.Nd Advanced Host Controller Interface for Serial ATA 23.Sh SYNOPSIS 24To compile this driver into the kernel, 25place the following line in your 26kernel configuration file: 27.Bd -ragged -offset indent 28.Cd "device ahci" 29.Ed 30.Pp 31Alternatively, to load the driver as a 32module at boot time, place the following line in 33.Xr loader.conf 5 : 34.Bd -literal -offset indent 35ahci_load="YES" 36.Ed 37.Sh DESCRIPTION 38The 39.Nm 40driver provides support for Serial ATA controllers conforming to the 41Advanced Host Controller Interface specification. 42.Pp 43Several AHCI capable controllers also provide a compatibility mode that 44causes them to appear as a traditional ATA controller supported by 45.Xr nata 4 . 46.Pp 47Although 48.Nm 49controllers are actual ATA controllers, the driver emulates SCSI via a 50translation layer. 51.Sh LOADER TUNABLES 52The following hints may be set in 53.Xr loader.conf 5 54to control the 55.Nm 56driver's behavior. 57Note that the hint need only exist, so removing it requires commenting it out. 58.Pp 59Usually both the 60.Xr nata 4 61and the 62.Nm 63drivers are loaded. 64The 65.Xr nata 4 66driver will pick up any ata-like devices which the 67.Nm 68driver misses. 69If the 70.Nm 71driver is disabled the 72.Xr nata 4 73driver will typically pick up the 74.Nm 75devices, albeit under the 76.Pa ad 77disk name rather than the 78.Pa da 79disk name. 80.Bd -literal -offset indent 81hint.ahci.disabled=1 82.Ed 83.Pp 84The 85.Nm 86driver can be told to force a lower-speed 1.5Gb link speed 87if necessary, and can also be told to refrain from attempting to send 88certain higher-level ATA commands to initialize ATA features which 89some devices might not properly implement. 90.Bd -literal -offset indent 91hint.ahci.force150=1 92hint.ahci.nofeatures=1 93.Ed 94.Pp 95By default, the driver will use MSI if it is supported. 96This behavior can be turned off by setting the following tunable: 97.Bd -literal -offset indent 98hw.ahci.msi.enable=0 99.Ed 100.Sh SYSCTL VARIABLES 101Link power management can be set with the sysctl 102.Va dev.ahci.%d.%d.link_pwr_mgmt 103to 0 for `disabled', 1 for `medium', and 2 for `aggressive'. 104Link power state can be read with the sysctl 105.Va dev.ahci.%d.%d.link_pwr_state . 106.Sh SEE ALSO 107.Xr intro 4 , 108.Xr nata 4 , 109.Xr pci 4 , 110.Xr scsi 4 , 111.Xr sili 4 , 112.Xr loader.conf 5 113.Sh HISTORY 114The 115.Nm 116driver first appeared in 117.Dx 2.3 . 118.Sh AUTHORS 119.An -nosplit 120The 121.Nm 122driver was originally written by 123.An David Gwynne Aq Mt dlg@openbsd.org 124and 125.An Christopher Pascoe Aq Mt pascoe@openbsd.org 126for 127.Ox . 128.Pp 129It was ported to 130.Dx 131by 132.An Matt Dillon Aq Mt dillon@apollo.backplane.com , 133who added new features such as hot-plug and port multiplier support. 134