xref: /freebsd/share/man/man4/ata.4 (revision ee7b0571c2c18bdec848ed2044223cc88db29bd8)
1.\" Copyright (c) 2011 Alexander Motin <mav@FreeBSD.org>
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\"
13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.\" $FreeBSD$
26.\"
27.Dd October 3, 2012
28.Dt ATA 4
29.Os
30.Sh NAME
31.Nm ata
32.Nd generic ATA/SATA controller driver
33.Sh SYNOPSIS
34To compile this driver into the kernel, place the following lines in your
35kernel configuration file:
36.Bd -ragged -offset indent
37.Cd "device scbus"
38.Cd "device ata"
39.Ed
40.Pp
41Alternatively, to load the driver as set of modules at boot time,
42place some of the following lines in
43.Xr loader.conf 5 :
44.Bd -literal -offset indent
45ata_load="YES"
46
47atacard_load="YES"
48ataisa_load="YES"
49atapci_load="YES"
50
51ataacard_load="YES"
52ataacerlabs_load="YES"
53ataadaptec_load="YES"
54ataahci_load="YES"
55ataamd_load="YES"
56ataati_load="YES"
57atacenatek_load="YES"
58atacypress_load="YES"
59atacyrix_load="YES"
60atahighpoint_load="YES"
61ataintel_load="YES"
62ataite_load="YES"
63atajmicron_load="YES"
64atamarvell_load="YES"
65atamicron_load="YES"
66atanational_load="YES"
67atanetcell_load="YES"
68atanvidia_load="YES"
69atapromise_load="YES"
70ataserverworks_load="YES"
71atasiliconimage_load="YES"
72atasis_load="YES"
73atavia_load="YES"
74.Ed
75.Pp
76The first line is for the common hardware independent code, and is a
77prerequisite for the other modules.
78The next three lines are generic bus-specific drivers.
79Of the rest, ataahci is the AHCI driver.
80The others are vendor-specific PCI drivers.
81.Pp
82The following tunables are settable from the
83.Xr loader 8 :
84.Bl -ohang
85.It Va hw.ahci.force
86set to nonzero value for forcing drivers to attach to some known AHCI-capable
87chips even if they are configured for legacy IDE emulation (the default is 1,
88force the attach).
89.It Va hw.ata.ata_dma_check_80pin
90set to 0 to disable the 80pin cable check (the default is 1, check the cable).
91.It Va hint.atapci.X.msi
92set to 1 to allow Message Signalled Interrupts (MSI) to be used by the
93specified PCI ATA controller, if supported.
94.It Va hint.ata.X.devX.mode
95limits the initial ATA mode for the specified device on the specified channel.
96.It Va hint.ata.X.mode
97limits the initial ATA mode for every device on the specified channel.
98.It Va hint.ata.X.pm_level
99controls SATA interface Power Management for the specified channel,
100allowing some power savings at the cost of additional command latency.
101Possible values:
102.Pp
103.Bl -tag -width 4n -offset indent -compact
104.It 0
105Interface Power Management is disabled.
106This is the default value.
107.It 1
108The device is allowed to initiate a PM state change; the host is passive.
109.It 2
110The host initiates a PARTIAL PM state transition every time a port becomes idle.
111.It 3
112host initiates SLUMBER PM state transition every time port becomes idle.
113.El
114.Pp
115Modes 2 and 3 are only supported for AHCI.
116.It Va hint.ata. Ns Ar X Ns Va .dev Ns Ar X Ns Va .sata_rev
117limits the initial SATA revision (speed) for the specified device
118on the specified channel.
119Values 1, 2 and 3 are respectively 1.5, 3 and 6Gbps.
120.It Va hint.ata. Ns Ar X Ns Va .sata_rev
121Same, but for every device on the specified channel.
122.El
123.Sh DESCRIPTION
124The
125.Nm
126driver gives the
127.Xr CAM 4
128subsystem access to the ATA (IDE) and SATA ports
129of many generic controllers.
130Depending on the controller, each PATA (IDE)
131port or each one or two SATA ports are
132represented to CAM as a separate bus with one or two targets.
133Most of the bus-management details are handled by the ATA/SATA-specific
134transport of CAM.
135Connected ATA disks are handled by the ATA protocol disk peripheral driver
136.Xr ada 4 .
137ATAPI devices are handled by the SCSI protocol peripheral drivers
138.Xr cd 4 ,
139.Xr da 4 ,
140.Xr sa 4 ,
141etc.
142.Pp
143This driver supports ATA, and for the most of controllers, ATAPI devices.
144Command queuing and SATA port multipliers are not supported.
145Device hot-plug and SATA interface power management is supported only on
146some controllers.
147.Pp
148The
149.Nm
150driver can change the transfer mode when the system is up and running.
151See the
152.Cm negotiate
153subcommand of
154.Xr camcontrol 8 .
155.Pp
156The
157.Nm
158driver sets the maximum transfer mode supported by the hardware as default.
159However, the
160.Nm
161driver sometimes warns:
162.Dq Sy "DMA limited to UDMA33, non-ATA66 cable or device".
163This means that
164the
165.Nm
166driver has detected that the required 80 conductor cable is not present
167or could not be detected properly,
168or that one of the devices on the channel only accepts up
169to UDMA2/ATA33.
170The
171.Va hw.ata.ata_dma_check_80pin
172tunable can be set to 0 to disable this check.
173.Sh HARDWARE
174The currently supported ATA/SATA controller chips are:
175.Pp
176.Bl -tag -width "Silicon Image:" -compact
177.It Acard:
178ATP850P, ATP860A, ATP860R, ATP865A, ATP865R.
179.It ALI:
180M5228, M5229, M5281, M5283, M5287, M5288, M5289.
181.It AMD:
182AMD756, AMD766, AMD768, AMD8111, CS5536.
183.It ATI:
184IXP200, IXP300, IXP400, IXP600, IXP700, IXP800.
185.It CMD:
186CMD646, CMD646U2, CMD648, CMD649.
187.It Cypress:
188Cypress 82C693.
189.It Cyrix:
190Cyrix 5530.
191.It HighPoint:
192HPT302, HPT366, HPT368, HPT370, HPT371, HPT372, HPT372N, HPT374.
193.It Intel:
1946300ESB, 31244, PIIX, PIIX3, PIIX4, ESB2, ICH, ICH0, ICH2, ICH3, ICH4, ICH5,
195ICH6, ICH7, ICH8, ICH9, ICH10, SCH, PCH.
196.It ITE:
197IT8211F, IT8212F, IT8213F.
198.It JMicron:
199JMB360, JMB361, JMB363, JMB365, JMB366, JMB368.
200.It Marvell
20188SX5040, 88SX5041, 88SX5080, 88SX5081, 88SX6041, 88SX6042, 88SX6081, 88SE6101,
20288SE6102, 88SE6111, 88SE6121, 88SE6141, 88SE6145, 88SX7042.
203.It National:
204SC1100.
205.It NetCell:
206NC3000, NC5000.
207.It nVidia:
208nForce, nForce2, nForce2 MCP, nForce3, nForce3 MCP, nForce3 Pro, nForce4,
209MCP51, MCP55, MCP61, MCP65, MCP67, MCP73, MCP77, MCP79, MCP89.
210.It Promise:
211PDC20246, PDC20262, PDC20263, PDC20265, PDC20267, PDC20268, PDC20269, PDC20270,
212PDC20271, PDC20275, PDC20276, PDC20277, PDC20318, PDC20319, PDC20371, PDC20375,
213PDC20376, PDC20377, PDC20378, PDC20379, PDC20571, PDC20575, PDC20579, PDC20580,
214PDC20617, PDC20618, PDC20619, PDC20620, PDC20621, PDC20622, PDC40518, PDC40519,
215PDC40718, PDC40719.
216.It ServerWorks:
217HT1000, ROSB4, CSB5, CSB6, K2, Frodo4, Frodo8.
218.It Silicon Image:
219SiI0680, SiI3112, SiI3114, SiI3124, SiI3132, SiI3512.
220.It SiS:
221SIS180, SIS181, SIS182, SIS5513, SIS530, SIS540, SIS550, SIS620, SIS630,
222SIS630S, SIS633, SIS635, SIS730, SIS733, SIS735, SIS745, SIS961, SIS962,
223SIS963, SIS964, SIS965.
224.It VIA:
225VT6410, VT6420, VT6421, VT82C586, VT82C586B, VT82C596, VT82C596B, VT82C686,
226VT82C686A, VT82C686B, VT8231, VT8233, VT8233A, VT8233C, VT8235, VT8237,
227VT8237A, VT8237S, VT8251, CX700, VX800, VX855, VX900.
228.El
229.Pp
230Some of above chips are also supported by the more featured
231.Xr ahci 4 ,
232.Xr mvs 4 ,
233and
234.Xr siis 4
235drivers.
236If both drivers are loaded at the same time, those will have precedence.
237.Pp
238Unknown ATA chipsets are supported in PIO modes, and if the standard
239busmaster DMA registers are present and contain valid setup, DMA is
240also enabled, although the max mode is limited to UDMA33, as it is
241not known what the chipset can do and how to program it.
242.Sh NOTES
243Please remember that in order to use UDMA4/ATA66 and above modes you
244.Em must
245use 80 conductor cables.
246Please assure that ribbon cables are no longer than 45cm.
247In case of rounded ATA cables, the length depends on the
248quality of the cables.
249SATA cables can be up to 1m long according to the specification.
250External SATA cables can be 2m long and more, but not all controllers
251work well on long cables, especially at high speeds.
252.Sh SEE ALSO
253.Xr ada 4 ,
254.Xr ahci 4 ,
255.Xr cam 4 ,
256.Xr camcontrol 8 ,
257.Xr cd 4 ,
258.Xr mvs 4 ,
259.Xr siis 4
260.Sh HISTORY
261The
262.Nm
263driver first appeared in
264.Fx 4.0 .
265It was turned into a
266.Xr CAM 4
267interface module in
268.Fx 9.0 .
269.Sh AUTHORS
270.An Alexander Motin Aq Mt mav@FreeBSD.org
271.An S\(/oren Schmidt Aq Mt sos@FreeBSD.org
272