xref: /dragonfly/share/man/man4/ahci.4 (revision 9ace2a34)
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.\" Copyright (c) 2016 The DragonFly Project.  All rights reserved.
18.\"
19.\" This code is derived from software contributed to The DragonFly Project
20.\" by Matthew Dillon <dillon@backplane.com>
21.\"
22.\" Redistribution and use in source and binary forms, with or without
23.\" modification, are permitted provided that the following conditions
24.\" are met:
25.\"
26.\" 1. Redistributions of source code must retain the above copyright
27.\"    notice, this list of conditions and the following disclaimer.
28.\" 2. Redistributions in binary form must reproduce the above copyright
29.\"    notice, this list of conditions and the following disclaimer in
30.\"    the documentation and/or other materials provided with the
31.\"    distribution.
32.\" 3. Neither the name of The DragonFly Project nor the names of its
33.\"    contributors may be used to endorse or promote products derived
34.\"    from this software without specific, prior written permission.
35.\"
36.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
37.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
38.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
39.\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE
40.\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
41.\" INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
42.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
43.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
44.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
45.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
46.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
47.\" SUCH DAMAGE.
48.\"
49.Dd November 28, 2014
50.Dt AHCI 4
51.Os
52.Sh NAME
53.Nm ahci
54.Nd Advanced Host Controller Interface for Serial ATA
55.Sh SYNOPSIS
56To compile this driver into the kernel,
57place the following line in your
58kernel configuration file:
59.Bd -ragged -offset indent
60.Cd "device ahci"
61.Ed
62.Pp
63Alternatively, to load the driver as a
64module at boot time, place the following line in
65.Xr loader.conf 5 :
66.Bd -literal -offset indent
67ahci_load="YES"
68.Ed
69.Sh DESCRIPTION
70The
71.Nm
72driver provides support for Serial ATA controllers conforming to the
73Advanced Host Controller Interface specification.
74.Pp
75Several AHCI capable controllers also provide a compatibility mode that
76causes them to appear as a traditional ATA controller supported by
77.Xr nata 4 .
78.Pp
79Although
80.Nm
81controllers are actual ATA controllers, the driver emulates SCSI via a
82translation layer.
83.Sh LOADER TUNABLES
84The following hints may be set in
85.Xr loader.conf 5
86to control the
87.Nm
88driver's behavior.
89Note that the hint need only exist, so removing it requires commenting it out.
90.Pp
91Usually both the
92.Xr nata 4
93and the
94.Nm
95drivers are loaded.
96The
97.Xr nata 4
98driver will pick up any ata-like devices which the
99.Nm
100driver misses.
101If the
102.Nm
103driver is disabled the
104.Xr nata 4
105driver will typically pick up the
106.Nm
107devices, albeit under the
108.Pa ad
109disk name rather than the
110.Pa da
111disk name.
112.Bd -literal -offset indent
113hint.ahci.disabled=1
114.Ed
115.Pp
116The
117.Nm
118driver can be told to force a lower-speed 1.5Gb link speed
119if necessary, and can also be told to refrain from attempting to send
120certain higher-level ATA commands to initialize ATA features which
121some devices might not properly implement.
122.Bd -literal -offset indent
123hint.ahci.force150=1
124hint.ahci.nofeatures=1
125.Ed
126.Pp
127By default, the driver will use MSI if it is supported.
128This behavior can be turned off by setting the following tunable:
129.Bd -literal -offset indent
130hw.ahci.msi.enable=0
131.Ed
132.Sh SYSCTL VARIABLES
133Link power management can be set with the sysctl
134.Va dev.ahci.%d.%d.link_pwr_mgmt
135to 0 for `disabled', 1 for `medium', and 2 for `aggressive'.
136Link power state can be read with the sysctl
137.Va dev.ahci.%d.%d.link_pwr_state .
138.Sh SEE ALSO
139.Xr intro 4 ,
140.Xr nata 4 ,
141.Xr pci 4 ,
142.Xr scsi 4 ,
143.Xr sili 4 ,
144.Xr nvme 4 ,
145.Xr loader.conf 5
146.Sh HISTORY
147The
148.Nm
149driver first appeared in
150.Dx 2.3 .
151.Sh AUTHORS
152.An -nosplit
153The
154.Nm
155driver was originally written by
156.An David Gwynne Aq Mt dlg@openbsd.org
157and
158.An Christopher Pascoe Aq Mt pascoe@openbsd.org
159for
160.Ox .
161.Pp
162It was ported to
163.Dx
164by
165.An Matt Dillon Aq Mt dillon@apollo.backplane.com ,
166who substantially rewrote the driver (honestly, just about from scratch
167but having the openbsd code as a reference helped a lot), and
168added new features such as hot-plug and port multiplier support.
169