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