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