xref: /freebsd/share/man/man4/ata.4 (revision 74bf4e164ba5851606a27d4feff27717452583e5)
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 November 4, 2003
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
42For ISA based ATA/ATAPI support:
43.Cd device isa
44.Cd device ata
45.Pp
46In
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
55For PC98 based ATA/ATAPI support:
56.Cd device isa
57.Cd device ata
58.Pp
59In
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
65For PCI based ATA/ATAPI support:
66.Cd device pci
67.Cd device ata
68.Pp
69To support ATA compliant disk drives:
70.Cd device atadisk
71.Pp
72To support ATA software RAID's:
73.Cd device ataraid
74.Pp
75To support ATAPI CDROM, DVD and CD/DVD burner drives:
76.Cd device atapicd
77.Pp
78To support ATAPI floppy drives:
79.Cd device atapifd
80.Pp
81To support ATAPI tape drives:
82.Cd device atapist
83.Pp
84The following tunables are settable from the loader:
85.Bl -ohang
86.It Va hw.ata.ata_dma
87set to 1 for DMA access, 0 for PIO (default is DMA).
88.It Va hw.ata.atapi_dma
89set to 1 for DMA access, 0 for PIO (default is PIO).
90.It Va hw.ata.wc
91set to 1 to enable Write Caching, 0 to disable (default is enabled).
92.Em WARNING :
93can cause data loss on power failures.
94.El
95.Sh DESCRIPTION
96The
97.Nm
98driver provides access to ATA (IDE) and SerialATA disk drives,
99ATAPI CDROM/DVD drives, ZIP/LS120 ATAPI drives and ATAPI tape drives
100connected to controllers according to the ATA/ATAPI standards.
101.Pp
102The currently supported ATA/SATA controller chips are:
103.Pp
104.Bl -tag -width "Silicon Image:" -compact
105.It Acard:
106ATP850P, ATP860A, ATP860R, ATP865A, ATP865R
107.It ALI:
108Aladdin (ALi5229) compatible chips.
109.It AMD:
110AMD756, AMD766, AMD768, AMD8111.
111.It CMD:
112CMD646, CMD648, CMD649.
113.It Cypress:
114Cypress 82C693.
115.It Cyrix:
116Cyrix 5530.
117.It HighPoint:
118HPT302, HPT366, HPT366, HPT368, HPT370, HPT371, HPT372, HPT374.
119.It Intel:
120PIIX, PIIX3, PIIX4, ICH, ICH0, ICH2, ICH3, ICH4, ICH5.
121.It National:
122SC1100.
123.It nVidia:
124nForce, nForce2, nForce3.
125.It Promise:
126PDC20246, PDC20262, PDC20263, PDC20265, PDC20267, PDC20268, PDC20269, PDC20270, PDC20271, PDC20275, PDC20276, PDC20277, PDC20318, PDC20319, PDC20371, PDC20375, PDC20376, PDC20377, PDC20378, PDC20379, PDC20617, PDC20618, PDC20619, PDC20620.
127.It ServerWorks:
128ROSB4, CSB5, CSB6.
129.It Silicon Image:
130SiI0680, SiI3112, SiI3114, SiI3512.
131.It SiS:
132SIS5513, SIS530, SIS540, SIS550, SIS620, SIS630, SIS630S, SIS633, SIS635, SIS730, SIS733, SIS735, SIS745, SIS961, SIS962, SIS963, SIS964
133.It VIA:
134VT82C586, VT82C586B, VT82C596, VT82C596B, VT82C686, VT82C686A, VT82C686B, VT8231, VT8233, VT8233A, VT8233C, VT8235, VT8237.
135.El
136.Pp
137Unknown ATA chipsets are supported in PIO modes, and if the standard
138busmaster DMA registers are present and contain valid setup, DMA is
139also enabled, although the max mode is limited to UDMA33, as it is
140not known what the chipset can do and how to program it.
141.Pp
142The
143.Nm
144driver can change the transfer mode and various other parameters
145when the system is up and running.
146See
147.Xr atacontrol 8 .
148.Pp
149The
150.Nm
151driver sets the maximum transfer mode supported by the hardware as default.
152However the
153.Nm
154driver sometimes warns:
155.Dq Sy "DMA limited to UDMA33, non-ATA66 cable or device".
156This means that
157the
158.Nm
159driver has detected that the required 80 conductor cable is not present
160or could not be detected properly,
161or that one of the devices on the channel only accepts up
162to UDMA2/ATA33.
163.Pp
164ATAPI devices are set to PIO mode by default because severe DMA problems are
165common even if the device capabilities indicate support.
166You can always try to set DMA mode on an ATAPI device using
167.Xr atacontrol 8 ,
168but be aware that your hardware might
169.Em not
170support it and can potentially
171.Em hang
172the entire system causing data loss.
173.Sh FILES
174.Bl -tag -width ".Pa /sys/i386/conf/GENERIC" -compact
175.It Pa /dev/ad*
176ATA disk device nodes
177.It Pa /dev/ar*
178ATA RAID device nodes
179.It Pa /dev/acd*
180ATAPI CD-ROM device nodes
181.It Pa /dev/afd*
182ATAPI floppy drive device nodes
183.It Pa /dev/ast*
184ATAPI tape drive device nodes
185.It Pa /sys/i386/conf/GENERIC
186sample generic kernel config file for
187.Nm
188based systems
189.El
190.Sh NOTES
191Please remember that in order to use UDMA4/ATA66 and above modes you
192.Em must
193use 80 conductor cables.
194Please assure that ribbon cables are no longer than 45cm.
195In case of rounded ATA cables, the length depends on the
196quality of the cables.
197SATA cables can be up to 1m long according to the specification.
198.Pp
199Static device numbering
200(enabled with the
201.Dv ATA_STATIC_ID
202kernel option)
203reserves a number for each possibly connected disk,
204even when not present.
205This is useful in hotswap scenarios
206where disks should always show up as the same numbered device,
207and not depend on attach order.
208.Sh SEE ALSO
209.Xr atacontrol 8 ,
210.Xr burncd 8
211.Sh HISTORY
212The
213.Nm
214driver first appeared in
215.Fx 4.0 .
216.Sh AUTHORS
217.An S\(/oren Schmidt
218.Aq sos@FreeBSD.org .
219