]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/blob - share/man/man4/ata.4
MFC r362623:
[FreeBSD/stable/8.git] / share / man / man4 / ata.4
1 .\"
2 .\" Copyright (c) 2003 Søren Schmidt <sos@FreeBSD.org>
3 .\" All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\"    notice, this list of conditions and the following disclaimer,
10 .\"    without modification, immediately at the beginning of the file.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\"    notice, this list of conditions and the following disclaimer in the
13 .\"    documentation and/or other materials provided with the distribution.
14 .\" 3. The name of the author may not be used to endorse or promote products
15 .\"    derived from this software without specific prior written permission.
16 .\"
17 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 .\"
28 .\" $FreeBSD$
29 .\"
30 .Dd October 3, 2012
31 .Dt ATA 4
32 .Os
33 .Sh NAME
34 .Nm ata ,
35 .Nm ar ,
36 .Nm acd ,
37 .Nm ad ,
38 .Nm afd ,
39 .Nm ast
40 .Nd generic ATA/ATAPI disk controller driver
41 .Sh SYNOPSIS
42 For ISA based ATA/ATAPI support:
43 .Cd device isa
44 .Cd device ata
45 .Pp
46 In
47 .Pa /boot/device.hints :
48 .Cd hint.ata.0.at="isa"
49 .Cd hint.ata.0.port="0x1f0"
50 .Cd hint.ata.0.irq="14"
51 .Cd hint.ata.1.at="isa"
52 .Cd hint.ata.1.port="0x170"
53 .Cd hint.ata.1.irq="15"
54 .Pp
55 For PC98 based ATA/ATAPI support:
56 .Cd device isa
57 .Cd device ata
58 .Pp
59 In
60 .Pa /boot/device.hints :
61 .Cd hint.atacbus.0.at="isa"
62 .Cd hint.atacbus.0.port="0x640"
63 .Cd hint.atacbus.0.irq="9"
64 .Pp
65 For PCI based ATA/ATAPI support:
66 .Cd device pci
67 .Cd device ata
68 .Pp
69 To support ATA compliant disk drives:
70 .Cd device atadisk
71 .Pp
72 To support ATA software RAID's:
73 .Cd device ataraid
74 .Pp
75 To support ATAPI CDROM, DVD and CD/DVD burner drives:
76 .Cd device atapicd
77 .Pp
78 To support ATAPI floppy drives:
79 .Cd device atapifd
80 .Pp
81 To support ATAPI tape drives:
82 .Cd device atapist
83 .Pp
84 To turn
85 .Xr ata 4
86 subsystem controller drivers into cam(4) interface modules (disables all native
87 .Xr ata 4
88 APIs and periperal drivers):
89 .Cd options ATA_CAM
90 .Pp
91 The following tunables are settable from the loader:
92 .Bl -ohang
93 .It Va hw.ahci.force
94 set to nonzero value for forcing drivers to attach to some known AHCI-capable
95 chips even if they are configured for legacy IDE emulation (the default is 1,
96 force the attach).
97 .It Va hw.ata.ata_dma
98 set to 1 for DMA access, 0 for PIO (default is DMA).
99 .It Va hw.ata.ata_dma_check_80pin
100 set to 0 to disable the 80pin cable check (default is 1, check the cable).
101 .It Va hw.ata.atapi_dma
102 set to 1 for DMA access, 0 for PIO (default is DMA).
103 .It Va hw.ata.wc
104 set to 1 to enable Write Caching, 0 to disable (default is enabled).
105 .Em WARNING :
106 can cause data loss on power failures and crashes.
107 .It Va hint.atapci.X.msi
108 set to 1 to allow Message Signalled Interrupts (MSI) to be used by
109 specified PCI ATA controller, if supported.
110 .It Va hint.ata.X.devX.mode
111 limits the initial ATA mode for the specified device on the specified channel.
112 .It Va hint.ata.X.mode
113 limits initial ATA mode for every device on specified channel.
114 .It Va hint.ata.X.pm_level
115 controls SATA interface Power Management for specified channel,
116 allowing to save some power by the cost of additional command latency.
117 Possible values:
118 .Bl -tag -compact
119 .It 0
120 interface Power Management is disabled, default value.
121 .It 1
122 device is allowed to initiate PM state change, host is passive.
123 .It 2
124 host initiates PARTIAL PM state transition every time port becomes idle.
125 .It 3
126 host initiates SLUMBER PM state transition every time port becomes idle.
127 .El
128 Modes 2 and 3 are implemented only for AHCI driver now.
129 .It Va hint.ata. Ns Ar X Ns Va .dev Ns Ar X Ns Va .sata_rev
130 limits the initial SATA revision (speed) for the specified device
131 on the specified channel.
132 Values 1, 2 and 3 are respectively 1.5, 3 and 6Gbps.
133 .It Va hint.ata. Ns Ar X Ns Va .sata_rev
134 Same, but for every device on the specified channel.
135 .El
136 .Sh DESCRIPTION
137 The
138 .Nm
139 driver provides access to ATA (IDE) and SerialATA disk drives,
140 ATAPI CDROM/DVD drives, ZIP/LS120 ATAPI drives and ATAPI tape drives
141 connected to controllers according to the ATA/ATAPI standards.
142 .Pp
143 The currently supported ATA/SATA controller chips are:
144 .Pp
145 .Bl -tag -width "Silicon Image:" -compact
146 .It Acard:
147 ATP850P, ATP860A, ATP860R, ATP865A, ATP865R.
148 .It ALI:
149 M5228, M5229, M5281, M5283, M5287, M5288, M5289.
150 .It AMD:
151 AMD756, AMD766, AMD768, AMD8111, CS5536.
152 .It ATI:
153 IXP200, IXP300, IXP400, IXP600, IXP700, IXP800.
154 .It CMD:
155 CMD646, CMD646U2, CMD648, CMD649.
156 .It Cypress:
157 Cypress 82C693.
158 .It Cyrix:
159 Cyrix 5530.
160 .It HighPoint:
161 HPT302, HPT366, HPT368, HPT370, HPT371, HPT372, HPT372N, HPT374.
162 .It Intel:
163 6300ESB, 31244, PIIX, PIIX3, PIIX4, ESB2, ICH, ICH0, ICH2, ICH3, ICH4, ICH5,
164 ICH6, ICH7, ICH8, ICH9, ICH10, SCH, PCH.
165 .It ITE:
166 IT8211F, IT8212F, IT8213F.
167 .It JMicron:
168 JMB360, JMB361, JMB363, JMB365, JMB366, JMB368.
169 .It Marvell
170 88SX5040, 88SX5041, 88SX5080, 88SX5081, 88SX6041, 88SX6042, 88SX6081, 88SE6101,
171 88SE6102, 88SE6111, 88SE6121, 88SE6141, 88SE6145, 88SX7042.
172 .It National:
173 SC1100.
174 .It NetCell:
175 NC3000, NC5000.
176 .It nVidia:
177 nForce, nForce2, nForce2 MCP, nForce3, nForce3 MCP, nForce3 Pro, nForce4,
178 MCP51, MCP55, MCP61, MCP65, MCP67, MCP73, MCP77, MCP79, MCP89.
179 .It Promise:
180 PDC20246, PDC20262, PDC20263, PDC20265, PDC20267, PDC20268, PDC20269, PDC20270,
181 PDC20271, PDC20275, PDC20276, PDC20277, PDC20318, PDC20319, PDC20371, PDC20375,
182 PDC20376, PDC20377, PDC20378, PDC20379, PDC20571, PDC20575, PDC20579, PDC20580,
183 PDC20617, PDC20618, PDC20619, PDC20620, PDC20621, PDC20622, PDC40518, PDC40519,
184 PDC40718, PDC40719.
185 .It ServerWorks:
186 HT1000, ROSB4, CSB5, CSB6, K2, Frodo4, Frodo8.
187 .It Silicon Image:
188 SiI0680, SiI3112, SiI3114, SiI3124, SiI3132, SiI3512.
189 .It SiS:
190 SIS180, SIS181, SIS182, SIS5513, SIS530, SIS540, SIS550, SIS620, SIS630,
191 SIS630S, SIS633, SIS635, SIS730, SIS733, SIS735, SIS745, SIS961, SIS962,
192 SIS963, SIS964, SIS965.
193 .It VIA:
194 VT6410, VT6420, VT6421, VT82C586, VT82C586B, VT82C596, VT82C596B, VT82C686,
195 VT82C686A, VT82C686B, VT8231, VT8233, VT8233A, VT8233C, VT8235, VT8237,
196 VT8237A, VT8237S, VT8251, CX700, VX800, VX855, VX900.
197 .El
198 .Pp
199 Unknown ATA chipsets are supported in PIO modes, and if the standard
200 busmaster DMA registers are present and contain valid setup, DMA is
201 also enabled, although the max mode is limited to UDMA33, as it is
202 not known what the chipset can do and how to program it.
203 .Pp
204 The
205 .Nm
206 driver can change the transfer mode and various other parameters
207 when the system is up and running.
208 See
209 .Xr atacontrol 8 .
210 .Pp
211 The
212 .Nm
213 driver sets the maximum transfer mode supported by the hardware as default.
214 However the
215 .Nm
216 driver sometimes warns:
217 .Dq Sy "DMA limited to UDMA33, non-ATA66 cable or device".
218 This means that
219 the
220 .Nm
221 driver has detected that the required 80 conductor cable is not present
222 or could not be detected properly,
223 or that one of the devices on the channel only accepts up
224 to UDMA2/ATA33.
225 The
226 .Va hw.ata.ata_dma_check_80pin
227 tunable can be set to 0 to disable this check.
228 .Pp
229 Unknown ATAPI devices are initialized to DMA mode if the
230 .Va hw.ata.atapi_dma
231 tunable is set to 1 and they support at least UDMA33 transfers.
232 Otherwise they are set to PIO mode because severe DMA problems are
233 common even if the device capabilities indicate support.
234 You can always try to set DMA mode on an ATAPI device using
235 .Xr atacontrol 8 ,
236 but be aware that your hardware might
237 .Em not
238 support it and can potentially
239 .Em hang
240 the entire system causing data loss.
241 .Sh FILES
242 .Bl -tag -width ".Pa /sys/i386/conf/GENERIC" -compact
243 .It Pa /dev/ad*
244 ATA disk device nodes
245 .It Pa /dev/ar*
246 ATA RAID device nodes
247 .It Pa /dev/acd*
248 ATAPI CD-ROM device nodes
249 .It Pa /dev/afd*
250 ATAPI floppy drive device nodes
251 .It Pa /dev/ast*
252 ATAPI tape drive device nodes
253 .It Pa /sys/i386/conf/GENERIC
254 sample generic kernel config file for
255 .Nm
256 based systems
257 .El
258 .Sh NOTES
259 Please remember that in order to use UDMA4/ATA66 and above modes you
260 .Em must
261 use 80 conductor cables.
262 Please assure that ribbon cables are no longer than 45cm.
263 In case of rounded ATA cables, the length depends on the
264 quality of the cables.
265 SATA cables can be up to 1m long according to the specification.
266 .Pp
267 Static device numbering
268 (enabled with the
269 .Dv ATA_STATIC_ID
270 kernel option)
271 reserves a number for each possibly connected disk,
272 even when not present.
273 This is useful in hotswap scenarios
274 where disks should always show up as the same numbered device,
275 and not depend on attach order.
276 .Pp
277 Native Command Queuing (NCQ) on SATA drives is not yet supported.
278 .Sh SEE ALSO
279 .Xr ahci 4 ,
280 .Xr cam 4 ,
281 .Xr ataraid 4 ,
282 .Xr atacontrol 8 ,
283 .Xr burncd 8 ,
284 .Xr siis 4
285 .Sh HISTORY
286 The
287 .Nm
288 driver first appeared in
289 .Fx 4.0 .
290 .Sh AUTHORS
291 .An S\(/oren Schmidt
292 .Aq sos@FreeBSD.org .